claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Claude Code CLI Isn't Detecting Project Scoped MCP Server

Open ceponatia opened this issue 7 months ago • 2 comments

Environment

  • Platform (select one):

    • [x] Anthropic API
  • Claude CLI version: 1.0.24 (Claude Code)

  • Operating System: Ubuntu 22.04 (WSL)

  • Terminal: Windows Terminal App (WSL)

Bug Description

Project scoped MCPs are no longer being detected when starting Claude in my project folder. I have had this working previously in other projects. I have tried creating the .mcp.json file myself in the project's root folder and I've also used the 'claude mcp add -s project -- xxx' command which successfully creates the .mcp.json file and returns a success message. When starting Claude, it does not show any MCP servers when using /mcp.

Steps to Reproduce

  1. Created .mcp.json and used:
{
  "mcpServers": {
    "supabase": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@supabase/mcp-server-supabase@latest",
        "--access-token=xxx"
      ],
      "env": {}
    }
  }
}
  1. Started Claude and checked /mcp. No servers detected.
  2. Deleted .mcp.json
  3. Used command claude mcp add supabase -s project -- npx -y @supabase/mcp-server-supabase@latest --access-token=xxx
  4. Started Claude, used /mcp. No mcp servers detected.
  5. 'Claude mcp list' also shows no mcp servers.

Actual Behavior

No MCP servers detected in Claude Code despite .mcp.json file being correctly created by command in step 5 above.

Additional Context

ceponatia avatar Jun 16 '25 16:06 ceponatia

This is also a bug on macOS 15.5.

jcavalieri avatar Jun 23 '25 16:06 jcavalieri

I had this issue but I just realized that in my project's .claude/settings.local.json I had my mcp server listed under disabledMcpjsonServers. Delete it out of there, relaunch claude, and you'll get another opportunity to okay it. Once I did that it was working

dargue3 avatar Jun 25 '25 22:06 dargue3

I had the same issue and @dargue3’s note fixed it for me. I don’t quite know how my server had found itself to disabledMcpjsonServers. Perhaps claude mcp list should report which servers are explicitly disabled by the user.

paulozoom avatar Jul 07 '25 09:07 paulozoom

~no fix for this still?~

Quick fix: add .mcp.json to .gitignore.

based64-eth avatar Jul 08 '25 10:07 based64-eth

I thought I was experiencing this until I realized it was just a syntax error in my JSON (missing comma). Claude doesn't complain about JSON errors in .mcp.json files like it does with the global ~/.claude.json file so do check for that.

timjrobinson avatar Jul 10 '25 08:07 timjrobinson

I thought I was experiencing this until I realized it was just a syntax error in my JSON (missing comma). Claude doesn't complain about JSON errors in .mcp.json files like it does with the global ~/.claude.json file so do check for that.

I thought this was the case too but the issue persists if I create the .mcp.json myself or if I let Claude do it with -s project. I've since just started using local and user scopes until this is resolved.

ceponatia avatar Jul 10 '25 11:07 ceponatia

This happened to me also.
Supabase MCP was working great yesterday, but then it started showing 0 tools. I had to restart Claude Code to get the 19 tools to show up.

tristanbob avatar Jul 27 '25 18:07 tristanbob

still happening

MarkAngler avatar Jul 31 '25 23:07 MarkAngler

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.

github-actions[bot] avatar Aug 14 '25 14:08 github-actions[bot]