Your codebase, indexed.
Your AI, grounded.
Nothing leaves the machine.
Open Context Engine turns any repo into a searchable knowledge base for AI — hybrid semantic + keyword retrieval, AST-aware chunking, and a code graph, served to Claude or Cursor over MCP, and to Trace, its own agent workspace. Local-first, MIT core, and it works with free models.
Open Context · code-native agent index 12,481 chunks · hybrid approvals suggest › where do we validate webhook signatures? ✓ codebase-retrieval webhook signature validation · 0.3s ✓ read-file billing/src/verify.ts:41-63 · 0.1s Signatures are verified in verifySignature() — HMAC-SHA256 over id.timestamp.payload with a constant-time compare. Called from the webhook route before any parsing: ╭── ts billing/src/verify.ts │ export function verifySignature(sig, raw) { │ const mac = hmac(secret, raw); │ return timingSafeEqual(mac, sig); ╰── 1 step · 2 tools · 4,120→96 tok · 3.8s › ▍
Retrieval that ranks like it means it
One query fans out across dense vectors and BM25, fuses with reciprocal-rank fusion, reranks, then expands along the code graph — so callers and callees ride along with every hit.
Hybrid search
Vector similarity and porter-stemmed keyword search run together and fuse — semantically relevant and lexically precise, in one ranking.
0.977AST-aware chunking
Tree-sitter splits code along real boundaries — functions, classes, methods — across TypeScript, Python, Go, Rust, Java, C#, C, C++, Ruby, PHP, Kotlin, and Swift.
13 langsCode graph expansion
Import, call, and inheritance edges are extracted at index time. Top results pull in their callers and definitions automatically.
3 edge kindsStreaming stages
Keyword hits stream back before the query embedding round-trip even starts. UIs paint first results in milliseconds and refine as stages land.
<5ms firstMeasured, not guessed
A committed gold set scores every ranking change: recall, MRR, nDCG, context-recall — with before/after deltas in CI. Run oce eval on your own repo.
An agent that shows you what it knew
Every coding agent shows you what it did. oce trace also shows what it knew: the ranked evidence in the model's context window, with the score and the graph edge behind every chunk — and lets you pin it or throw it out. Bare oce opens the same workspace in your terminal.
The evidence rail
What is in the window right now, ranked by fusion score, with a budget split by what is using it. Pin a chunk and it survives compaction; evict one and it is genuinely gone from the next request.
context · 23% of 200k ████████████████████░░░░░░ retrieval 21k · files 12k · history 8k 0.94 ◆ retriever.ts:118-160 ← called by search.ts 0.91 sqlite-store.ts:64-102 0.62 diagnostics.ts:41-60 0.38 ✕ embedder.ts:203-240
Rewind, review, land
Every turn is a checkpoint on the audit hash chain — rewind rolls back the conversation and the files, and leaves your own edits alone. Parallel sessions each run in their own git worktree: review the diff, then land it.
9b02 › why does search fall back? ⟐ retrieved 5 · top 0.94 · graph +2 · 251ms ┌─ edit native-binding-error.ts · risk 0.34 │ - log.warn("vec unavailable"); │ + log.warn(`vec unavailable: ${reason}`); └ apply? y · always · n sessions main fix-auth upgrade +
Fully local, provably
Air-gapped is a supported mode, not a degraded one. Every stage of the stack has an in-process or self-hosted option — no API key anywhere in the loop.
| stage | cloud option | fully local option | |
|---|---|---|---|
| Embeddings | Voyage · OpenAI | in-process ONNX or Ollama | ✓ offline |
| Keyword search | — | SQLite FTS5, always local | ✓ offline |
| Reranking | Voyage · Cohere | in-process cross-encoder | ✓ offline |
| Agent LLM | Anthropic · OpenAI · free tiers: Gemini, Groq, Cerebras, OpenRouter | Ollama / any OpenAI-compatible | ✓ offline |
| Index storage | — | local SQLite + sqlite-vec | ✓ offline |
One embedding bill for the whole team
Index once in CI, publish the artifact to storage you control — S3, GCS, a shared drive — and every teammate pulls it. Only their local diff re-embeds. A content-hash cache means identical code never bills twice.
Push from CI
$ oce push-index s3://acme/oce/main.db.gz Published: 12,481 chunks · 1,904 files · commit ab12cd34
Pull everywhere
$ oce pull-index s3://acme/oce/main.db.gz Installed team index. Reconciled: 3 files re-embedded, 1,901 reused from the artifact
Built to pass procurement
Org-signed policies your developers can't loosen. A hash-chained audit log where tampering is detectable, not deniable. Offline Ed25519 licenses that verify without phoning home.
Policy locks
Commit a policy file: disable shell, pin command allowlists, force local-only embeddings, exclude paths. Team orgs get Ed25519-signed locks that flags can't override.
Tamper-evident audit
Every run, tool call, and MCP invocation appends to a hash chain. oce audit --verify pinpoints any alteration, deletion, or reorder. Local file — your data stays yours.
Sandboxed by default
Workspace containment on every file surface, scrubbed environments for shell commands, credential files blocked from the index outright. Zero telemetry — verifiable in the MIT source.
Speaks MCP natively
Six retrieval and symbol tools over stdio for Claude Desktop, Claude Code, and Cursor — or a shared Streamable-HTTP endpoint with bearer auth for the whole team. A VS Code extension ships the same engine with chat, edit review, and index health.
Claude / Cursor
{ "mcpServers": { "open-context": {
"command": "oce",
"args": ["mcp"] } } }Team endpoint
$ oce mcp --http --auth-token $TOKEN listening on http://127.0.0.1:8940 bearer auth · /health · watching
Free for individuals. $25 per seat for teams.
The engine is MIT — index, search, MCP, and the agent are free forever. Teams pay for shared indexes, the embedding cache, policy locks, and multi-repo search.