Feature request: hot-reload MCP servers without restarting the session
Problem
MCP servers are only loaded at session startup. If I run claude mcp add <name> ... during an active session (or edit ~/.claude.json directly), the new server is written to the config file but the running process doesn't pick it up. The only way to use the new MCP is to exit the session and relaunch Claude Code — which loses the in-memory conversation context mid-task.
This comes up a lot in real workflows:
- User asks Claude to do something → Claude realizes partway through that an MCP would help → Claude installs it with
claude mcp add→ neither Claude nor the user can actually use it without restarting. - Adding an MCP for a task you're already in the middle of (e.g. PostHog MCP to query an analytics project you just created) forces a restart right when momentum matters.
Proposed fix
A /mcp reload slash command (or /mcp refresh) that re-reads the MCP config file and:
- Starts any newly-added servers
- Stops any removed servers
- Leaves existing servers untouched (or optionally restarts them with a flag like
/mcp reload --restart-all)
Bonus: automatically trigger a reload when claude mcp add / claude mcp remove is run from within an active session, since the config file is already being written.
Workaround today
Exit and relaunch, losing in-session memory of where you were.
Why this is small
The MCP loader already exists — it runs once at startup. Making it callable mid-session should be mostly a matter of exposing it via a slash command and handling the diff between current and new config. No protocol changes needed.
5 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This is also useful for injecting narrow-scoped credentials mid-session for JIT access.
Real-world use case: 8 restarts in one session while expanding MCP estate
We manage a platform with ~10 MCP servers (custom + Azure + Dataverse + GitHub + MS Enterprise). During a session that added 4 new MCPs, renamed one, and debugged auth on another, we hit the full-restart requirement 8 times in a single morning.
Pain points specific to our workflow:
/mcp reconnectonly re-SIGHUP's servers known at session start. New entries in.claude.json(or renamed keys) don't appear until full exit + relaunch. This is the primary blocker — we can't incrementally expand MCP tooling mid-session..claude.jsonedits before a single restart. But during debug cycles (auth fails, try different config, retry), batching isn't possible.What would help:
/mcp reconnect <name>re-reads.claude.jsonfor that specific entry (picks up new keys, changed paths, new env vars)/mcp add <name>registers a new MCP mid-session from.claude.jsonwithout touching existing servers/mcp remove <name>unloads a server mid-session (for dead entries that waste startup time)Environment: Claude Code CLI on headless Linux, Opus model, 10 MCP servers (6 stdio, 1 docker, 3 HTTP-proxied).
Thank you for your report — we are currently in the process of triaging MCP-related issues and this one appears to describe the same problem as #24057. To keep the discussion and any fix in one place, we're consolidating into that issue and closing this one. If you have logs, repro steps, or environment details that aren't already covered in #24057, please add them there — it'll help us track this down faster.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.