[BUG] Port conflict when multiple mcp-remote instances start simultaneously

Resolved 💬 5 comments Opened Dec 25, 2025 by iPavan035 Closed Feb 14, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When Claude Desktop starts with multiple remote MCP servers requiring OAuth authentication, all mcp-remote instances try to bind to port 3519 simultaneously. Only the first server succeeds - others fail with EADDRINUSE errors and never connect.

This makes it impossible to use multiple remote OAuth-protected MCP services together (like Zapier MCP + custom FastMCP servers).

What Should Happen?

All configured remote MCP servers should complete OAuth flows independently and connect successfully without port conflicts.

Error Messages/Logs

Error Messages/Logs

  [stderr] [97537] Using automatically selected callback port: 3519
  [stderr] [97537] Browser opened automatically.
  [stderr] node:events:502
        throw er; // Unhandled 'error' event
        ^

  Error: listen EADDRINUSE: address already in use 127.0.0.1:3519
      at Server.setupListenHandle [as _listen2] (node:net:1908:16)
      at listenInCluster (node:net:1965:12)
      at doListen (node:net:2139:7)
  Emitted 'error' event on Server instance at:
      at emitErrorNT (node:net:1944:8) {
    code: 'EADDRINUSE',
    errno: -48,
    syscall: 'listen',
    address: '127.0.0.1',
    port: 3519
  }

Steps to Reproduce

  1. Configure multiple remote OAuth MCP servers in claude_desktop_config.json:

{
"mcpServers": {
"zapier-mcp": {
"command": "npx",
"args": ["mcp-remote", "https://mcp.zapier.com/api/mcp/s/[token]/mcp"]
},
"fx-currency-mcp": {
"command": "npx",
"args": ["mcp-remote", "https://ai-fx-currency-mcp-v1-1.onrender.com/mcp"]
}
}
}

  1. Clear OAuth cache: rm -rf ~/.mcp-auth/mcp-remote-*
  1. Quit Claude Desktop completely
  1. Start Claude Desktop
  1. Observe only the first server connects; others fail with EADDRINUSE on port 3519

Verification: With only ONE remote OAuth server configured, it works perfectly.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Latest (December 2025)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

Claude desktop app:

Root Cause: Each mcp-remote instance tries to start an OAuth callback server on the same port (3519). When Claude Desktop launches all servers simultaneously, they race for the port - only the first succeeds.

Impact: High - blocks using multiple remote MCP services together. As MCP adoption grows, this will become a critical limitation.

Workaround: Pre-authenticate servers individually:

VS Code comparison: VS Code handles this correctly (possibly via sequential startup).

Suggested fix: Start OAuth-enabled MCP servers sequentially instead of in parallel, or implement a shared OAuth callback coordinator.

View original on GitHub ↗

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