Troubleshooting
Common issues and their solutions.
Gateway Issues
Gateway Won't Start
Symptoms:
- Gateway exits immediately
- Error message on startup
Solutions:
-
Check configuration syntax:
gateway-http --config config.yaml --validate -
Enable debug logging:
RUST_LOG=debug gateway-http --config config.yaml -
Check file paths:
- Ensure
config.yamlexists - Ensure
catalog_pathin config is correct - Use absolute paths if relative paths fail
- Ensure
-
Check port availability:
lsof -i :4444
# If port is in use, change listen_addr or stop the other process
Hot Reload Not Working
Symptoms:
- Catalog changes not detected
/admin/reloadreturns error
Solutions:
-
Check file permissions:
ls -la catalog.yaml
# Ensure file is readable -
Docker volume issues:
# Docker may not propagate file events
# Use manual reload instead
curl -X POST http://localhost:4444/admin/reload -
Check logs for errors:
WARN catalog_watcher: Failed to parse catalog: ... -
Validate catalog syntax:
# Use a YAML linter
yamllint catalog.yaml
Server Issues
Server Won't Start
Symptoms:
- POST
/servers/:id/startreturns error - Server status stuck in "starting"
Solutions:
-
Check server configuration:
curl http://localhost:4444/servers/my-server | jq -
For local-process runtime:
# Verify command exists
which my-mcp-command
# Test command directly
my-mcp-command --help -
Check environment variables:
# Ensure env vars are set
env:
MY_VAR: "${MY_VAR}" # Is MY_VAR actually set? -
Check working directory:
runtime:
type: local-process
command: ./my-server
working_dir: /path/to/dir # Does this exist?
Server Keeps Stopping
Symptoms:
- Server stops unexpectedly
- Server status goes to "unhealthy"
Solutions:
-
Check idle timeout:
# config.yaml
idle_timeout_seconds: 300 # 5 minutes default -
Check server logs:
# Enable debug logging
RUST_LOG=debug gateway-http --config config.yaml -
Check server process:
# For local-process, check if process is crashing
ps aux | grep mcp
Remote SSE Server Not Connecting
Symptoms:
- 502 Bad Gateway errors
- Connection timeout
Solutions:
-
Verify URL is accessible:
curl -v https://mcp.example.com/api -
Check headers:
runtime:
type: remote-sse
url: https://mcp.example.com/api
headers:
Authorization: "Bearer ${TOKEN}" # Is TOKEN set? -
Check network connectivity:
# From gateway host/container
curl -v https://mcp.example.com/api
Client Issues
Claude Desktop Not Connecting
Symptoms:
- Server not appearing in Claude
- Claude shows MCP error
Solutions:
-
Verify config file location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
Check JSON syntax:
# Validate JSON
python -m json.tool < claude_desktop_config.json -
Use absolute paths:
{
"mcpServers": {
"gateway": {
"command": "/usr/local/bin/gateway-stdio",
"args": ["--server", "postgres", "--catalog", "/Users/me/catalog.yaml"]
}
}
} -
Test manually:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | \
gateway-stdio --server postgres --catalog catalog.yaml -
Restart Claude Desktop completely
API Key Authentication Failing
Symptoms:
- 401 Unauthorized errors
- 403 Forbidden errors
Solutions:
-
Check header format:
# Correct formats
curl -H "Authorization: Bearer your-key" http://localhost:4444/servers
curl -H "X-API-Key: your-key" http://localhost:4444/servers -
Verify API key matches:
# Check what key is configured
cat config.yaml | grep api_key -
Check environment variable:
echo $MCP_GATEWAY_API_KEY
Performance Issues
Slow Response Times
Solutions:
-
Check server health:
curl http://localhost:4444/stats | jq '.servers' -
Increase timeout:
request_timeout_seconds: 60 -
Check backend server:
- Is the MCP server itself slow?
- Network latency to remote servers?
-
Enable debug logging to trace:
RUST_LOG=debug gateway-http --config config.yaml
High Memory Usage
Solutions:
-
Check connection pool size:
max_connections_per_server: 10 # Reduce if too high -
Reduce idle timeout:
idle_timeout_seconds: 60 # Stop idle servers sooner -
Monitor server count:
curl http://localhost:4444/stats | jq '.active_servers'
Debug Mode
Enable comprehensive debug logging:
# All components
RUST_LOG=debug gateway-http --config config.yaml
# Specific components
RUST_LOG=gateway_core=debug,gateway_http=info gateway-http --config config.yaml
# Trace level (very verbose)
RUST_LOG=trace gateway-http --config config.yaml
Getting Help
If you're still stuck:
- Check existing issues: GitHub Issues
- Ask the community: GitHub Discussions
- Join Discord: Discord Server
When reporting issues, include:
- Gateway version (
gateway-http --version) - Configuration files (redact secrets)
- Full error messages
- Steps to reproduce