Tool names containing slash cause an error
If my MCP server exposes even a single tool containing a slash (eg- github/git_commit), Claude throws the following error:
tools.203.custom.name: String should match pattern '^[a-zA-Z0-9_-]{1,64}$'
This is an issue with both Claude Code & Claude Desktop.
I understand that the error occurs because the RegExp doesn't allow slash in a tool name.
My question is why?
The MCP Spec itself doesn't have any such restriction in tool name.
So is it possible for Claude to allow slash in tool names?
Slashes are super useful during namespacing.
For example, my MCP Server is actually a Proxy and exposes multiple MCP servers. Each server can be behind its own namespace.
Eg: github/git_commit, github2/git_commit - where the tool is git_commit but the MCP servers are github and github2.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗