Code context for AI dev tools: pack-scoped, cited code retrieval over MCP.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
๐ก Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Know what your change breaks โ without your code leaving your machine.
karst gives any AI coding tool โ Cursor, Claude Desktop, a custom agent โ a local
map of your codebase. It answers questions with exact file:line citations and
walks a real call / import / inheritance graph to compute the blast radius of a
change โ "what else breaks if I touch this?" โ the question plain search and
agentic grep can't answer.
It runs 100% locally, speaks MCP (so it drops into any agent), and never calls an LLM itself โ your source code never leaves the box. As a bonus, pack-scoped retrieval cuts ~60% of the input tokens per question.
Regulated, air-gapped, or IP-sensitive team? karst is built for the environments cloud coding tools structurally can't enter โ fully offline, no telemetry, source you can audit. Start with the Compliance & Air-Gap Pack (attestation, network-egress table, pre-filled security questionnaire, offline install).
uvandpipxare the cleanest because they put thekarstcommand on your PATH automatically. With plainpip --user(notably Microsoft Store Python) the command may not be on PATH โ in that casepython -m karst โฆalways works, no PATH setup required.
Most "chat with your codebase" tools dump tens of thousands of vaguely-related tokens into the model on every question. You can't see what was loaded, you can't scope it, and the bill arrives at the end of the month. karst inverts that:
file:line. Verify, don't trust.Measured on a real 246-file NestJS + Next.js repo: 906 chunks indexed, re-index 343s โ 2.3s incremental, ~$0.019 per question on Sonnet 4.6 (shown before the call), 60% fewer tokens with packs attached.
karstcommand not found? Your Python Scripts dir isn't on PATH (common with Microsoft Store Python). Everything below works the same withpython -m karst โฆโ no PATH setup. (Or install viauv/pipx, which putkarston PATH for you.)
karst quickstart prints the exact follow-up commands with your index path
filled in. karst ask writes an LLM answer when ANTHROPIC_API_KEY /
OPENAI_API_KEY is set; otherwise add --no-llm for cited chunks (no key). The
MCP server below needs no key either โ your IDE supplies the model.
karst ships an MCP server (karst-mcp) exposing five tools โ search_code,
find_impact, list_packs, index_status, index_repository โ over stdio.
Claude Desktop (claude_desktop_config.json) or Cursor
(.cursor/mcp.json) โ pick whichever launcher you have:
uvx needs nothing pre-installed โ it fetches and runs karst on demand. Already
installed it? { "command": "karst-mcp" } works too. No PATH at all? Use
{ "command": "python", "args": ["-m", "karst.mcp_server"] }.
Restart the host, then ask normally โ it calls karst's tools when useful and gets back scoped, cited context. Full setup is in docs/MCP.md.
New here? Start with whichever fits you:
CALLS / IMPORTS / CONTAINS /
IMPLEMENTS edges powers impact analysis ("what depends on this?" โ including
which classes implement an interface or extend a base).auth,
billing). A query loads only its pack.file:line-cited chunks; your
host's model reasons over them.Everything is local and offline-capable (FastEmbed/ONNX embeddings, Qdrant local mode, sqlite caches โ no Docker, no daemon).
Live: AST chunking (6 languages), call/import graph + impact analysis,
pack-scoped retrieval, token + cost meter, incremental indexing + embedding
cache, diff code review with inline PR posting (review --pr --post-to-pr), and
the MCP server over both stdio and remote Streamable-HTTP (karst-mcp --http).
Coming next: hosted indexing, team-shared pack libraries, an autonomous GitHub
PR review bot, and OAuth for browser connectors (claude.ai / ChatGPT).
Apache-2.0. See LICENSE.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/karst)<a href="https://allmcps.com/mcp/karst"><img src="https://allmcps.com/api/badge/karst?style=directory" alt="Karst on AllMCPs" /></a>