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
MCP server names containing '__' break all native MCP tool calls (server not found) #1731
An MCP server whose name contains a double underscore (e.g. my__server) — a legal name per sanitizeMcpName — becomes completely unusable: every native MCP tool call for that server fails with "server not found".
Mechanism
buildMcpToolName("my__server", "do_thing") → mcp--my__server--do_thing (the sanitizer preserves _, collapses only --). But normalizeMcpToolName (src/utils/mcp-name.ts:55) splits on /__|--/, treating every __ as a separator, so the name parses to serverName: "my", toolName: "server--do_thing". The server lookup (findServerNameBySanitizedName) misses and the call deterministically fails; consecutiveMistakeCount increments each attempt.
Repro
Configure an MCP server named my__server (valid — it connects fine, tools are advertised).
Have the model call any of its advertised tools.
Result: "server not found" every time.
Suggested fix
Prefer the canonical -- separator when present (a raw -- can only be a separator since the sanitizer collapses it, while __ may be part of a legal name): split on -- if the name contains it, else fall back to the legacy __ split. Existing tool-name shapes keep working.
Activity