Skip to content
MCP server

Token Pilot

Cut the tokens AI coding assistants spend reading code with structural reads

Runs locally

Token Pilot is an MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Platforms
CLI
Runs
Locally
Version
2.0.0
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add token-pilot -- npx -y token-pilot

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "token-pilot": {
      "command": "npx",
      "args": [
        "-y",
        "token-pilot"
      ]
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "token-pilot": {
      "command": "npx",
      "args": [
        "-y",
        "token-pilot"
      ]
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "token-pilot": {
      "command": "npx",
      "args": [
        "-y",
        "token-pilot"
      ]
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "token-pilot": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "token-pilot"
      ]
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add token-pilot -- npx -y token-pilot

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.token-pilot]
command = "npx"
args = ["-y", "token-pilot"]

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "token-pilot": {
      "command": "npx",
      "args": [
        "-y",
        "token-pilot"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "token-pilot": {
          "command": "npx",
          "args": [
            "-y",
            "token-pilot"
          ]
        }
      }
    }

    Or run: gemini mcp add -s user token-pilot npx -- -y token-pilot

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "token-pilot": {
          "command": "npx",
          "args": [
            "-y",
            "token-pilot"
          ]
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "token-pilot": {
          "command": "npx",
          "args": [
            "-y",
            "token-pilot"
          ]
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "token-pilot": {
          "command": "npx",
          "args": [
            "-y",
            "token-pilot"
          ]
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "token-pilot": {
          "command": "npx",
          "args": [
            "-y",
            "token-pilot"
          ]
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "token-pilot": {
          "command": "npx",
          "args": [
            "-y",
            "token-pilot"
          ]
        }
      }
    }

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "token-pilot": {
          "command": "npx",
          "args": [
            "-y",
            "token-pilot"
          ]
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "token-pilot": {
          "command": "npx",
          "args": [
            "-y",
            "token-pilot"
          ]
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

About Token Pilot

Instead of loading whole files, Token Pilot hands an assistant an outline or a single function. The README's example: a 500-line file costs about 3,000 tokens to read, a 15-line outline about 200, one method about 350, and a post-edit diff about 20. Files under 200 lines come back whole. On its own benchmark of four public repos it reports 92 percent savings on outlines alone.

It has two layers. The MCP server exposes 25 tools for structural reads, symbol search, git analysis and session analytics, and PreToolUse hooks intercept heavy native Read, recursive Grep and unbounded git diff calls on Claude Code and Codex CLI. An enforcement mode setting (advisory, deny or strict) controls how hard it redirects; strict also caps output and refuses edits of code files not prepared with read_for_edit.

Setup is npx -y token-pilot init, which writes .mcp.json. Cursor, Gemini CLI, Cline and Antigravity get the MCP tools without hooks. It parses TypeScript, JavaScript, Python, Go, Rust, Java, Kotlin, C#, C/C++, PHP and Ruby.

Tools this server provides (6)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 5 of 6 tools read data; 1 name doesn't say.

From the server's own tool labels and tool names; not verified by us.

smart_readName suggests: reads
Returns a structural outline of a file instead of its full text.
read_symbolName suggests: reads
Loads a single function or method by name.
read_for_editName suggests: reads
Prepares code for editing; strict mode requires it before edits.
read_diffName suggests: reads
Shows what changed in a file after an edit.
find_usagesName suggests: reads
Finds where a symbol is used.
smart_log
Summarizes git history, capped to recent commits in strict mode.

What it does

Outline reads
smart_read returns a short outline instead of a full file.
Symbol reads
read_symbol loads one function or method by name.
Edit preparation
read_for_edit prepares a section for editing.
Diff after edits
read_diff shows only what changed after an edit.
Hooks
PreToolUse hooks redirect heavy Read, Grep and git diff calls on Claude Code and Codex CLI.
Enforcement modes
advisory, deny (default) or strict via TOKEN_PILOT_MODE.
Tool profiles
Trim the advertised tool list to save about 2k tokens per session.

Good for

  • Reduce context spend in long coding sessions
  • Navigate a large repo by symbol
  • Keep a premium model's main thread lean
  • Find usages of a function without grepping the tree

Token Pilot FAQ

Which clients does Token Pilot support?

MCP tools work in Claude Code, Codex CLI, Cursor, Gemini CLI, Cline and Antigravity; hooks only on Claude Code and Codex CLI.

How do I install Token Pilot?

Run npx -y token-pilot init, then restart your assistant.

Does Token Pilot change small files?

No. Files under 200 lines are returned in full.

Which languages does Token Pilot understand?

TypeScript, JavaScript, Python, Go, Rust, Java, Kotlin, C#, C/C++, PHP and Ruby, with regex fallback for others.

How do I add Token Pilot to Claude Code?

Run this command in your terminal: claude mcp add token-pilot -- npx -y token-pilot

What are the best alternatives to Token Pilot?

The closest alternatives to Token Pilot are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers