Repository navigation
Description
Bug Description
Operating System: macOS Darwin 24.5.0
Node.js Version: v23.10.0 (via nvm)
Issue Description:
MCP servers consistently fail to connect in Claude Code, even though they are properly configured and the servers themselves work correctly when tested independently.
Steps to Reproduce:
- Install MCP server globally:
npm install -g @modelcontextprotocol/server-filesystem - Add MCP server to Claude Code:
claude mcp add filesystem "npx" "@modelcontextprotocol/server-filesystem" "/Users/username/Projects/" - Verify server is listed:
claude mcp list
Output shows: filesystem: npx @modelcontextprotocol/server-filesystem /Users/username/Projects/
- Start Claude Code:
claude - Attempt to use MCP tools - all fail with "MCP servers failed to connect"
Expected Behavior:
MCP servers should connect and be available for use within Claude Code.
Actual Behavior:
All MCP servers fail to connect, despite being properly configured and working when tested independently.
Additional Information:
- The MCP server works correctly when tested directly:
echo '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","clientInfo":{"name":"test","version":"1.0.0"},"capabilities":{}},"id":1}' | npx @modelcontextprotocol/server-filesystem /path/to/directory - Returns successful initialization response.
- Tried multiple configuration approaches:
- Using npx with -y flag
- Using direct node path with full path to server
- Creating .mcp.json in project directory
- Using --mcp-config flag with JSON file
- Importing from Claude Desktop config - No error logs are generated in any standard log locations.
- The same configuration works in Claude Desktop app but fails in Claude Code CLI.
Environment Details:
- Multiple MCP servers tested (filesystem, memory, github, etc.)
- All exhibit the same connection failure
- No permission issues (all files have correct permissions)
- PATH includes node/npm directories
This appears to be a fundamental issue with Claude Code's MCP integration rather than a configuration problem, as the servers work correctly outside of Claude Code.
Environment Info
- Platform: macos
- Terminal: pycharm
- Version: 1.0.11
- Feedback ID: 74d37a8d-973a-43c3-96ea-e43aa60b7888
Errors
[{"error":"AbortError: The operation was aborted\n at abortChildProcess (node:child_process:716:27)\n at onAbortListener (node:child_process:786:7)\n at process.processTicksAndRejections (node:internal/process/task_queues:85:11)","timestamp":"2025-06-04T23:03:51.295Z"},{"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 JZ (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:683:2402)\n at file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:11763\n at Q (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:17069)\n at LU (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:10909)\n at HG (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:10355)\n at lO2 (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2042:4758)","timestamp":"2025-06-04T23:03:51.321Z"},{"error":"Error: No logs found at /Users/davidandrews/Library/Caches/claude-cli-nodejs/-Users-davidandrews-PycharmProjects-lexgenius/messages\n at tT4 (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:583:3738)\n at iQ1 (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:583:3487)\n at OAA.<anonymous> (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2337:2015)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async OAA.parseAsync (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:517:4184)\n at async vE5 (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2340:5983)\n at async xE5 (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2336:17530)","timestamp":"2025-06-04T23:03:51.349Z"},{"error":"AbortError: The operation was aborted\n at abortChildProcess (node:child_process:716:27)\n at AbortSignal.onAbortListener (node:child_process:786:7)\n at [nodejs.internal.kHybridDispatch] (node:internal/event_target:827:20)\n at AbortSignal.dispatchEvent (node:internal/event_target:762:26)\n at runAbort (node:internal/abort_controller:449:10)\n at abortSignal (node:internal/abort_controller:435:3)\n at AbortController.abort (node:internal/abort_controller:468:5)\n at Timeout._onTimeout (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2336:15943)\n at listOnTimeout (node:internal/timers:611:17)\n at process.processTimers (node:internal/timers:546:7)","timestamp":"2025-06-04T23:03:54.232Z"},{"error":"ShellError: Shell command failed\n at Object.call (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1547:1326)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async pZ5 (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1889:19078)\n at async YK1 (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1889:17664)\n at async dZ5 (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1889:16706)\n at async hZ5 (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1889:16356)\n at async oe (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1889:15392)\n at async oe (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1889:16218)\n at async oe (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1889:16218)\n at async oe (file:///Users/davidandrews/.nvm/versions/node/v23.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1889:16218)","timestamp":"2025-06-04T23:05:14.363Z"},{"error":"ShellError: Shell command failed\n at Object.call (file:///Users/davidandrews/.nvm/versions/nodNote: Error logs were truncated.
Activity
afsheee commentedon Jun 6, 2025
was this fixed? i'm still having issues with claude code connecting to supabase mcp
leaanthony commentedon Jun 9, 2025
Same issue for basically any mcp server
banditFox commentedon Jun 12, 2025
Experiencing the same issue.
Restarting Claude several times and eventually it connects. But it's almost like the MCP server needs to be 'warmed up'?
A restart of claude, initiazes the app but page is blank. Go to settings, then closing settings, and then the page populates.
macOS: Sequoia 15.5
node version v22.16.0
UPDATE: Ok, folks. So some complexity here.
npm --versionwould returned a 'not recognized'.I'm still testing, but so far seems like it's working much faster and bettah.
In short;
vishwa-prabhath commentedon Jun 14, 2025
I have the same issue .I just had the demo server code in demo server python sdk . It also give me cant connect to the mcp server. Any suggestions?
ashwin-ant commentedon Jun 14, 2025
Can you try running
claude --debugto see if anything is displayed?vishwa-prabhath commentedon Jun 14, 2025
i tried to but i cant get to run claude debug .cli is not found and I dont think its the issue since im using python sdk.
edbyford commentedon Jun 22, 2025
Having the same problem with a couple of MCP servers.
pjgoodall commentedon Jun 24, 2025
wasted hours trying to get gitea MCP working with claude-code
27 remaining items
gogata05 commentedon Jul 28, 2025
2 days i cant setup any mcps inside claude code. The command in terminal "claude mcp list" shows that i have working mcps,but the command in CC "/mcp" shows 'No MCP servers configured'. I did everything and it always shows 'No MCP servers configured' error.
OS: Windows 10
Installation: npm-global (1.0.62)
Problem: "The interactive session of Claude Code does not load any user-configured MCP servers (neither from a project-level .mcp.json file nor from the global configuration set by claude mcp commands). The /mcp command shows 'No MCP servers configured', while the external claude mcp list command correctly shows connected servers. Debug logs confirm that only the built-in 'ide' MCP server is connected, with no attempts to load any others."
idrnet commentedon Jul 29, 2025
I think it's all in beta, not worth to waste time yet on this.
eugenio commentedon Aug 1, 2025
Starting Claude with --mcp-config /home/user/project-dir/.claude/settings.json shows the mcp server in Ubuntu 24.04. Without the said flag and path specification, the project MCP server doesn't get found.
spidey000 commentedon Aug 2, 2025
I had the same issue and saw this lines on .claude\settings.local.json on my local folder, deleting them made CC aware of the MCPs
"disabledMcpjsonServers": [
"supabase",
"chrome-devtools"
]
eugenio commentedon Aug 2, 2025
ewokee commentedon Aug 2, 2025
sad to see claude is that buggy. wasted hours with no solution.
ndarilek commentedon Aug 6, 2025
I'm having a similar but not quite identical issue, dropping a comment here in case it helps:
I've built an MCP server for my specific project, and set it up in .mcp.json. Claude Code sees the server, but it sees no capabilities, and as a result doesn't show any tools. I can't really install this server globally to tell if the local/global distinction makes a difference because it's very specific to my project and in fact actually detects when it's running from the target/ directory to enable debug mode.
The server seems to run fine. Claude wrote most of the server itself. If I manually send the capability/tool listing requests from the spec, things look fine. Claude even wrote a bunch of test shell and Python scripts to test the MCP server and claims the bug is on your end. :)
So this isn't quite the server not working--it shows as connected, but with no capabilities and thus no tools.
I'll note that initially the capabilities were empty until I discovered that they needed to contain "tools". I don't know if there's any caching happening--maybe my server is still referenced as exposing no tools even though I've fixed that bug on my end--but I've searched all the JSON config files I could find in my project/~/.claude* and didn't find anything obvious.
I also have the Puppeteer MCP server installed globally and it works fine. Unfortunately again, I can't install this one globally because it's specific to my project.
rsquaredg commentedon Aug 7, 2025
Make sure you kill all prior Claude tasks before restarting the MCP server. This had me stumped for a few hours yesterday. This Youtube video was helpful - https://www.youtube.com/watch?v=xcj_5xl1RNs&t=36s
rsquaredg commentedon Aug 7, 2025
Got it working finally. Lots of steps, including needing to run the outlook-auth-server.js locally via node.exe and open port 3333 to the internal network on the Windows firewall. I used Claude to help me troubleshoot and it saved a whole lot of time.
Here is the MCP project I used to connect Outlook / M365 to Claude - https://github.com/ryaker/outlook-mcp
Disclaimer - I have been in tech since 1983 but never became a coder. Currently in working in cybersecurity.
powext commentedon Aug 15, 2025
claude --debughelped me figure it out that i was missing docker
ShadowNineX commentedon Aug 22, 2025
I'm having the same issue.
I keep getting: Error: Not connected
And no. the issue is NOT my backend it is working via swagger etc.
As you can see my swagger is working perfectly so idk what the issue is.
EDIT: Of course it works when I start claude via --debug. Of course!!!!!
bcherny commentedon Aug 22, 2025
For folks hitting similar issues, debug by:
/mcpto verify whether your MCP server is found, and what its current status isclaude --debug) for more detailed MCP error output during startupClosing this issue. Please feel free to open a new issue if the steps above don't help.
github-actions commentedon Aug 30, 2025
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.