Unhandled MCP Connection Closed Error in WebSocket Transport
Bug Description
node:internal/process/promises:394
triggerUncaughtException(err, true / fromPromise /);
^
cF [McpError]: MCP error -32000: Connection closed
at H2A._onclose (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1200:13174)
at _transport.onclose (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1200:12492)
at J.C.client.transport.onclose (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2615:6933)
at e9.onCloseHandler (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1212:8588)
at e9.emit (node:events:518:28)
at e9.emit (node:domain:489:12)
at e9.emitClose (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:71:69556)
at Socket.uSA (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:71:80028)
at Socket.emit (node:events:518:28)
at Socket.emit (node:domain:489:12) {
code: -32000,
data: undefined
}
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 1.0.55
- Feedback ID: 2d210066-acd4-4795-bff5-bbbc232dc224
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:882:11)\n at execSync (node:child_process:954:15)\n at q5 (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:727:4693)\n at file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:41282\n at Q (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:542:14406)\n at PF (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:39067)\n at $X (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:37933)\n at RB (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:43902)","timestamp":"2025-07-18T11:41:32.899Z"}]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗