`claude mcp remove` does not kill the associated `mcp-remote` background process
Bug Description
When removing an MCP server configured with --transport http, claude mcp remove only deletes the configuration entry from ~/.claude.json but does not terminate the associated mcp-remote background process.
This causes the orphaned process to continue running indefinitely (in our case, since Monday — multiple days), periodically triggering OAuth re-authentication flows that open browser tabs without user action.
Steps to Reproduce
- Add an HTTP-transport MCP server:
``bash``
claude mcp add --transport http notion https://mcp.notion.com/mcp
- This spawns a background
mcp-remoteprocess:
````
node .npm/_npx/.../mcp-remote https://mcp.notion.com/sse
npm exec mcp-remote https://mcp.notion.com/sse
- Remove the MCP server:
``bash``
claude mcp remove notion
- Verify the process is still running:
``bash``
ps aux | grep mcp-remote
# → processes are still alive
Expected Behavior
claude mcp remove should also terminate any background processes (mcp-remote, etc.) that were spawned for the removed MCP server.
Actual Behavior
- Config is removed from
~/.claude.json✅ - Background
mcp-remoteprocess keeps running ❌ - The orphaned process periodically opens browser tabs for OAuth token refresh ❌
Workaround
Manually kill the orphaned processes:
ps aux | grep "mcp-remote.*notion" | grep -v grep
kill <PID1> <PID2>
Environment
- macOS (Darwin 25.2.0)
- Claude Code (latest as of 2026-02-26)
- MCP transport: HTTP (
--transport http)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗