fix(mcp): keep codegraph_explore loaded in Claude Code and Copilot CLI (#1696)

Claude Code defers every MCP tool behind ToolSearch by default, so a fresh session sees only the tool name until the model searches for it. The explore tool now carries `_meta: { "anthropic/alwaysLoad": true }`, which exempts it on existing installs, and the Claude Code installer target writes `alwaysLoad: true` on the server entry (re-running install adds the key to an older entry). Copilot CLI tool search holds MCP tools back the same way once ~30 tools are connected, so its entry carries `deferTools: "never"`.
This commit is contained in:
Aaron Queen
2026-09-08 03:23:33 -06:00
parent cd4e65b59c
commit 097cd19ad2
7 changed files with 86 additions and 6 deletions
+4 -1
View File
@@ -508,12 +508,15 @@ npm install -g @colbymchenry/codegraph
"codegraph": {
"type": "stdio",
"command": "codegraph",
"args": ["serve", "--mcp"]
"args": ["serve", "--mcp"],
"alwaysLoad": true
}
}
}
```
`alwaysLoad` keeps `codegraph_explore` loaded from the first prompt. Claude Code otherwise defers every MCP tool behind a tool-search step, so a fresh session sees only the tool's name until the model searches for it.
**Add to `~/.claude/settings.json` (optional, for auto-allow):**
```json
{