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, Cursor, or its own coding agent over MCP. Local-first, MIT core.

Team pricing
recall@100.977 nDCG@100.812 mean latency251ms languages13 tests450
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/cli/repl.ts:1-273 0.96

A coding agent that asks before it acts

Bare oce opens a full agent REPL grounded in your index — plans its steps, delegates broad research to sub-agents, and shows a diff preview with an approval prompt before any edit or shell command runs.

Approvals, three speeds

Default asks on every mutation. --auto-edit lets file edits through and still gates shell. --full-auto for containers. Workspace policies cap all of it.

┌─ edit src/auth.ts ───────────────
 - return user.length > 0;
 + return validateSession(user);
└──────────────────────────────────
approve? [y]es · [a]lways · [n]o: 

Context that survives long sessions

History over budget gets condensed by the model into a context note — decisions and file paths survive, raw tool dumps don't. Sessions persist; --continue picks up where you left off.

✂ compacted 31 messages into a context note
 /plan
 find the double-charge path
 add idempotency key to retries
○ backfill test for webhook replays
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 searchSQLite FTS5, always local✓ offline
RerankingVoyage · Coherein-process cross-encoder✓ offline
Agent LLMAnthropic · OpenAI · GoogleOllama / any OpenAI-compatible✓ offline
Index storagelocal 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.