[BUG] Cannot get any MCP tool calls working at all in Claude Code, despite them working in Claude Desktop

Resolved 💬 6 comments Opened Mar 13, 2025 by SamFold Closed Mar 25, 2025

Environment

  • Platform (select one):
  • [ X] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 0.2.39
  • Operating System: Mac OS 15.3.1
  • Terminal: iTerm2

Bug Description

I have tools for say Google Searches and Web Scraping which both work fine in Claude Desktop app.

I then added these tools to Claude Code using claude mcp add-from-claude-desktop.

I see those servers as connected when I run Claude Code. E.g. google-search "connected"

However, when I try and get claude code to run these tools I always get the same error no matter my prompt:

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

Steps to Reproduce

  1. Add a tool to local Claude desktop app. E.g. https://github.com/adenot/mcp-google-search
  2. Confirm tool works in Claude desktop
  3. Add tool to Claude Code and try and make it work.

Expected Behavior

I expect Claude Code to run the Google Search

Actual Behavior

Claude Code produced the folowing error:
⎿  API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools.11.custom.name: String should match pattern '^[a-zA-Z0-9_-]{1,64}$'"}}

Additional Context

No other context.

<img width="1334" alt="Image" src="https://github.com/user-attachments/assets/bc403226-32d4-4770-97a9-683580cdfeab" />

View original on GitHub ↗

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