diff options
| author | Aiden Cline <[email protected]> | 2025-08-01 09:11:40 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-01 09:11:40 -0500 |
| commit | 022c979d287a21e341adaa1fe8bab77a8f40eb39 (patch) | |
| tree | c4e1a7f711f3fce11f86b0ca2f56ea0821b1e5a6 | |
| parent | 4172e3ad2850249c606deb7b3c63c75702d5ad28 (diff) | |
| download | opencode-022c979d287a21e341adaa1fe8bab77a8f40eb39.tar.gz opencode-022c979d287a21e341adaa1fe8bab77a8f40eb39.zip | |
tweak: sanitize mcp server names (#831)
| -rw-r--r-- | packages/opencode/src/mcp/index.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/opencode/src/mcp/index.ts b/packages/opencode/src/mcp/index.ts index 65c1253f3..7057be511 100644 --- a/packages/opencode/src/mcp/index.ts +++ b/packages/opencode/src/mcp/index.ts @@ -115,7 +115,8 @@ export namespace MCP { const result: Record<string, Tool> = {} for (const [clientName, client] of Object.entries(await clients())) { for (const [toolName, tool] of Object.entries(await client.tools())) { - result[clientName + "_" + toolName] = tool + const sanitizedClientName = clientName.replace(/\s+/g, "_") + result[sanitizedClientName + "_" + toolName] = tool } } return result |
