Token Pilot logo

Token Pilot

AST-aware code reading, search, and git analysis tools that reduce context tokens for AI coding assistants.

Install Token Pilot

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "token-pilot": {
      "command": "npx",
      "args": [
        "-y",
        "token-pilot"
      ],
      "env": {
        "TOKEN_PILOT_MODE": "YOUR_VALUE_HERE",
        "MCP_TOOL_TIMEOUT": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Automated check passed— started and listed 25 tools correctly (12d ago).

Overview

The token-pilot MCP server provides AST-aware tools for reading code, finding symbols and usages, analyzing git changes, and routing modules. It returns outlines or targeted symbols instead of loading entire files, while hooks can redirect expensive native Read, Grep, and Bash calls. Reach for it when large repositories make code-reading context costly. Claude Code also gets optional tp-* subagents and enforcement modes.

Use cases

  • Reduce code-reading context in large repositories
  • Inspect one function or class without loading its file
  • Review compact git changes after an edit
  • Redirect recursive searches and large reads
  • Delegate Claude Code tasks through MCP-first subagents

Key features

  • AST-aware structural code reading
  • Symbol and usage discovery
  • Git analysis and compact diffs
  • PreToolUse hooks for heavy native calls
  • Claude Code tp-* subagents
  • Configurable advisory, deny, and strict modes

Tools25

What Token Pilot lets your agent do. Expand a tool for its parameters.

Verified live~4.9k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

12/12 checks healthy over the last 90d

What it can do

From the 25 tools this server returned when we ran it.

Runs commands · 1Handles credentials · 6Makes network requests · 1Read-only tools · 24
Network at startup5 connections
Files written at startup2
Install scriptspostinstall
npm provenanceNot published
Package age240 days
Maintainers1

Observed 2026-10-27 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 3d ago via OSV.dev · token-pilot (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars5Stargazers on the source repository.
npm downloads1.7kPackage downloads in the last 30 days.
Last commit3d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed25Callable tools this server registers over MCP.

How Token Pilot works

What token-pilot MCP server does

The token-pilot MCP server reduces the amount of source code and repository output sent to an AI coding assistant. Its MCP layer exposes 25 tools for structural reading, symbol lookup, git analysis, module routing, and session analytics. Instead of requiring an assistant to load a complete file, the tools can return an outline, a named symbol, or an edit-focused view.

Files shorter than 200 lines are returned in full. For larger files, smart_read can provide a compact structural outline, while read_symbol loads a specific function, class, or other named element. read_diff summarizes changes after editing. The README reports outline-only savings of up to 99% in some benchmark repositories, with 92% across the listed benchmark set; actual session savings also depend on how the assistant uses the other tools.

How it works

The token-pilot MCP server combines three mechanisms:

  • MCP tools replace broad file, search, and git reads with focused operations.
  • PreToolUse hooks inspect selected native calls and can allow, block, or redirect large Read, recursive Grep, and unbounded git diff-style operations.
  • tp-* subagents give Claude Code delegates an MCP-first workflow with model tiers and response budgets.

TOKEN_PILOT_MODE controls hook behavior. advisory allows calls and adds guidance, deny blocks or intercepts configured heavy operations, and strict applies the deny behavior plus output caps for selected MCP tools. The default is deny. Tool profiles can also reduce the tools advertised through tools/list, lowering the initial tool-description context.

Supported code languages include TypeScript, JavaScript, Python, Go, Rust, Java, Kotlin, C#, C/C++, PHP, and Ruby. JSON, YAML, Markdown, and TOML receive structural summaries, while a regex fallback covers many other languages.

Setup and configuration

Run npx -y token-pilot init to create or merge a .mcp.json entry and optionally install the tp-* subagents. Restart the AI client after setup. Claude Code can instead install the repository as a plugin with its marketplace commands. Other documented installation paths include a global npm installation, install-hook, and install-agents.

Claude Code receives MCP tools, hooks, and subagents. Codex CLI receives MCP tools and hooks after running the Codex hook installer. Cursor, Gemini CLI, and Cline receive MCP tools but not token-pilot-managed hooks. Hook support is therefore client-specific rather than a general property of every MCP connection.

Large repositories may need a higher MCP_TOOL_TIMEOUT during the initial AST index build. Later calls can use the cache. Background Claude Code sessions using an override MCP configuration must include token-pilot in that configuration if they need its tools.

Tools and capabilities

The token-pilot MCP server includes capabilities for:

  • Structural file outlines and targeted symbol reads
  • Edit-oriented reads and compact diffs
  • Symbol and usage discovery
  • Git history and change analysis
  • Module and repository navigation
  • Session analytics
  • Hook-based interception of costly native tool calls
  • Claude Code delegation through 25 tp-* subagents

Use smart_read when an outline is enough, read_symbol when a particular declaration is relevant, and read_diff when reviewing a recent change. The hooks are intended for environments where assistants otherwise issue broad native file, search, or shell commands.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Token Pilot

token-pilot is an MCP server that connects AI coding assistants to AST-aware code-reading, symbol-search, git-analysis, module-routing, and session-analytics tools. Its main tools include smart_read, read_symbol, read_for_edit, and read_diff, which return focused structural views instead of requiring complete files.

Run `npx -y token-pilot init` to create or merge the project `.mcp.json` configuration. The command can also prompt to install Claude Code `tp-*` subagents. Restart the client after setup.

Yes, Cursor can use token-pilot MCP tools. Cursor receives the MCP tools, but token-pilot does not currently write its PreToolUse hooks into Cursor's hook system.

Set `TOKEN_PILOT_MODE=deny` or `TOKEN_PILOT_MODE=strict` before starting token-pilot. `deny` is the default and intercepts configured heavy operations; `strict` also caps selected MCP outputs.

token-pilot supports TypeScript, JavaScript, Python, Go, Rust, Java, Kotlin, C#, C/C++, PHP, and Ruby. It also summarizes JSON, YAML, Markdown, and TOML structurally, with regex fallback support for many other languages.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewToken Pilot AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/token-pilot?style=directory)](https://allmcps.com/mcp/token-pilot)
HTML Embed
<a href="https://allmcps.com/mcp/token-pilot"><img src="https://allmcps.com/api/badge/token-pilot?style=directory" alt="Token Pilot on AllMCPs" /></a>