MCP integration

Code context engine

The flagship prom.codes MCP. It indexes your repository and serves grounded code retrieval to your agent — symbol-aware, hybrid, and benchmarked at recall@10 100% on 12 OSS repos.

@prom.codes/context-mcp is the flagship prom.codes server. It answers the question "what does this codebase actually look like?" — and it answers it with the real symbols and call sites, not hallucinated names. One search_code call replaces a grep → open-file → read loop: the agent gets the right code, ranked, with the snippet inline.

What makes it good

Most "RAG over code" splits files into fixed line windows and hopes the right chunk ranks. The context engine is symbol-aware end to end:

  • Tree-sitter parsing across 14 languages. Every file is parsed into its symbols — functions, classes, methods — with name, kind, container scope, export flag and the source body. No naive sliding window.
  • Hybrid retrieval, fused. Three signals are combined with Reciprocal Rank Fusion (RRF): lexical (BM25 over name + container + body), semantic (dense vectors over descriptor + path + body), and the symbol graph (1-hop expansion across defines / calls / imports / same-file edges).
  • Contextual embeddings. The dense channel embeds the real code body, not just a short descriptor — the single change that took file-recall from 75% to 100% (see results below).
  • Source-first ranking + optional rerank. Test/doc/example hits are demoted below source files, and an optional cross-encoder rerank reorders the top candidates for rank-1 precision.

For the full pipeline and the language table see Language coverage and MCP tools.

Results

The steering metric is file-localization recall, measured the SWE-bench way: for a real GitHub issue, did the engine surface the file the merged fix actually changed? It is fully deterministic — no LLM in the scoring loop.

MetricResult
Recall@10100% — the file to edit is in the top 10 on all 12 benchmarked repos
Recall@583–90%
MRR~0.71–0.79
Repos12 OSS projects, easy → hard (flask, requests … django, sympy, sphinx, scikit-learn, pytest, astropy, matplotlib)

The ten tools

search_code, get_symbol, get_file, find_references, find_callers, find_callees, expand_context, list_changed_since, framework_overview and list_workspaces. Open protocol — works with every MCP-aware editor and agent. Full signatures on MCP tools.

Sovereignty

Your raw code never leaves the machine. The local SQLite index lives outside the repo (~/.prometheus/<hash>.db); only short embedding text transits to the provider you configured, and a per-tenant region mode pins which providers may ever see it.

Install

The context engine is set up per editor — the config block is identical everywhere, only the file it goes in changes: Claude Desktop · Cursor · Visual Studio Code · Custom (stdio + HTTP). For the shared config and the four environment variables, start at Overview — all three.