TokenSave
Lets your AI agent query a local code graph instead of reading files, so it uses fewer tokens and tool calls.
691 stars on GitHubby aovestdipaperinoLicense MITUpdated 20 days ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Download the .mcpb file and open it with Claude Desktop.
Download the .mcpb file βReady! Now test it
Restart the app and paste one of these requests in the chat:
Find where user authentication is handled.
What would break if I change validateToken?
What it is
TokenSave indexes your project into a local semantic knowledge graph. Your coding agent asks the graph for symbols, callers and context instead of scanning many files, which saves tokens. Everything runs on your machine with no API keys, and it supports 50+ languages and many agents.
What it can do
- Smart context building for a task
- Semantic search by meaning
- Impact analysis: callers, callees and what a change affects
- Dead code detection
- Code-health metrics and test mapping
- Atomic edit primitives that re-index after writes
- Multi-branch indexing
When to use
- βΊWhen your agent spends many tool calls exploring a large codebase.
- βΊWhen you want to know what breaks before you change a function.
- βΊWhen you want to find code by meaning rather than exact text.
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
codegraphHelps your agent analyze an indexed codebase through its call graph, dependencies, dead code, hotspots and semantic search.graph-queryLets your agent query a code dependency graph to find callers, related components and the impact of a change before the code is edited.explore-codebaseHelps your agent find its way around an unfamiliar codebase by searching the code knowledge graph for modules and relationships.Frequently asked questions
Is it free and open source?
Yes, MIT licensed.
Does it send my code anywhere?
The readme says it is 100% local, with no data leaving your machine and no API keys. A privacy page lists any network calls.
Which agents does it work with?
Claude Code, Codex CLI, Gemini CLI, Cursor, Copilot, Kiro, Pi, Zed and more than a dozen others.
How many tools and languages?
The readme says 80+ tools and 50+ languages.
How does it stay up to date?
It checks freshness on each MCP call with a 30 second cooldown, and tokensave sync updates the index incrementally.
What does the index look like?
A .tokensave/ folder in your project holds the graph database.
If it does not work
- βΊRun tokensave doctor to check for common problems.
- βΊRun tokensave init in your project folder if no index exists.
- βΊRun tokensave install again after upgrading to refresh agent settings.
5 new skills a week. 1 minute to read.