LeanToken MCP Server

Token-bounded repository context for coding agents over MCP.

Local serverstdioGo

What is the LeanToken MCP server?

Token-bounded repository context for coding agents over MCP. The leantoken mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 10 defined tools rather than through you.

What it actually does

Local-first code intelligence for coding agents. Search code, inspect structure, read exact ranges, and explore Git history through a CLI and MCP server.

Its toolset

Everything the assistant can do here goes through one of these:

  • leantoken.context — Default materialized first call for autonomous broad triage; optional preview for human or control-plane review
  • leantoken.search — Prefer over grep/rg for ranked search; exhaustive text/regex calls can explicitly record or reuse complete query coverage
  • leantoken.files — Prefer over find/ls/glob for compact, ignore-aware path discovery
  • leantoken.outline — Inspect definitions, signatures, imports, and ranges without whole-file reads
  • leantoken.read — Prefer over cat/head/sed for one exact symbol or inclusive line range
  • leantoken.history — Read, batch-diff, or trace parsed symbols across immutable Git revisions
  • leantoken.json — Query, summarize, or compare bounded live JSON with paged keys and typed diagnostics
  • leantoken.receipt_rebase — Explicitly carry only same-path, same-coordinate, same-hash evidence into a newer completed generation
  • leantoken.savings — Report observed response accounting, hash suppression, failures, and explicit observation limits
  • Example — For a task like fix request cancellation during shutdown, an illustrative bounded result might look like this:

Adding it to your client

leantoken on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

When to reach for it

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. LeanToken's toolset — leantoken.context, leantoken.search, leantoken.files and 7 more — is a fair guide to whether it matches your workflow. It is maintained by morluto; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 10 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch LeanToken.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the leantoken mcp server does with a few real requests.

Available tools

ToolWhat it does
leantoken.contextDefault materialized first call for autonomous broad triage; optional preview for human or control-plane review.
leantoken.searchPrefer over grep/rg for ranked search; exhaustive text/regex calls can explicitly record or reuse complete query coverage.
leantoken.filesPrefer over find/ls/glob for compact, ignore-aware path discovery.
leantoken.outlineInspect definitions, signatures, imports, and ranges without whole-file reads.
leantoken.readPrefer over cat/head/sed for one exact symbol or inclusive line range.
leantoken.historyRead, batch-diff, or trace parsed symbols across immutable Git revisions.
leantoken.jsonQuery, summarize, or compare bounded live JSON with paged keys and typed diagnostics.
leantoken.receipt_rebaseExplicitly carry only same-path, same-coordinate, same-hash evidence into a newer completed generation.
leantoken.savingsReport observed response accounting, hash suppression, failures, and explicit observation limits.
ExampleFor a task like *fix request cancellation during shutdown*, an illustrative bounded result might look like this:

How to install the LeanToken MCP server

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

Add to claude_desktop_config.json, then restart Claude Desktop.

Example prompts to try

  • Use LeanToken to leantoken.context.
  • Use LeanToken to leantoken.search.
  • Use LeanToken to leantoken.files.

Frequently asked questions

It connects LeanToken to MCP-compatible AI assistants such as Claude and Cursor, exposing 10 tools (leantoken.context, leantoken.search, leantoken.files, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with LeanToken directly.