ZeroToken-MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ZeroToken-MCP
A local, zero-token semantic graph of your codebase, served to AI coding assistants over MCP.
AI assistants usually answer "where is authenticate defined and who calls it?" by opening whole files. That burns tens of thousands of context tokens on code the model never needed. ZeroToken-MCP parses your project once with tree-sitter, stores the symbol graph in an embedded SQLite database, and lets the assistant ask for exactly the slice it needs.
Local. Everything runs on your machine over stdio. No network, no API keys, no telemetry.
Zero tokens to index. Parsing and search are plain code. You only spend tokens on the small answers the assistant asks for.
Always current.
--watchre-parses a file the moment you save it. Even without it, the server re-checks a file's mtime before returning a definition or outline.Fast. Incremental indexing (unchanged files are skipped by mtime/size/hash) and SQLite FTS5 search.
Why it saves tokens
Task | Naive approach | With ZeroToken |
"What's in | Read the file (whole body, every method) |
|
"Show me | Read the file |
|
"Where is | grep + read each matching file |
|
"Find the config parser" | grep, open candidates |
|
About the numbers. The headline figure for a typical inspection task is on the order of ~200 tokens vs ~30,000 tokens: a handful of tool responses (a ranked search, one outline, one definition, one caller list, each a few dozen lines) versus reading several large source files in full. That is an illustrative scenario, not a universal benchmark: savings depend on file sizes and what you're doing. Measure your own repo: a rough estimate is
characters / 4, e.g.wc -c file.pyversus the length of the tool output.
Related MCP server: koragraph
30-second quickstart
git clone https://github.com/<you>/zerotoken-mcp && cd zerotoken-mcp
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .
zerotoken index /path/to/your/project # optional: pre-build the index
zerotoken serve --path /path/to/your/project --watch # what your MCP client will runThen add the server to your client (below) and ask it something like "Use zerotoken to find where parse_config is defined and who calls it."
Requirements: Python 3.10+, an SQLite build with FTS5 (standard in python.org, Homebrew, Debian/Ubuntu and Windows builds).
Client configuration
Use an absolute path to the executable if your client doesn't inherit your venv (find it with which zerotoken, or where zerotoken on Windows). You can also use "command": "/abs/path/.venv/bin/python", "args": ["-m", "zerotoken", "serve", ...].
Claude Desktop: claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"zerotoken": {
"command": "/abs/path/to/.venv/bin/zerotoken",
"args": ["serve", "--path", "/abs/path/to/your/project", "--watch"]
}
}
}Restart Claude Desktop afterwards.
Cursor: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
"mcpServers": {
"zerotoken": {
"command": "zerotoken",
"args": ["serve", "--path", "${workspaceFolder}", "--watch"]
}
}
}VS Code: .vscode/mcp.json
{
"servers": {
"zerotoken": {
"type": "stdio",
"command": "zerotoken",
"args": ["serve", "--path", "${workspaceFolder}", "--watch"]
}
}
}Claude Code
claude mcp add zerotoken -- zerotoken serve --path . --watchTools
Tool | Purpose |
| Fuzzy FTS search over symbol names and signatures. Splits |
| The exact source lines of one definition. Accepts |
| Classes, functions and method signatures with line ranges and one-line docs, no bodies. |
| Call sites and references (calls, |
Example get_file_outline output:
pkg/auth.py (python, 120 lines, 4 symbols)
class AuthService(Base) [10-90] # Handles login and sessions
def login(self, user, pw) -> bool [20-40]
async def refresh(self, token) [42-60]
def hash_password(pw) [92-100]CLI
zerotoken index <path> [--db FILE] [--full] [-v]
zerotoken serve [--path PATH] [--watch] [--db FILE]The database lives at
<project>/.zerotoken/zerotoken.dbby default (the folder ships its own.gitignore).servealways runs a background incremental sync on startup, so a stale database is repaired without blocking the MCP handshake. Tools answer immediately and note when indexing is still in progress.--watchkeeps the index live usingwatchdog, with debounced, per-file re-parsing.
What gets indexed
Languages: Python (
.py), JavaScript (.js .jsx .mjs .cjs), TypeScript (.ts .tsx).Symbols: functions, classes, methods, arrow/function-expression bindings (
const f = () => {}), class-field arrow methods, TS interfaces, type aliases and enums. Each stores signature, docstring/JSDoc, file, start and end line.Ignored:
.git,node_modules,__pycache__,.venv/venv,.env(dir or file),dist,build, caches,*.min.js, files over 2 MB, and anything containing NUL bytes.
Known limitations
find_callersmatches by name, not by resolved type. Two unrelatedsave()methods share results; each hit shows its enclosing function and source line to help you tell them apart.Functions nested inside other functions are not indexed (their calls are still attributed to the enclosing function).
Dynamic dispatch,
getattr, and string-based imports are invisible to a syntax-only index.Only Python and JS/TS today. Adding a language means adding an extractor in
indexer.pyand an entry inEXTENSION_LANGUAGE.
Development
pip install -e ".[dev]"
pytestThe extractor walks tree-sitter nodes directly instead of using Query objects, because the query API changed across tree-sitter 0.22 to 0.25 while the node API did not. That keeps one code path working over the whole supported version range.
Layout
zerotoken/
indexer.py tree-sitter extraction + SQLite/FTS5 store + incremental updates
server.py FastMCP stdio server and the four tools
watcher.py debounced watchdog thread for live re-indexing
cli.py `zerotoken index` / `zerotoken serve`
tests/ pytest suiteLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted code graph over MCP: exact callers, dependencies, and cross-repo blast radius for AI agents.
Repository knowledge graph MCP server for codebase understanding and debugging.
Shared context for your codebase: a hosted code knowledge graph over MCP. Free plan, OAuth sign-up.
Codebase knowledge graph — architectural awareness for AI coding agents via MCP
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to query a local, continuously updated symbol graph of a codebase, providing ranked search, caller/callee exploration, dependency paths, and git-diff impact analysis through MCP tools.10 npmApache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to query a local, multi-repo code graph for symbol exploration, blast radius analysis, co-change mining, and durable code-anchored memory via MCP tools.128 npm16Business Source 1.1
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to query a semantic code graph over MCP, retrieving exact function source, definitions, callers/callees, impact analysis, and minimal test selection instead of whole files.14Apache 2.0

Seshatofficial
AlicenseAqualityCmaintenanceEnables AI coding agents to query a compiled typed symbol graph over MCP, revealing real callers, callees, blast radius, data flow, constraints, dead code, and commit-history signals before editing. Supports repo syncing and ranked context retrieval so agents can avoid structural regressions.2760 npmMIT