TokenCap
A local tool that packs only the files an AI coding task needs. It never uploads your code.

The problem
AI coding agents start every session cold. They burn tokens re-reading the codebase, and pasting folders into a chat can leak keys.
What we built
A local tool that maps every file and import in a repository, then packs only what a task needs.
It ships as a CLI and an MCP server, with VS Code and Chrome companions.
The limit we built in
Never uploads your code.
No network calls out, a local-only bridge, secrets redacted and no telemetry.
How it works.
AI coding agents get only the files a task needs, and the code never leaves your machine. Green boxes are the checks where a run can stop.
- Your repo leads to Tree-sitter parse.
- Tree-sitter parse leads to Rank files.
- Rank files leads to Fit a token budget.
- Fit a token budget leads to Redact secrets (a check that can stop the run).
- Redact secrets leads to 7 AI hosts.
- Redact secrets leads to MCP server.
The result.
- downloads: npm 6,712 + Open VSX 7,491, counted 25 Nov 2026
- 14,203
- fewer tokens than a keyword grep (median)
- 18.4x
- of the files each commit changed were in the pack
- 89%
- tokens per task
- 381k to 10k
Source: published figures only. Figures as published on tokencap.vansharora.app (benchmark v3.2.0): median over 100 real commits from 9 open-source repositories. Downloads are the live npm and Open VSX counts.
Who led it
Vansh AroraProduct and build
- Node.js
- MCP
- Tree-sitter
- js-tiktoken
Next project
Waymark
In early access: a milestone and collaboration portal for researchers and labs.

