CodeKB-MCP
OfficialProvides tools to summarize Git changes and compute typed AST diffs across branches and commits.
heliosdb-codekb-mcp
Local MCP server for code+docs knowledge bases. Embeds
HeliosDB-Nano as a Rust
library (code-graph, graph-rag, mcp-endpoint, code-embed
features) and exposes its LSP-shaped + GraphRAG tools to Claude Code,
Cursor, Codex, Aider, and any other MCP-aware agent. The recommended
transport is a loopback HTTP daemon (127.0.0.1) so local clients share
one warm embedded KB process instead of starting competing stdio
processes.
What this buys you: fewer broad-repo discovery turns, smaller
tool payloads, reusable code/doc context across Claude Code and Codex,
and evidence-carrying answers instead of ad hoc Read/Grep tours.
It is strongest on monorepos and portfolio-scale work where the agent
would otherwise repeatedly rediscover the same architecture, docs, and
file map.
Published release: 0.2.5 on crates.io. It adds HTTP-first setup,
doctor, compact helios(action, args) routing, exact file_lookup /
doc_lookup, and repo-inventory fallback for fast portfolio KBs.
Benchmark context: v0.2.1 headline (qwen3-coder:30b on
/home/gpc/HDB/Full): −37.2 % model tokens vs no-MCP across 15 dev
questions (full report
in MCP_ECOSYSTEM_BENCHMARK_REPORT_2026-05-27.md).
Biggest single-question wins: −76 k, −69 k, −47 k tokens on
broad-architecture queries. See Honest caveats for
the workloads where Read+Grep is still cheaper.
On the newer /home/app/Helios portfolio re-test for v0.2.4/v0.2.5, the best
full run observed −28.7 % model tokens with a warm loopback HTTP MCP
daemon. A later routing run measured −19.4 %. That is still a real
improvement, but not a universal win; exact narrow lookups can still be
cheaper with raw local search.
Why it improves answer quality, not just token count
The bench measures cost. But the reason MCP wins on broad questions isn't just compression — it's that the wrapper layer gives the model better-grounded raw material to reason from. Every quality lever also reduces tokens; both directions point the same way.
Quality lever | What changes for the agent |
Pre-distilled answer cards ( | Every wrapper response carries a |
| One entry point that inspects the question and picks the right sub-wrapper (repo summary / outline-first / symbol card / doc drill). Stops the model from going down the wrong path (e.g. grep when it should outline-first). On the Full bench this picked correctly on most questions; the report calls out where it didn't and what would fix it. |
Exact file/doc lookup wrappers |
|
LLM-distilled symbol summaries (Phase 2 ingest) | Each public symbol gets a one-sentence purpose summary generated ONCE at ingest by a code-aware model (e.g. |
Cross-modal | When the agent searches "FastEmbedder", the response includes the symbol AND the doc passages that name it. The agent verifies the doc claim against the actual code in one round-trip instead of having to grep both surfaces independently and stitch results. |
PageRank-ranked file index |
|
Typed AST diff for "what changed" |
|
Bounded-by-design responses | Wrappers cap result counts ( |
Compact one-tool surface |
|
Related MCP server: ClaudeX
When the plugin earns its keep
Scenario | What you get |
Broad architecture / cross-cutting questions | "Describe the WAL flushing path", "where does foreign-key validation happen", "what modules depend on storage" — these are the questions where MCP saved 47-76 k tokens per question on the Full bench. Read+Grep here sends the agent on a 20+ turn grep tour; MCP lands in 3-6 turns with citations. |
Cross-modal queries ("which doc section mentions the |
|
"What did this look like before" (time-travel / branch / commit diff) |
|
Catastrophe prevention on multi-turn tours | On the canonical Haiku bench, Opus hit its budget cap on 5/10 questions WITHOUT MCP (no answer); Haiku burned 22-32 grep+read turns on the same questions. WITH MCP, the same questions land in 3-6 turns. This stabilises the tail, not always the median. |
Doc-heavy workflows | Heading-chunked |
Exact path questions |
|
Honest caveats
Direct symbol lookups can still be cheaper through raw Read+Grep when the agent already knows the exact file and only needs a tiny span. The v0.2.4
file_lookup/doc_lookupwrappers remove the worst exact-path regression, but symbol-card coverage still matters for "public types in crate X" style questions.Symbol-card population is content-hash-gated. If
helios_symbol_cardreturns{"status": "not_found"}, re-runingestto backfill the cards. The Full benchmark report has a "Recommended Next Work" section calling out the cases where card coverage matters most.Cold-start cost is high on benchmarks because each WITH-MCP run launches a fresh
servesubprocess. Real agent sessions keep the server warm; the per-question cold start ratio improves with longer sessions.Full portfolio code-graph indexing still has an engine bottleneck. Nano 3.36.1's cross-file resolver can become a long serial phase on very large KBs. Fast ingest mode remains useful for file/doc lookup and GraphRAG, but deep symbol cards need the engine-side resolver work to become adoption-grade on the largest portfolios.
Engine-side FRs are queued. Four engine improvements would unlock another step-change in both quality and cost — tracked in
ENGINE_FRS_FROM_CODEKB_2026-05-26.md. FR #1 (FK validation throughput) is the prerequisite for benching on/home/gpc/HDB-scale (10 k+ files) corpora; FR #4 (tools/list verbose=false) would compose with the existing--mega-toolfor even smaller catalogue payloads.
Use the plugin when the cross-modal / time-travel / catastrophe-prevention / answer-grounding value matters. The aggregate token win on broad workloads (−37 % on Full) is a bonus; the per-answer quality lift is the durable value.
Install
Step 1 — install the heliosdb-codekb-mcp binary
cargo install heliosdb-codekb-mcp
# binary lands at ~/.cargo/bin/heliosdb-codekb-mcpThis is the recommended path for every platform (Linux x86_64,
Linux aarch64, macOS Intel, macOS Apple Silicon). Current source
version and crates.io release:
0.2.5.
First build pulls the engine (heliosdb-nano) and is slow (~10 min);
subsequent updates are cached.
A stripped Linux x86_64 binary is attached to the GitHub release for
tagged versions that publish binary artifacts. Use this if your machine
doesn't have a Rust toolchain handy. The links below currently point at
the latest binary artifact set (v0.2.3); use cargo install heliosdb-codekb-mcp for the crates.io 0.2.5 release.
curl -L \
https://github.com/HeliosDatabase/HeliosDB-CodeKB-MCP/releases/download/v0.2.3/heliosdb-codekb-mcp-linux-x86_64 \
-o ~/.local/bin/heliosdb-codekb-mcp
chmod +x ~/.local/bin/heliosdb-codekb-mcp
# Optional but recommended: verify
curl -sL https://github.com/HeliosDatabase/HeliosDB-CodeKB-MCP/releases/download/v0.2.3/heliosdb-codekb-mcp-linux-x86_64.sha256 \
| sha256sum -c -macOS x86_64 binaries are also attached to tagged releases. Linux
aarch64 / macOS Apple Silicon users should use
cargo install heliosdb-codekb-mcp until native release artifacts are
published.
git clone https://github.com/HeliosDatabase/HeliosDB-CodeKB-MCP
cd heliosdb-codekb-mcp
cargo build --release --features native-binary-docs
# binary: ./target/release/heliosdb-codekb-mcpStep 2 — index your project
Once per source-tree you want indexed:
heliosdb-codekb-mcp init --source /abs/path/to/your/project \
--mode co-located --ingestco-located puts the KB at <project>/.helios-kb (auto-gitignored).
See KB-location modes for global / hybrid.
Step 3 — wire it into your agent
The binary is now ready. Pick your agent below.
This repository also ships ready-to-merge templates under
install/ for the /home/app/Helios portfolio KB:
install/claude-code.mcp.json and install/codex.config.toml.
Start the local MCP daemon
Run one server per KB and keep it running for all local agents:
heliosdb-codekb-mcp serve --source /abs/path/to/your/project \
--http 127.0.0.1:8765 --wrapper-cache-size 128The HTTP transport refuses non-loopback binds by default. To expose it
outside the machine, set HELIOS_ALLOW_NON_LOOPBACK_HTTP=1
intentionally and only on a trusted network.
Claude Code (claude-code)
Per-project .mcp.json:
{
"mcpServers": {
"helios": {
"type": "http",
"url": "http://127.0.0.1:8765/"
}
}
}--mega-tool is the default since v0.2.0, so the daemon advertises the
compact one-tool surface automatically unless you explicitly configure
profile mode.
As a Claude Code plugin (gets you the /codekb-setup,
/codekb-ingest, /codekb-status slash commands + the
codekb-pro-features skill on top of the MCP server):
# One-time install from the repo's plugin manifest
claude --plugin-dir /abs/path/to/heliosdb-codekb-mcpOr, after a plugin marketplace publish:
/plugin install heliosdb-codekb-mcp. First run /codekb-setup
walks through binary install / embeddings / ingest in one flow.
OpenAI CODEX (codex CLI)
Add the server to ~/.codex/config.toml:
[mcp_servers.helios]
url = "http://127.0.0.1:8765/"To switch projects, run a different loopback port and add another named
server (helios-foo, helios-bar, …). Verify the server is registered
with:
codex --print mcp_serversThen start a session as usual; the helios(action, args) tool should
appear in the tool list. If CODEX reports the server is unreachable,
run:
heliosdb-codekb-mcp doctor --source /abs/path/to/your/project \
--mcp-url http://127.0.0.1:8765Cursor / Continue / other MCP clients
heliosdb-codekb-mcp serve --source /abs/path \
--http 127.0.0.1:8765 --wrapper-cache-size 128Then point the client at:
Route | Method | Purpose |
| JSON-RPC 2.0 | Standard MCP request channel |
| WebSocket upgrade | Bidirectional stream |
| Server-sent events | Progress notifications |
| One-shot discovery + cache stats |
The HTTP gateway honours --mega-tool, --profile, and
--strip-tool-descriptions the same way the stdio path does.
Step 4 — verify
heliosdb-codekb-mcp status --source /abs/path/to/your/projectYou should see kb-on-disk : exists and a non-zero row count. If
status reports an interrupted ingest, just re-run
heliosdb-codekb-mcp ingest --source <path> — the checkpoint resumes
from the last completed phase.
What it is
Three things at once:
A user-level config tool. Run
init --source <PATH> --mode <co-located|global|hybrid>once per source-directory you want indexed. The choice persists in${XDG_CONFIG_HOME:-~/.config}/heliosdb-codekb-mcp/config.toml.A KB resolver. Given a source path, finds the right KB directory using the persisted config (with longest-prefix match for hybrid setups that span multiple sub-trees).
The local MCP server.
serve --source <PATH>opens anEmbeddedDatabaserooted at that source's KB. Prefer--http 127.0.0.1:<port>for Claude Code/Codex multi-session use; stdio remains available as a fallback. Most query tools (helios_lsp_*,helios_graphrag_search,helios_ast_diff, …) come from the engine library, while this binary owns config, transport, compact wrappers, and answer-card shaping.
KB-location modes
Mode | Where the KB lives | Use when |
|
| Single repo, KB travels with the code. |
|
| Many independent projects on one machine. |
| An explicit | Multi-repo aggregate (e.g. |
Document ingestion (default tier — no Docling)
Out of the box, ingestion uses pure-Rust crates. Single static binary, no Python, no Docker. Covers ~80% of real-world content:
Format | Backend |
| tree-sitter via the engine's |
| tree-sitter Markdown / generic text |
| |
| |
|
Document ingestion (--features docling)
Build with --features docling and the binary additionally routes:
Format | Backend (via engine |
Scanned / OCR-required PDFs | Docling layout + OCR |
Multi-column scientific PDFs | Docling table & formula extraction |
| Docling Office pipeline |
Audio ( | Docling Whisper-pipeline |
Images ( | Docling OCR |
This tier requires a docling-serve HTTP endpoint to be running
(host-managed, or via the helios-code-graph plugin's bundled
compose stack).
Day-2 operations
After Install:
# Refresh the KB after meaningful source changes
heliosdb-codekb-mcp ingest --source /abs/path/to/your/project
# Inspect / sanity-check
heliosdb-codekb-mcp status # global summary
heliosdb-codekb-mcp status --source /abs/path # per-KB row counts
heliosdb-codekb-mcp status --source /abs/path \
--mcp-url http://127.0.0.1:8765 # live cache stats (HTTP mode)
heliosdb-codekb-mcp config show # raw TOML config
# Re-ingest with LLM distillation (one-sentence symbol summaries via
# a self-hosted Ollama / qwen3-coder endpoint). Opt-in; slow first
# pass, incremental after.
heliosdb-codekb-mcp ingest --source /abs/path \
--with-llm-distill \
--llm-distill-endpoint http://ollama:11434 \
--llm-distill-model qwen3-coder:30b \
--llm-distill-batch-size 8Ingest tiers
Three knobs, picked at init --ingest or ingest time, scaling
quality vs. wall time on the pilot corpus
(~/Helios/Nano, 666 files / 18 k symbols / 115 k refs):
Tier | Flag | Pilot wall | What lights up |
fast (default) | (none) | 26 s | BM25 + hop-distance ranking on |
quality (blocking) |
| 3 m 15 s | Adds in-process FastEmbedder body vectors → paraphrase queries |
background-quality |
| 26 s parent + ~2 m 50 s detached child | User-wait stays at 26 s; paraphrase quality lifts when the child finishes |
Recommended for repos >~1 000 files: --background-quality.
Track via status --source X ("quality phase : running pid X" →
"complete — took Y").
Resume on interrupt
ingest writes <kb_dir>/.ingest-state.json at each phase
transition (walk → code_index → graph_rag). If a process is
killed mid-flight (Ctrl-C, OOM, reboot), the next ingest reads
the file at startup and skips already-completed phases — the
walk is skipped if phase >= code_index. Per-file resume inside
code_index is the engine's content-hash gate. Cleared on
successful completion; surfaced by status --source X as
ingest resume : interrupted at phase = ... until then.
Generated-file skip
Two layers, both honoured during the walk:
@generatedcontent-marker scan of the first 4 KiB (Facebook / Google / Bazel / Go convention).<root>/.gitattributeslinguist-generated globs — patterns flagged withlinguist-generated,linguist-generated=true, orlinguist-generated=setare matched against relative paths and skipped. Long-tail coverage of generated files (*.pb.rs,codegen/**, vendored bundles) that don't carry an in-file marker.
CLI surface
heliosdb-codekb-mcp <SUBCOMMAND>
init [--source PATH] [--mode co-located|global|hybrid] [--kb PATH]
[--ingest] [--include-binary-docs BOOL]
[--force] [--durable-writes]
[--with-embeddings] [--background-quality]
ingest [--source PATH] [--include-binary-docs BOOL]
[--force] [--durable-writes]
[--with-embeddings] [--background-quality]
serve [--source PATH] [--http <ADDR>]
status [--source PATH] [--mcp-url <URL>]
config show | set-default-mode <MODE> | pathWhy a separate binary
HeliosDB-Nano is a generic database; baking one specific MCP transport into its binary would adapt the engine to one consumer. This crate keeps that boundary clean: the engine stays generic and publishable to crates.io for any downstream consumer; this binary holds the MCP packaging, transport, and per-source KB-location ergonomics.
MCP Registry
MCP Registry name:
mcp-name: io.github.HeliosDatabase/heliosdb-codekb-mcp
License
Apache-2.0 — see LICENSE.
Available Tools
1 toolheliosA
One-tool gateway to the heliosdb-codekb MCP. Call with {action: "", args: {...}}. Prefer file_lookup for exact paths, doc_lookup for README/docs, ask for broad repo questions, and repo_summary for portfolio/module maps. Available plugin actions: ask, repo_summary, file_lookup, doc_lookup, outline_first, doc_drill, git_summary, symbol_card; plus engine passthrough names like lsp_definition, graphrag_search, query, ast_diff. Use list_actions only when the needed schema is unknown.
Inputs: action (required), args.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool there is no tool-level ambiguity, but the gateway hides a large action namespace where several actions overlap conceptually (ask vs query vs graphrag_search, file_lookup vs doc_lookup vs doc_drill). The description gives useful routing hints (exact paths → file_lookup, README/docs → doc_lookup, broad questions → ask), which mitigates but does not eliminate the guessing.
The exposed action names are consistently snake_case (repo_summary, file_lookup, ast_diff, lsp_definition), but the single tool name 'helios' is opaque and does not follow any verb_noun convention or signal its purpose to an agent. Mixed readable-but-uninformative at the top level.
A single multiplexed gateway is a defensible design for a large, heterogeneous backend, but it collapses the entire surface into one entry point, forcing agents to encode semantics into an action string. One tool is thin for a domain advertising a dozen-plus distinct capabilities.
The advertised actions cover lookup, Q&A, summaries, outlines, LSP and graph search, which spans the knowledge-base domain reasonably well. However, discovery is incomplete—list_actions is only mentioned as an action rather than a first-class tool, so an agent has no cheap way to enumerate the schema before committing to a call.
Maintenance
Related MCP Connectors
Ask your own documents and get answers that cite the source passage. Workspace knowledge bases over MCP for Cursor, Claude and any MCP client.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
A personal memory you control, shared across Claude, ChatGPT, Cursor and any MCP client.
The company brain for Claude Code, Cursor and Codex: cited answers and procedures over MCP.
Related MCP Servers
- AlicenseAqualityDmaintenancePersistent memory for Claude Code. Automatically indexes every conversation and provides production-grade hybrid search (BM25 + vectors + reranker) via MCP tools. 100% local, zero config, zero API keys, zero invoice.1650 npm8MIT
- AlicenseAqualityDmaintenancePersistent memory + FTS5 full-text search for Claude Code conversation history. Indexes ~/.claude/projects/ JSONL into SQLite, exposes 10 MCP tools (store/recall/search memories, browse sessions, get summaries) plus prompts. Includes a web UI for visual exploration1084 npm97MIT
- AlicenseNot gradedqualityDmaintenanceA local, SQLite-backed code index for Claude Code, exposed over MCP, enabling targeted code retrieval without external APIs.1MIT
- AlicenseAqualityDmaintenanceGives Claude Code, Claude Desktop, Cursor, VS Code Copilot, and other MCP-compatible tools persistent memory.1873 npm1MIT