
Token Pilot
Shrink context windows when agents read large repos by serving AST-aware structural views instead of whole files.
Overview
io.github.Digital-Threads/token-pilot is an MCP server for the Build phase that exposes AST-aware structural code reading to cut agent token use when exploring repositories.
What is this MCP server?
- AST-aware structural reading so agents see symbols and shape, not raw file dumps
- Vendor positioning: up to 80% fewer tokens when AI reads code (per project description)
- stdio npm package token-pilot for local MCP hosts
- Version 0.16.2 on MCP schema 2025-12-11
- Fits heavy refactor and onboarding sessions on monorepos and generated code
- npm package identifier token-pilot with stdio transport
- Repository: github.com/Digital-Threads/token-pilot
Community signal: 2 GitHub stars.
What problem does it solve?
Agents re-read whole files and flood the context window, making solo builds slower and more expensive than they need to be.
Who is it for?
Builders running long agent sessions on medium or large TypeScript/JavaScript codebases who need cheaper, smarter read operations.
Skip if: Projects where plain ripgrep and small files already fit the context budget, or stacks where AST structural tools add little over simple search.
What do I get? / Deliverables
Your agent can request compact structural snapshots of code so investigations use fewer tokens and leave room for actual edits.
- Lower-token structural views of source files for agent reasoning
- Faster orientation passes on unfamiliar modules during build
- MCP tool surface dedicated to efficient code reading
Recommended MCP Servers
Journey fit
Token spend spikes during build when agents explore unfamiliar codebases; structural reads belong on the agent-tooling shelf. Agent-tooling is where you wire MCP servers that change how the model ingests source—not the app runtime itself.
How it compares
Token-efficient code-reading MCP, not a replacement for semantic indexers or documentation skills.
Common Questions / FAQ
Who is token-pilot for?
Solo developers using MCP agents who frequently ask the model to scan, explain, or refactor large code trees and want to reduce read-phase token usage.
When should I use token-pilot?
Use it during build when onboarding to a repo, tracing call graphs, or planning refactors and full-file reads are dominating your context.
How do I add token-pilot to my agent?
Install the npm package token-pilot, register it as a stdio MCP server in your host configuration, restart the client, and use its structural read tools instead of default file dumps where supported.