Advanced
Advanced
Section titled “Advanced”This page covers caching, configuration, and performance for the MCP server.
Custom Tool Composition
Section titled “Custom Tool Composition”Chain tools for agent architecture and config workflows.
Pattern: Run analysis
Section titled “Pattern: Run analysis”1. analyze_architecture({ project_path: "." }) ↓ Get agent and OpenClaw architecture metrics and findings2. Use findings and recommendations to suggest fixesPattern: Config before analysis
Section titled “Pattern: Config before analysis”Validate or generate config before running analysis:
1. arxo_config_validate({ project_path: "." }) ↓ If valid2. analyze_architecture({ project_path: "." })Or bootstrap a new project:
1. arxo_config_suggest({ project_path: "." }) ↓ Paste suggested arxo.yaml into project2. analyze_architecture({ project_path: "." })Caching Strategy
Section titled “Caching Strategy”The MCP server uses an in-memory cache with configurable TTL and size limits.
Cache key
Section titled “Cache key”A cache entry is keyed by:
- Project path (absolute path)
- Config hash (SHA-256 of
arxo.yamlif present)
Implication: Changing project path or config invalidates the cache.
Cache tuning
Section titled “Cache tuning”Interactive development
Section titled “Interactive development”Goal: Fast feedback, tolerate slightly stale data
{ "command": "/path/to/arxo-mcp", "args": ["--cache-ttl", "600", "--max-cache-entries", "512000"]}- TTL: 10 minutes (600s)
- Size: 512k entries
Always fresh (e.g. CI)
Section titled “Always fresh (e.g. CI)”Goal: No stale results
{ "command": "/path/to/arxo-mcp", "args": ["--cache-ttl", "0"]}For CI pipelines, using the CLI (arxo analyze) is usually better. See CLI Comparison.
Cache invalidation
Section titled “Cache invalidation”- TTL expires
- Config file (
arxo.yaml) changes - Max cache entries exceeded (LRU eviction)
- Restart the MCP server (clears all cache)
Enable debug logging to see cache hits/misses: RUST_LOG=arxo_mcp=debug.
Multi-project analysis
Section titled “Multi-project analysis”For monorepos, analyze each package separately:
analyze_architecture({ project_path: "./packages/frontend" })analyze_architecture({ project_path: "./packages/backend" })Each project has its own cache key.
Performance
Section titled “Performance”- Exclude large directories — Use config or
.arxoignoreto excludenode_modules/,vendor/,.venv/,target/,dist/,build/. - Increase cache TTL — For repeated analysis on the same project, e.g.
--cache-ttl 600.
Security
Section titled “Security”- The MCP server does not execute project code; it only reads and analyzes it.
- It has read-only access to the project path and config.
- Avoid putting secrets in
arxo.yaml; use environment variables where the CLI supports them.
Logging
Section titled “Logging”- Development:
RUST_LOG=arxo_mcp=infoor--log-level info - Debugging:
RUST_LOG=arxo_mcp=debugor--log-level debug - Quiet:
RUST_LOG=arxo_mcp=warn
Logs go to stderr and do not interfere with the JSON-RPC stream.
Related Pages
Section titled “Related Pages”- Workflows — Example workflows
- Troubleshooting — Debugging
- Configuration — Server arguments and client setup