MCP /mcp reconnect fails with code-mode server
Resolved 💬 3 comments Opened Jan 24, 2026 by mark-software Closed Jan 29, 2026
Description
The /mcp command fails to reconnect to a code-mode MCP server with the error:
Failed to reconnect to code-mode.
This happens even after restarting Claude Code. However, the underlying MCP server works perfectly when run manually from the terminal.
Environment
- Claude Code version: 2.1.15 (also tested behavior persists after restart)
- macOS Darwin 24.6.0
- Node.js (npx works fine)
MCP Configuration
.mcp.json:
{
"mcpServers": {
"code-mode": {
"command": "npx",
"args": ["@utcp/code-mode-mcp"],
"env": {
"UTCP_CONFIG_FILE": "/path/to/.utcp_config.json"
}
}
}
}
The code-mode server proxies to remote MCP servers (Supabase, Cloudflare) via mcp-remote.
Reproduction Steps
- Configure code-mode MCP server as shown above
- Start Claude Code - MCP may or may not connect initially
- Run
/mcpto try to reconnect - Observe "Failed to reconnect to code-mode" error
What Works
Running the server manually works fine:
npx @utcp/code-mode-mcp
Output shows successful connections:
- Supabase: 20 tools discovered
- Cloudflare observability: 10 tools discovered
- Cloudflare bindings: 25 tools discovered
OAuth tokens are valid and fresh. No stale processes blocking.
Expected Behavior
/mcp should successfully reconnect to the code-mode server, or provide a more descriptive error message about what's failing.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗