Root Cause Identified:
The .claude.json file at C:\Users\preda\.claude.json existed but had NO mcpServers property configured. This is why Claude Code CLI showed "No MCP servers configured."
Solution Applied:
✅ Added mcpServers property to .claude.json
✅ Configured Context MCP server with stdio transport
✅ Set 30-second timeout for initialization
✅ Verified Docker services are running
File: C:\Users\preda\.claude.json
Configuration Added:
{
"mcpServers": {
"context": {
"type": "stdio",
"command": "docker",
"args": [
"exec",
"-i",
"context-server",
"python",
"-m",
"src.mcp_server.stdio_full_mcp"
],
"env": {
"MCP_ENABLED": "true",
"PYTHONPATH": "/app"
},
"disabled": false,
"timeout": 30000,
"description": "Context MCP Server - Semantic code search and analysis"
}
}
}Key Settings:
- ✅ Transport: stdio (standard for local MCP servers)
- ✅ Timeout: 30000ms (30 seconds - enough for 18s initialization)
- ✅ Disabled: false (server is enabled)
- ✅ Docker: Uses
docker execto connect to running container
Important: You MUST restart Claude Code CLI completely for changes to take effect.
1. Close all Claude Code CLI windows
2. Wait 10 seconds
3. Start Claude Code CLI
Run this command in Claude Code CLI:
/mcp
Expected Output:
MCP Servers:
Context MCP Server:
- Status: Connected ✅
- Transport: stdio
- Timeout: 30000ms
- Tools: 30+ available
- Description: Context MCP Server - Semantic code search and analysis
Try using one of the Context tools:
Use the Context MCP server to search for "FastMCP" in the codebase
| Setting | Value | Purpose |
|---|---|---|
| File Location | C:\Users\preda\.claude.json |
Claude Code CLI config |
| Server Name | context |
Identifier for the MCP server |
| Transport | stdio |
Standard input/output communication |
| Command | docker exec |
Connects to running container |
| Timeout | 30000ms | Allows 30s for initialization |
| Status | Enabled | Server is active |
We initially thought the configuration file was at:
- ❌
C:\Users\preda\AppData\Roaming\Claude\.claude.json(doesn't exist) - ❌
C:\Users\preda\AppData\Roaming\Claude\mcp_servers.json(wrong file) - ❌
C:\Users\preda\AppData\Roaming\Claude\claude_desktop_config.json(Claude Desktop, not CLI)
The correct file is:
- ✅
C:\Users\preda\.claude.json(user home directory)
The file existed but was missing the mcpServers property entirely. This is why:
- ❌ "No MCP servers configured" message appeared
- ❌
/mcpcommand showed nothing - ❌ Context server couldn't connect
Backup Created: C:\Users\preda\.claude.json.backup.20251104_124053
To Restore Backup (if needed):
Copy-Item "C:\Users\preda\.claude.json.backup.20251104_124053" "C:\Users\preda\.claude.json" -ForceAfter restarting Claude Code CLI, you should see:
✅ MCP Server Detected: /mcp command shows Context server
✅ Connection Status: Shows "Connected" not "Shutdown"
✅ Tools Available: 30+ tools listed
✅ No Errors: No timeout or connection errors
Check file location:
Test-Path "C:\Users\preda\.claude.json"Verify content:
Get-Content "C:\Users\preda\.claude.json" | ConvertFrom-Json | Select-Object -ExpandProperty mcpServersRe-run configuration:
cd D:\GitProjects\Context
.\scripts\configure_mcp_servers.ps1Check Docker:
docker ps | grep context-serverCheck logs:
docker logs context-server --tail 50Test manually:
docker exec -i context-server python -m src.mcp_server.stdio_full_mcp- README_MCP_CONNECTION_FIX.md - Quick start guide
- ACTION_PLAN_MCP_FIX.md - Detailed action plan
- FINAL_MCP_CONNECTION_SOLUTION.md - All solutions
- scripts/configure_mcp_servers.ps1 - Configuration script
- Claude Code CLI uses
.claude.jsonin user home directory, not AppData - The
mcpServersproperty must exist in the configuration file - Timeout is critical for servers with heavy initialization (18s)
- Backup before editing - always have a rollback plan
- Restart is required - configuration changes need a full restart
Problem: "No MCP servers configured" message
Root Cause: Missing mcpServers property in .claude.json
Solution: Added Context server configuration with 30s timeout
Status: ✅ Configuration complete
Next Step: Restart Claude Code CLI and run /mcp
Configuration completed at: 2025-11-04 12:40:53
Backup location: C:\Users\preda\.claude.json.backup.20251104_124053
Ready to test: Yes ✅