summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/opencode/src/mcp/index.ts3
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