Claude Code CLI cannot connect to Context MCP server.
Linux/Mac: Edit ~/.config/claude/mcp_servers.json
Windows: Edit %APPDATA%\Claude\mcp_servers.json
Change this line:
"args": ["exec", "-i", "context-server", "python", "-m", "src.mcp_server.mcp_app"],To this:
"args": ["exec", "-i", "context-server", "python", "-m", "src.mcp_server.stdio_full_mcp"],Complete config should look like:
{
"context": {
"command": "docker",
"args": ["exec", "-i", "context-server", "python", "-m", "src.mcp_server.stdio_full_mcp"],
"env": {
"MCP_ENABLED": "true",
"PYTHONPATH": "/app"
}
}
}- Close Claude Code CLI completely
- Wait 5 seconds
- Reopen Claude Code CLI
Ask Claude:
Can you check the health of the Context MCP server?
Expected: Claude successfully returns server health status ✅
cd deployment/docker
docker-compose psAll services should show "Up (healthy)". If not:
docker-compose up -d- Old entry point:
src.mcp_server.mcp_app(uses async/await, doesn't work with stdio) - New entry point:
src.mcp_server.stdio_full_mcp(proper stdio transport)
docker logs context-server | tail -20Look for: "Starting FULL STDIO MCP server (all tools)..."
docker exec context-server env | grep MCP_ENABLEDShould return: MCP_ENABLED=true
cd deployment/docker
docker-compose restart context-server- Detailed Fix: See
docs/MCP_CONNECTION_FIX.md - Full Setup Guide: See
docs/CLAUDE_CLI_SETUP.md - Testing Guide: See
docs/MCP_SERVER_TESTING_GUIDE.md - Implementation Summary: See
MCP_FIX_IMPLEMENTATION_SUMMARY.md
Try these commands in Claude CLI:
-
List available tools:
What MCP tools are available from Context? -
Index your codebase:
Please index the /workspace/src directory. -
Search your code:
Search for authentication functions in the codebase. -
Check indexing status:
What's the current indexing status?
Need help? Check the troubleshooting section in MCP_FIX_IMPLEMENTATION_SUMMARY.md