TokenCap exposes repository intelligence through the Model Context Protocol (MCP). Your AI host queries focused questions about the repository live, during reasoning, on demand — saving up to 92% of context token budget.
Install TokenCap globally and run the single configuration command. TokenCap auto-detects your host IDE and wires configuration automatically.
1. Install TokenCap globally:
npm install -g tokencap2. Wire your IDE / MCP Host:
tokencap mcp --initWhen a workspace has multiple supported AI hosts, specify your host explicitly:
| Host IDE / Tool | Configuration Written | Init Command |
|---|---|---|
| Claude Code | .claude/mcp.json | tokencap mcp --init --client claude |
| Cursor | .cursor/mcp.json | tokencap mcp --init --client cursor |
| Windsurf | .windsurf/mcp.json | tokencap mcp --init --client windsurf |
| Cline / Roo Code | .cline/mcp.json | tokencap mcp --init --client cline |
| VS Code | .vscode/mcp.json | tokencap mcp --init --client vscode |
| Antigravity | .agents/mcp_config.json | tokencap mcp --init --client antigravity |
| Codex | .codex/config.toml | tokencap mcp --init --client codex |
In v1.5.0, users no longer need to run a manual tokencap make or tokencap watch process before using MCP.
.tokencap-notes.md updates.| Tool Name | Description | Example Input |
|---|---|---|
| tokencap_overview | Tech stack, cluster list, risk summary, last build time. | None |
| tokencap_files | Most relevant files for a task, ranked by graph + recency + risk. | { "query": "login bug" } |
| tokencap_search | Cross-layer search across brain, graph, constitution, and files. | { "query": "JWT token" } |
| tokencap_cluster | Full intelligence for one cluster: files, deps, risk, changes. | { "cluster": "Auth" } |
| tokencap_dependencies | Upstream providers + downstream consumers up to N hops. | { "target": "src/jwt.js" } |
| tokencap_constitution | Constitution rules scoped to a cluster, file, or rule ID. | { "file": "src/jwt.js" } |
| tokencap_impact | Blast radius of proposed changes: affected clusters & broken rules. | { "files": ["src/jwt.js"] } |
| tokencap_execution | Execution-contract guidance for the current engineering phase. | None |
| tokencap_verify | Test commands, test files, lint rules, and review checklist. | { "cluster": "Auth" } |
| tokencap_delta | What changed since last build — clusters, files, rules. | None |
| tokencap_mcp_status | Server uptime, cache hit rate, and per-endpoint call counts. | None |
Comparing traditional cold file loading vs v1.5 MCP service:
Sub-millisecond local handler processing times: