open source, Apache 2.0

A local-first context engine for coding agents

Delphi indexes your repositories, documentation, papers, datasets, and local folders into PostgreSQL on your own machine.

It serves search, call graphs, and context packs to any MCP client, and nothing you index leaves the machine unless you allow it.

Starts the local stack and registers Delphi with Claude Code, Cursor, Windsurf, or Claude Desktop. Needs Docker and Git; the default embeddings model runs locally, so no API key is required.

How Delphi answers a searchA query for handleAuthCallback is sent to six candidate sources at once: dense vectors, BM25 full text, trigram symbols, exact symbol lookup, path and glob lookup, and path tokens. Their rankings are fused by reciprocal rank into one ranked list of files, and replaying the same query returns the same list.queryhandleAuthCallbackdense vectorsBM25 full texttrigram symbolsexact symbolpath and globpath tokensrank fusionreciprocal rankranked resultsauth/callback.py1auth/session.py2routes/oauth.py3tests/test_auth.py4docs/auth.md5same query, same resultsacross requests and restarts

What Delphi does

Six-way retrieval
Dense vectors, BM25 full text, trigram symbol matching, exact symbol and path lookup, and path tokens run on every query and are fused by reciprocal rank, so handleAuthCallback and “where is auth handled” take the same route.
Deterministic
Every candidate query has a total ordering, identical concurrent requests share one execution, and model outputs are cached on disk. A search repeats exactly across requests and across restarts.
Call graphs
tree-sitter extracts symbols for Python, TypeScript, Go, Rust, Java, C, C++, C#, Ruby, and PHP; Delphi builds a dependency graph per repository: who calls a function, what it calls, and what changing it would affect.
Context packs
Give a task and a token budget; get ranked files and excerpts sized to the agent's next call, each tagged with the snapshot it came from. A saved session lets another agent rehydrate the same view.
Immutable snapshots
A finished indexing run publishes a snapshot; a failed one leaves the previous snapshot searchable. Index a branch or an exact commit, and a freshness check reports drift.
Local by default
API, workers, PostgreSQL, and dashboard run on your machine. The network policy defaults to local_only, embeddings default to a local model, and nothing you index leaves the machine unless you allow a provider.

Where the gains come from

We decomposed Delphi against conventional retrieval built from its own parts, on SWE-bench Verified instances its development never saw. The advantage is the candidate pool, not the reranker: Delphi's candidates lead by +0.19 MRR and +0.07 Recall@20 before any reranking. The shared rerankers help the weaker conventional pool more, so after reranking MRR ties while the recall gap (+0.09) stays.

The pool advantage comes from chunking, indexing, and weighting rather than any single structural branch, and it inverts on commit-to-files queries. The paper claims no state of the art and gives its null results the same billing as the positive ones.

Candidate pool versus reranking on SWE-bench VerifiedTwo bar charts. MRR: conventional candidates score 0.319 alone and 0.660 with Delphi's rerankers; Delphi candidates score 0.507 alone and 0.700 with the rerankers. Recall at 20: conventional 0.733 in both cases; Delphi 0.806 alone and 0.820 with the rerankers.MRR.319.660.507.700conventionalDelphiRecall@20.733.733.806.820conventionalDelphicandidates alonewith Delphi's rerankers attached
Fig. 1Candidate pool × learned reranking on 98 SWE-bench Verified instances that development never saw. Outlined bars are the candidates alone; filled bars have Delphi's rerankers attached.

Plugs into the agent you already use

The installer registers Delphi with your editor in one step; every other MCP client connects through a small stdio proxy. Tools are grouped into profiles (code, papers, docs, minimal, all) so the handshake only advertises what the agent needs.

  • Claude Code
  • Cursor
  • Windsurf
  • Claude Desktop
  • any MCP client
{
  "mcpServers": {
    "delphi": {
      "command": "uvx",
      "args": ["synsci-delphi-proxy"],
      "env": {
        "SYNSC_API_KEY": "your-api-key",
        "SYNSC_API_URL": "http://localhost:8742"
      }
    }
  }
}
An agent talks to Delphi over MCP; Delphi indexes sources into PostgreSQL with pgvector and answers searches from it.DashboardDelphiHTTP API and MCP serverlocalhost:8742Hybrid retrieval and context packsvectors, BM25, trigrams, symbols, pathsIndexing workerstree-sitter parsers, chunking, embeddingsCoding agentClaude Code, Cursor, Windsurf,or any MCP clientMCPPostgreSQLwith pgvectorindexrepositories, documentation, papers, datasets, local folders
Fig. 2Everything runs on the user's machine: the agent talks to Delphi over MCP, and Delphi indexes sources into PostgreSQL with pgvector.

Questions

What is Delphi?

An open-source context engine that runs on your machine. It indexes repositories, documentation sites, research papers, datasets, and local folders into PostgreSQL, and exposes them to coding agents over MCP as tools for indexing, searching, following call graphs, and assembling context packs under a token budget.

How do I install it?

Run npx @synsci/delphi. The installer starts the local stack and can register Delphi with Claude Code, Cursor, Windsurf, or Claude Desktop. It needs Docker and Git; the default embeddings model runs locally, so no API key is required. The README covers running from source.

Which agents and editors work with it?

Any MCP client. Claude Code, Cursor, Windsurf, and Claude Desktop register in one step; everything else connects through the synsci-delphi-proxy stdio proxy. The same operations are available over HTTP at localhost:8742, and a dashboard at localhost:3000 shows indexed sources, jobs, and API keys.

Does my code leave my machine?

Not unless you allow it. The default network policy is local_only: no remote provider is called unless the deployment allowlists it, and a per-request policy can only narrow that ceiling. Hosted web search and crawling exist but are off by default and, when enabled, send only the query, never indexed content.

Do I need an API key or a model subscription?

No. Embeddings default to a local sentence-transformers model, and retrieval works without any hosted model. OpenAI or Gemini embeddings, a cross-encoder or listwise reranker, and query expansion are optional and use your own keys if you turn them on.

How is this different from vector search?

Dense retrieval alone is a poor fit for code: an agent asking for a function by name should get that function, not a list of semantically similar middleware. Delphi treats retrieval as candidate generation followed by fusion, so identifier-heavy and prose queries share one pipeline, and the fused list is diversified across files so one large file cannot fill it.

Has the retrieval been evaluated?

Yes. Where Do Context-Engine Gains Come From? decomposes Delphi against conventional retrieval built from its own parts, on SWE-bench Verified instances its development never saw, and releases the code, per-case artifacts, exposure ledger, and all 620 agent trajectories. It claims no state of the art and reports its null results with the same prominence as the positive ones.

What does it cost, and how is it licensed?

Delphi is free and open source under Apache 2.0. The only costs are those of hosted providers you choose to enable, billed by them directly.