The 3.0 release was named "Platform". The change is less about new analysis and more about where the output goes. One local build produces .tokencap/, and every surface reads from it: coding agents, MCP hosts, the Chrome companion, an SDK, and plugins.
The build
tokencap make Among other things, a full build writes:
-
.tokencap/agent/START_HERE.md, the entry point an agent reads first -
.tokencap/brain/knowledge.json, the knowledge base -
.tokencap/graph/graph-data.json, the dependency graph -
allowed-context.jsonandcontext-manifest.json, which point an agent at task-relevant files - the snapshot
Everything stays on disk. In v3.1, tokencap update, which runs npm, is the only command that uses the network.
Reader 1: coding agents
Agents that read files start at START_HERE.md. make also creates AGENTS.md when it is missing, and as of 3.1 it leaves a hand-written AGENTS.md alone. The npm package ships an Agent Skill at skills/tokencap/ for hosts that discover skills.
Reader 2: MCP hosts
tokencap serve --mcp --init tokencap serve --mcp --init --client vscode --init detects the host and writes its config where that host reads it: .mcp.json for Claude Code, .cursor/mcp.json for Cursor, .vscode/mcp.json for VS Code, .codex/config.toml for Codex. Claude Desktop and Windsurf use per-user files, so their entry adds --root <repo>.
The server answers initialize at once and builds in the background. Tools such as tokencap_overview, tokencap_files, tokencap_impact and tokencap_review read the same intelligence. In 3.1, tokencap_files uses the same retrieval as tokencap ask, so MCP and task packs agree on file order.
Reader 3: the Chrome companion
tokencap serve This binds a loopback bridge on 127.0.0.1:4545 with a pairing token and an origin allowlist. The companion gets a compressed, redacted, task-scoped pack. It never receives the raw .tokencap/ files.
Reader 4: the SDK (experimental)
@tokencap/sdk is a read-only interface to the generated artifacts:
const { loadIntelligence, getImpact, buildContext } = require("@tokencap/sdk"); const intelligence = await loadIntelligence("/workspace/my-project"); const impact = getImpact(intelligence, "src/payments/charge.js"); const context = buildContext(intelligence, { task: "Review the charge retry path", budget: 5000, }); It needs brain/knowledge.json and graph/graph-data.json to exist, and reports TOKENCAP_INTELLIGENCE_MISSING when they do not. It does not trigger a build, start a watcher, write files, or make network calls. Graph and impact answers are static evidence, and context token totals are character-based estimates.
It is not published to npm. npm install @tokencap/sdk is not a supported setup path today. The source ships with TokenCap for evaluation, and it will be published only after external projects show the small API is stable.
Reader 5: plugins
A project can list local plugin files in its own package.json:
{ "tokencapPlugins": ["./tools/tokencap-plugin.js"] } Plugins can provide afterBuild and beforeRedact hooks and named tools:
tokencap analyze plugins list tokencap analyze plugins run <tool-name> --text "input" They run with no require, process, or network, and can only read and write inside .tokencap/plugins/<name>/. The sandbox gets its own post.
Team intelligence
Shared rules, decisions and approvals live in Git under .tokencap/team/ as append-only records. No server, no cloud account, no commits on your behalf:
tokencap analyze team init --name "Platform" tokencap analyze team rule --author "Ava" --text "Changes to auth require review." Upgrading from v2
tokencap make --migrate tokencap make --migrate upgrades .tokencap/config.json to version 3, publishes schemas in .tokencap/schemas/, and writes .tokencap/migration.json. The next make produces the v3 artifact manifest.
The CLI is still seven commands: make, ask, analyze, serve, update, help, version. The v2 standalone aliases are gone and print their replacement instead (tokencap impact now points you to tokencap ask impact). The one exception is tokencap mcp, which still starts the MCP server so existing host configs keep working.
Docs and migration table at tokencap.vansharora.app
