Commit 5463d5d
fix: enable tool activation for Claude clients in mcp-add
The mcp-add command was incorrectly skipping tool activation for Claude
clients based on the assumption that "Claude clients auto-refresh their
tool list". This assumption is incorrect.
When mcp-add is called with activate=true, tools were added to
g.toolRegistrations (accessible via mcp-exec) but NOT to g.mcpServer
(required for native MCP tool calls). This caused:
- mcp-add chromedev → success (26 tools registered)
- mcp-exec chromedev:list_pages → works (uses toolRegistrations)
- native call to chromedev:list_pages → "unknown tool" error
The fix removes the Claude client exclusion, allowing updateServerCapabilities()
to call g.mcpServer.AddTool() for all clients.
Related to #278 (tool-name-prefix dispatch fix)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 16a778f commit 5463d5d
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
213 | | - | |
214 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| |||
0 commit comments