readActiveMcpServers now resolves tool count via:
1. In-config tools array
2. Cached tools/list at \$HOME/.claude/config-audit/mcp-cache/<name>.json
3. node_modules/<pkg>/package.json (resolved from npx <pkg>)
4. Fallback: { toolCount: null, toolCountUnknown: true }
estimateTokens uses detected toolCount (heavy server > light server).
New fixture: mcp-tool-heavy/ with mocked node_modules/mcp-heavy/package.json (20 tools).
576 → 580 tests, all green.
|
||
|---|---|---|
| .. | ||
| fixtures | ||
| hooks | ||
| lib | ||
| scanners | ||