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.

Team pricing
recall@100.977 nDCG@100.812 mean latency251ms languages13 tests918
src/core/retriever.ts:1-180 0.98

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.

01

Hybrid search

Vector similarity and porter-stemmed keyword search run together and fuse — semantically relevant and lexically precise, in one ranking.

0.977
02

AST-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 langs
03

Code graph expansion

Import, call, and inheritance edges are extracted at index time. Top results pull in their callers and definitions automatically.

3 edge kinds
04

Streaming 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 first
05

Measured, 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.

44 cases
src/trace/session.ts:1-60 0.99

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 +
docs/local-first.md:1-38 0.97

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.

stagecloud optionfully local option
EmbeddingsVoyage · OpenAIin-process ONNX or Ollama✓ offline
Keyword search—SQLite FTS5, always local✓ offline
RerankingVoyage · Coherein-process cross-encoder✓ offline
Agent LLMAnthropic · OpenAI · free tiers: Gemini, Groq, Cerebras, OpenRouterOllama / any OpenAI-compatible✓ offline
Index storage—local SQLite + sqlite-vec✓ offline
src/core/index-artifact.ts:1-168 0.95

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
src/core/audit.ts:1-203 0.94

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.

src/mcp/server.ts:1-149 0.93

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.