MCP server for Claude Code

Claude Code reads too many files.
larkx fixes that.

larkx indexes your codebase once and exposes a compact graph through MCP. Claude Code reads only the detail level it needs, often reducing token usage substantially, and focused tasks can save much more.

Why Claude Code burns through tokens

Without a structured index, Claude reads raw source files to understand your project. A 300-file TypeScript repo can cost ~480K tokens just to orient itself, before writing a single line of code. That adds up fast.

Four context levels, you pick the cost

LevelWhat you getTypical costBest for
Level 1File paths~1–2K tokensNavigation, find a file
Level 2Symbols~8–10K tokensFind a function, list exports
Level 3Signatures~16K tokensUnderstand an API surface
Level 4AI summaries~24K tokensDeep understanding, refactoring
Without larkxRaw source files~480K tokensEverything, every time

Set up in under 5 minutes

1Install larkxnpm install -g larkx
2Run init in your projectcd my-project && larkx init
3Build the indexlarkx index
4Start the MCP serverlarkx serve

What Claude Code gets access to

get_project_index

Full codebase map at any detail level. Claude picks Level 1–4 based on what the task needs.

search_symbol

Find any function, class, or export across the codebase in one call.

get_impact

See what breaks if a function changes, call graph traversal, not guessing.

get_dead_code

BFS from entry points to surface unreachable code before it ships.

Common questions

Why does Claude Code use so many tokens?

Claude Code reads source files directly. On a larger project, reading the full codebase can consume hundreds of thousands of tokens in a session. larkx replaces that with a compact graph, and Claude can pick the detail level it needs instead of reading whole files.

How does larkx connect to Claude Code?

larkx runs as an MCP (Model Context Protocol) server. larkx init writes the .mcp.json config automatically and creates a CLAUDE.md so Claude knows which tools to call.

Will larkx break my existing Claude Code setup?

No. larkx adds to your setup - it does not replace any existing MCP servers or configuration. You can remove it any time by deleting .mcp.json.

Does larkx send my code anywhere?

No. larkx runs entirely on your machine. The index is stored locally in .larkx/. No telemetry, no cloud upload.

How long does indexing take?

Initial index: under 60 seconds for most projects. Re-indexing is near-instant because larkx only processes changed files using SHA-256 hashing.

Ready to cut Claude Code token costs?

Free and open source. Works with any project.