FrontendRemoteMcpToolDefinition.name validation error when many MCP servers are configured
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude Code fails with API validation error when registering MCP tool
definitions. The error occurs intermittently with the tool index changing
between sessions (observed at index 115 and 100), suggesting the issue is with
how tool names are generated server-side rather than a specific tool:
tools.100.FrontendRemoteMcpToolDefinition.name: String should match pattern
'^[a-zA-Z0-9_-]{1,64}$'
All locally-visible MCP tool names (228 checked) conform to the pattern — none
exceed 64 characters and all use only [a-zA-Z0-9_-]. The error appears to
originate from the API's internal naming of FrontendRemoteMcpToolDefinition
entries, not from the MCP servers themselves.
What Should Happen?
All MCP tool definitions should pass the API's own ^[a-zA-Z0-9_-]{1,64}$
validation, regardless of how many MCP servers are configured. The tool
registration should succeed without errors.
Error Messages/Logs
tools.115.FrontendRemoteMcpToolDefinition.name: String should match pattern
'^[a-zA-Z0-9_-]{1,64}$'
tools.100.FrontendRemoteMcpToolDefinition.name: String should match pattern
'^[a-zA-Z0-9_-]{1,64}$'
(Index changes between sessions — 115 first, then 100 after session restart)
Steps to Reproduce
- Configure multiple MCP servers (21 total in my case — see list below)
- Include 6 claude.ai remote integrations (Vercel, Supabase, Google Calendar,
Gmail, Canva, Asana)
- Include 12 local workspace-mcp servers for Google services
- Include plugin MCP servers (github, supabase, vercel, context7)
- Start a new Claude Code session
- The error appears during tool registration
MCP server list:
claude.ai Vercel, claude.ai Supabase, claude.ai Google Calendar,
claude.ai Gmail, claude.ai Canva, claude.ai Asana,
plugin:github:github, plugin:supabase:supabase, plugin:vercel:vercel,
plugin:context7:context7,
google-gmail, google-drive, google-calendar, google-docs,
google-sheets, google-tasks, google-contacts, google-slides,
google-forms, google-chat, google-appscript, google-search
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.81
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗