claude-code - 💡(How to fix) Fix MCP connector: a single invalid tool name in tools/list rejects the entire connector with an opaque "conversation could not be found" error [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#57813Fetched 2026-05-11 03:24:42
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
labeled ×1

When a custom MCP connector returns a tools/list containing one tool whose name does not match ^[a-zA-Z0-9_-]{1,64}$, claude.ai rejects the entire tools array and the conversation cannot be created. The user-visible failure is two toasts:

  • tools.N.FrontendRemoteMcpToolDefinition.name: String should match pattern '^[a-zA-Z0-9_-]{1,64}$'
  • This conversation could not be found

No tool list is shown, no chat works, and there is no indication in the UI that the connector itself is the cause — users see "conversation not found" and assume claude.ai is broken.

Error Message

Array-level fail-closed at conversation create time, with a generic "not found" message that gives no actionable info. The user has to inspect network requests in devtools to see the real validation error.

Root Cause

When a custom MCP connector returns a tools/list containing one tool whose name does not match ^[a-zA-Z0-9_-]{1,64}$, claude.ai rejects the entire tools array and the conversation cannot be created. The user-visible failure is two toasts:

  • tools.N.FrontendRemoteMcpToolDefinition.name: String should match pattern '^[a-zA-Z0-9_-]{1,64}$'
  • This conversation could not be found

No tool list is shown, no chat works, and there is no indication in the UI that the connector itself is the cause — users see "conversation not found" and assume claude.ai is broken.

Fix Action

Fix / Workaround

Connector aggregating multiple MCP backends. One legacy backend exposed a generic /tools/{tool_name} FastAPI catch-all whose path-template leaked through the aggregator as a tool literally named browser_{tool_name}. Workaround: defensive regex check on the aggregator side, dropping tools whose names don't match ^[a-zA-Z0-9_-]{1,64}$ before they reach claude.ai.

RAW_BUFFERClick to expand / collapse

(filing here as the public Anthropic tracker — this is about the claude.ai web app's MCP connector validation, not Claude Code CLI. Please route as needed.)

Summary

When a custom MCP connector returns a tools/list containing one tool whose name does not match ^[a-zA-Z0-9_-]{1,64}$, claude.ai rejects the entire tools array and the conversation cannot be created. The user-visible failure is two toasts:

  • tools.N.FrontendRemoteMcpToolDefinition.name: String should match pattern '^[a-zA-Z0-9_-]{1,64}$'
  • This conversation could not be found

No tool list is shown, no chat works, and there is no indication in the UI that the connector itself is the cause — users see "conversation not found" and assume claude.ai is broken.

Reproduction

  1. Connect a custom MCP server to claude.ai (Settings → Connectors → Add custom).
  2. Have the server return a tools list with at least one entry whose name contains a {, }, ., :, /, or exceeds 64 chars (easy to trigger if your server aggregates other backends and one of them exposes a FastAPI catch-all route like /tools/{tool_name} whose path-template literal leaks into the tool name).
  3. Open a new chat with that connector enabled.
  4. Conversation creation fails. All other tools — including unrelated connectors — are unusable in that chat.

Expected behavior

One of:

  • Drop invalid tools individually with a logged client warning, keep the rest of the connector working.
  • Reject only the offending connector, with an explicit toast naming the connector and tool, not "conversation could not be found".
  • Validate at connector-registration time so the bad state can never reach a chat session.

Actual behavior

Array-level fail-closed at conversation create time, with a generic "not found" message that gives no actionable info. The user has to inspect network requests in devtools to see the real validation error.

Why it matters

A single misbehaving backend (often unrelated, e.g. a FastAPI server registered through an aggregator) takes down the entire claude.ai chat experience for that connector. Defensive code on the user side fixes one instance but the failure mode is brittle by design — discovery of the bad name only happens at the worst possible time.

Concrete instance

Connector aggregating multiple MCP backends. One legacy backend exposed a generic /tools/{tool_name} FastAPI catch-all whose path-template leaked through the aggregator as a tool literally named browser_{tool_name}. Workaround: defensive regex check on the aggregator side, dropping tools whose names don't match ^[a-zA-Z0-9_-]{1,64}$ before they reach claude.ai.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

One of:

  • Drop invalid tools individually with a logged client warning, keep the rest of the connector working.
  • Reject only the offending connector, with an explicit toast naming the connector and tool, not "conversation could not be found".
  • Validate at connector-registration time so the bad state can never reach a chat session.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix MCP connector: a single invalid tool name in tools/list rejects the entire connector with an opaque "conversation could not be found" error [1 participants]