Troubleshooting¶
Solutions to common issues.
Common Issues¶
Server Won't Start¶
Symptom:
Error: connection refused
Solutions:
-
Check port availability:
lsof -i :8080 -
Verify MCP server command:
npx @modelcontextprotocol/server-filesystem ./ # Test standalone -
Check logs:
leanproxy-mcp server run --verbose --stdio
Redaction Not Working¶
Symptom: Sensitive data still appears in LLM input.
Solutions:
-
Verify redaction is enabled:
leanproxy-mcp context show -
Add custom pattern:
redaction: enabled: true patterns: - name: "custom-secret" pattern: "MY_SECRET=[A-Z0-9]+" -
Check pattern syntax:
leanproxy-mcp doctor
High Token Usage¶
Symptom: Token usage not decreasing.
Solutions:
-
Run in dry-run mode to see what's being redacted:
leanproxy-mcp server run --dry-run --stdio -
Generate report:
leanproxy-mcp report --output report.md -
Enable debug logging:
leanproxy-mcp server run --debug --stdio
IDE Connection Issues¶
Symptom: IDE cannot connect to LeanProxy-MCP.
Solutions:
-
Verify installation:
leanproxy-mcp version -
Check IDE configuration:
{ "mcpServers": { "leanproxy": { "command": "leanproxy-mcp", "args": ["server", "run", "--stdio"] } } } -
Restart IDE
Configuration Not Loading¶
Symptom: Config changes have no effect.
Solutions:
-
Check config file location:
echo $LEANPROXY_CONFIG # or default: ~/.config/leanproxy/config.yaml -
Validate config:
leanproxy-mcp context validate -
Use explicit config:
leanproxy-mcp server run --config /path/to/config.yaml --stdio
Cache Issues¶
Cache Empty After List Tools¶
Symptom:
list_tools returns no results or tools are not cached.
Solutions:
-
Check cache location:
leanproxy-mcp cache --location ls -la ~/.config/leanproxy/toolcache/ -
Verify list_tools method works:
printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}\n{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_tools","arguments":{"server_name":"garmin"}}}\n' | leanproxy-mcp server run --stdio -
Check logs for errors:
leanproxy-mcp server run --stdio --log-level debug --log-file /tmp/leanproxy.log # Then list tools in another terminal tail -f /tmp/leanproxy.log | grep -i "list_tools\|cache\|error" -
Clear and rebuild cache:
leanproxy-mcp cache --clear --server garmin leanproxy-mcp cache --clear --server Intervals_icu # Then search again to rebuild cache
Cache Not Persisting¶
Symptom: Cache files exist but are empty or disappear after restart.
Solutions:
-
Check directory permissions:
ls -la ~/.config/leanproxy/ chmod 755 ~/.config/leanproxy/toolcache/ -
Verify disk space:
df -h ~/.config/leanproxy/
Status File Issues¶
status --running Shows "No running leanproxy instance found"¶
Symptom:
Running leanproxy but leanproxy status --running shows no instances.
Solutions:
-
Check if status file exists:
/bin/cat ~/.config/leanproxy/status/current.json -
Verify you're running a recent version:
leanproxy-mcp version # Should show version with status file support -
Check if the running instance created the status file:
ls -la ~/.config/leanproxy/status/ # Should show current.json with recent timestamp -
For stdio mode (OpenCode), ensure the binary is updated:
which leanproxy-mcp # Verify it's the built binary, not an old version go build -o /usr/local/bin/leanproxy-mcp .
Status File Not Updated¶
Symptom: Status file exists but shows stale data.
Solutions:
-
Kill old processes:
/bin/ps aux | grep leanproxy kill <PID> # Kill any running instances -
Restart and verify:
# Start fresh instance leanproxy-mcp server run --stdio & # Wait a few seconds leanproxy-mcp status --running
Debug Mode¶
Enable debug logging for troubleshooting:
leanproxy-mcp server run --stdio --log-level debug --log-file /tmp/leanproxy.log
Doctor Command¶
Run diagnostics:
leanproxy-mcp doctor
Checks: - Configuration syntax - Network connectivity - File permissions - Dependencies
Getting Help¶
- GitHub Issues: https://github.com/mmornati/leanproxy-mcp/issues
- Documentation: https://github.com/mmornati/leanproxy-mcp#readme