[BUG]  API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools.26.custom.name: String should match pattern '^[a-zA-Z0-9_-]{1,64}$'"}}

Resolved 💬 6 comments Opened Apr 23, 2025 by GratefulDave Closed Apr 25, 2025

Environment

  • Platform (select one):
  • Anthropic API
  • Claude CLI version: 0.2.79
  • Operating System: Mac OS
  • Terminal: Zsh

Bug Description

I recently added context7 mcp server which is when this issue started happening. This is the mcp-server.json in my local project. It's unclear as to where the global settings are stored.

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/{username}/PycharmProjects/",
        "/Users/{username}/Documents/"
      ]
    },
    "sequential-thinking": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sequential-thinking",
        "/Users/{username}/PycharmProjects/servers/src/sequentialthinking"
      ]
    },
    "memory": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-memory"
      ]
    },
    "github.com/modelcontextprotocol/servers/tree/main/src/puppeteer": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-puppeteer"
      ],
      "disabled": false,
      "autoApprove": []
    },
    "github.com/JetBrains/mcp-jetbrains": {
      "command": "npx",
      "args": [
        "-y",
        "@jetbrains/mcp-proxy"
      ],
      "disabled": false,
      "autoApprove": []
    },
    "github.com/zcaceres/fetch-mcp": {
      "command": "node",
      "args": [
        "/Users/{davidandrews}/PycharmProjects/fetch-mcp/dist/index.js"
      ],
      "disabled": false,
      "autoApprove": []
    },
    "github.com/upstash/context7-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp@latest"
      ],
      "disabled": false,
      "autoApprove": []
    }
  }
}


## Steps to Reproduce
1. Update `mcp-server.sjon` in local project.
2. Add literally any text to the prompt.

## Expected Behavior
I expect it to handle the prompt properly without an error.

## Actual Behavior
3. Receive the error: `API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools.26.custom.name: String should match pattern '^[a-zA-Z0-9_-]{1,64}$'"}}
`

## Additional Context
I'd love to know where Claude Coder's global mcp settings.json is stored...

View original on GitHub ↗

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