Add /mcp restart command to respawn crashed MCP servers
Problem
When a stdio-based MCP server crashes or needs restarting during a Claude Code session, the session permanently loses access to that server's tools. There is no way to reconnect or respawn the MCP server without ending and restarting the entire Claude Code session.
For users running multiple concurrent sessions (e.g., supervisor/worker patterns with 4+ tabs), this means closing and reopening everything just to fix one broken MCP connection.
Proposed Solution
Add a /mcp restart command (or similar) that:
- Kills the dead/hung MCP server child process
- Respawns it using the same config from settings
- Re-establishes the stdio pipe
- Makes the server's tools available again
Optional: /mcp restart <server-name> to target a specific server, /mcp status to see which servers are healthy.
Current Workaround
Save all session IDs, close all tabs, reopen them. Works but loses in-flight context and is disruptive.
Environment
- Windows 11 (MINGW64)
- Claude Code CLI with multiple concurrent sessions
- Affected MCP server: jcodemunch-mcp (stdio transport)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗