`claude mcp remove` does not kill the associated `mcp-remote` background process

Resolved 💬 3 comments Opened Feb 26, 2026 by raykudo Closed Mar 3, 2026

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

  1. Add an HTTP-transport MCP server:

``bash
claude mcp add --transport http notion https://mcp.notion.com/mcp
``

  1. This spawns a background mcp-remote process:

``
node .npm/_npx/.../mcp-remote https://mcp.notion.com/sse
npm exec mcp-remote https://mcp.notion.com/sse
``

  1. Remove the MCP server:

``bash
claude mcp remove notion
``

  1. 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-remote process 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)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗