You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[V2] MCP tool name longer than 64 characters blocks all MCP tools from every server #38808
When an MCP server exposes a tool whose name exceeds 64 characters, ToolRegistry.registerBatch rejects the complete MCP registration batch. Since all configured MCP servers are reconciled through one batch, tools from every server can be lost.
The registration flow currently validates every normalized tool segment with the provider-native name constraint before considering its placement:
This constraint is correct for tools exposed directly to a provider, but MCP tools default to Code Mode. In that placement, the only provider-facing tool name is execute; MCP names are internal Code Mode catalog paths, which support arbitrary non-empty path segments and bracket notation.
The MCP reconciler wraps registerBatch with Effect.orDie, so this typed registration failure becomes a defect and the fresh MCP registration scope never commits.
Expected behavior:
Code Mode registrations should not be subject to provider-native tool-name length constraints.
codemode: false registrations should validate their final flattened provider name, including the namespace prefix.
Registration should remain atomic rather than silently dropping declared tools.
Plugins
Any MCP server that exposes a tool with a name longer than 64 characters.
OpenCode version
V2
Steps to reproduce
Configure a custom MCP server that exposes one tool with a name longer than 64 characters, alongside another server with valid tools:
Activity
github-actions commentedon Jul 25, 2026
This issue might be a duplicate of existing issues. Please check:
patternfails the whole server connection (shown as "Authentication failed" for OAuth servers) #35624: Same root pattern — a single invalid MCP tool (in that case a bad JSON Schemapattern) causes the entire MCP server connection to fail, leaving all tools from all servers unavailable. The fix suggested there (isolate per-tool failures instead of aborting the batch) is essentially the same fix needed here.github-actions commentedon Sep 25, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.