Spaces in MCP server names break the MCP tools
Author: sdirixCreated Sep 15, 2026Updated Sep 17, 2026
Labelstheia-ai
Bug Description:
When a space is entered into a MCP server name, the tools will not be usable by Anthropic models nor OpenAI models.
Steps to Reproduce:
- Add a new MCP server with a space in it, e.g. "My server"
- Add some of its tools, they will have names like "mcp_My server_my_tool_A"
- Anthropic and OpenAI models fail with errors like
400 Invalid 'tools[0].function.name': string does not match pattern. Expected a string that matches the pattern '^[a-zA-Z0-9_-]+$'.
Additional Information
- Operating System: Ubuntu 24.04
- Theia Version: 1.75.0
Source: eclipse-theia/theia