[BUG] npx MCP servers fail to load after "claude update"

Resolved 💬 5 comments Opened Jun 29, 2025 by cheuk-cheng Closed Aug 20, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.37
  • Operating System: macOS 15.6
  • Terminal: Terminal app

Bug Description

All "npx -y <package>" MCP servers listed in ~/.claude.json file failed to load after I upgraded to Claude Code CLI 1.0.37. MCP servers that were invoked by running python3, uv, uvx continued to work fine.

Steps to Reproduce

  1. Run "claude update" to upgrade Claude Code CLI
  2. Enter "claude" to start a new Claude Code session
  3. Note that multiple "npx invoked" MCP servers fail to load in Claude Code session

Expected Behavior

npx related MCP servers listed in ~/.claude.json will continue to load in Claude Code

Actual Behavior

npx related MCP servers fail to load

Additional Context

The MCP transport/communication layer might have been refactored between 1.0.34 and 1.0.37.
npx related MCP server like (memory server from @modelcontextprotocol) fails with MCP log file snippet like below.

{
"debug": "Error stack: McpError: MCP error -32000: Connection closed\n at ui1._onclose (file:///opt/homebrew/Cellar/node/24.3.0/lib/node_modules/@anthropic-ai/claude-code/node_modules/@anthropic-ai/claude-code/cli.js:1333:14912)\n at _transport.onclose (file:///opt/homebrew/Cellar/node/24.3.0/lib/node_modules/@anthropic-ai/claude-code/node_modules/@anthropic-ai/claude-code/cli.js:1333:14231)\n at ChildProcess.<anonymous> (file:///opt/homebrew/Cellar/node/24.3.0/lib/node_modules/@anthropic-ai/claude-code/node_modules/@anthropic-ai/claude-code/cli.js:1335:1444)\n at ChildProcess.emit (node:events:507:28)\n at ChildProcess.emit (node:domain:489:12)\n at maybeClose (node:internal/child_process:1101:16)\n at Socket.<anonymous> (node:internal/child_process:457:11)\n at Socket.emit (node:events:507:28)\n at Socket.emit (node:domain:489:12)\n at Pipe.<anonymous> (node:net:346:12)",
"timestamp": "2025-06-29T19:47:08.217Z",
"sessionId": "798e0121-e092-480e-b5eb-88b04279614b",
"cwd": "/Users/cheng/my_project"
},
{
"error": "Connection failed: MCP error -32000: Connection closed",
"timestamp": "2025-06-29T19:47:08.218Z",
"sessionId": "798e0121-e092-480e-b5eb-88b04279614b",
"cwd": "/Users/cheng/my_project"
}

View original on GitHub ↗

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