Context Compiler
БесплатноНе проверенLocal context compiler for AI coding assistants — smallest correct context bundle with rationale
Описание
Local context compiler for AI coding assistants — smallest correct context bundle with rationale
README
An MCP server that indexes your codebase into a dependency graph and returns the smallest correct context for any coding task: exact line ranges per symbol, with a rationale for each one.
Runs entirely on your machine. No cloud, no LLM API calls, no embeddings server, no internet connection required. Your source code and task descriptions never leave your laptop. The base install is lightweight: pure Python, no GPU, no heavy ML framework.
Getting started
pip install claude-context-compiler
cd /your/project
context-compiler init
init indexes your codebase, registers the MCP server with Claude Code, and adds instructions to CLAUDE.md. Open Claude Code and it will call get_context automatically before reading files.
Requires Python 3.11+.
Multi-repo projects
context-compiler init --dependencies ../repo1,../repo2
Each repo is indexed separately. get_context queries all graphs and returns the best-matching symbols across all repos. The dependency list is saved and picked up automatically on next start.
Other commands
context-compiler index # re-index after large changes
context-compiler explain --task "<prompt>" # preview what context a task returns
Optional: semantic search
pip install "claude-context-compiler[semantic]"
Enables embedding-based fallback for cases where task terms don't appear in symbol names (e.g. "fix login flow" finds authenticate_user). Downloads a 23MB ONNX model once, no PyTorch required.
How it works
Every step runs locally with no external calls:
- Classify the task:
BUG_FIX,NEW_FEATURE, orREFACTOR(keyword scoring, no LLM) - Find entry nodes via BM25 over symbol names, file paths, and docstrings
- Traverse the dependency graph with a strategy tuned per task type
- Score candidates, enforce a token budget, return slices with rationale
The graph is stored in an embedded KuzuDB database in your project folder. No server process, no port, no auth.
Same repo + same task = same output, every time.
Output
{
"slices": [
{
"file_path": "/abs/path/payments/processor.py",
"line_start": 6,
"line_end": 24,
"rationale": "Included PaymentProcessor as primary task location (matched 'payment')"
},
{
"file_path": "/abs/path/payments/retry_handler.py",
"line_start": 12,
"line_end": 38,
"rationale": "Included RetryHandler because it is called by PaymentProcessor (depth 1)"
}
]
}
Each slice points to the specific function or class that's relevant. A 500-line file with one relevant function costs ~40 tokens, not 500.
Supported languages
| Language | Parsing |
|---|---|
| Python | tree-sitter-python |
| TypeScript / TSX | tree-sitter-typescript |
| JavaScript / JSX | tree-sitter-javascript |
License
Apache 2.0
Установка Context Compiler
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/bytewise-ca/context-compilerFAQ
Context Compiler MCP бесплатный?
Да, Context Compiler MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Context Compiler?
Нет, Context Compiler работает без API-ключей и переменных окружения.
Context Compiler — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Context Compiler в Claude Desktop, Claude Code или Cursor?
Открой Context Compiler на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare Context Compiler with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
