MCP Semantic Search for Coding Agents

Your coding agent stops grepping.

Polaris gives Claude Code, Cursor and Codex ranked answers from your local project's docs over MCP.
10–40× fewer tokens than the usual grep-and-read loop.

polaris savings — ~/code/my-repo
$ polaris savings────────────────────────────grep + read 12,700 tokpolaris 285 tok────────────────────────────saved this query: 12,415
The Demo

Watch the gain happen.

Same question, two workflows. Watch the token counters diverge.

Question: useEffect cleanup with abort signal
grep + read — React docs
$ grep -rn "AbortController" .124 matches across 38 files…$ cat src/content/learn/synchronizing-with-effects.md$ cat src/content/learn/escape-hatches.md─────────────────────────────
grep + read 0 tok
polaris — React docs
$ polaris search "useEffect cleanup abort"synchronizing-with-effects.md §cleanup · score 0.96
escape-hatches.md §subscribing · score 0.71
─────────────────────────────
polaris 0 tok
~59× cheaper · saved 37,360 tok
Try it on your repo → Three commands. Your own savings number in under a minute.
The Numbers

The Gain is Real

Three projects, three retrieval profiles, one consistent pattern: ranked beats raked.

This site ~45×
11 docs · 206 chunks (measured)
per query
13k 285
per day
−372k tok
per month
~$120
Mid OSS lib ~42×
~80 markdown files · ~2k chunks
per query
22k 520
per day
−644k tok
per month
~$210
React docs ~59×
hundreds of MD pages · ~10k chunks
per query
38k 640
per day
−1.1M tok
per month
~$370

Per-query numbers measured locally with polaris search (top_k=2). Aggregates assume 30 doc-related queries / dev / day. Dollar figures use Opus 4.7 input pricing ($15 / M tokens) × 22 workdays / month. Mid OSS lib and React docs numbers are extrapolated from this site's measured ratio against larger corpora — same retrieval pattern, more documents to sift.

How it works

One call. Ranked. Done.

Polaris uses hybrid search: it indexes your markdown as both vector embeddings (via a local ONNX model) and full-text search entries. At query time it runs both in parallel, then fuses the results with RRF and reranks with MMR for diversity. BM25 handles the lexical side; vector KNN handles semantic similarity. Your agent gets one ranked answer back instead of a pile of raw files.

query
vector + BM25
RRF fusion
heading boost
MMR rerank
top-k results
Why it matters

Built for the way agents actually work.

Most context tools require cloud round-trips or heavy infra. Polaris is designed from the ground up to run entirely in your process, stay in sync automatically, and speak the protocols your agents already know.

PRIVACY

Your code never leaves the machine

Embeddings run on-CPU via a bundled ONNX model. No API keys, no telemetry, no cloud — your code stays local even on private repos.

SIMPLICITY

Single static binary, zero dependencies

No Python runtime, no Node, no Docker. One curl | bash install drops a single binary in ~/.local/bin. polaris update upgrades it in place.

FRESHNESS

Re-indexed within ~500 ms of saving

polaris watch re-indexes affected markdown files within ~500 ms of a save, so your agent always sees the latest docs.

INTEROP

MCP-native by design

Drop-in for Claude Code, Cursor, Codex and any future MCP-compatible client. polaris setup writes the .mcp.json for you and updates CLAUDE.md / AGENTS.md / GEMINI.md.

Integrations

Works with every agent.

One .mcp.json file is all it takes. Polaris auto-configures Claude Code, Cursor, and Codex on first run.

Anthropic's official CLI. `polaris setup` writes the .mcp.json and updates CLAUDE.md automatically.

The MCP server is discovered through the same .mcp.json. No extra configuration in Cursor.

Works out of the box via stdio MCP. AGENTS.md is updated automatically to nudge Codex toward `polaris.search`.

.mcp.json
{
  "mcpServers": {
    "polaris": {
      "command": "/path/to/polaris",
      "args": ["serve"]
    }
  }
}
Free or Pro

Polaris Pro — same retrieval, broader inputs.

OPEN SOURCE

Polaris

MIT · ships today
  • Markdown indexing
  • MCP search / index / status
  • Hybrid retrieval (vec + BM25 + RRF + MMR)
  • Local-first, no telemetry
  • Code, PDF, .docx ingestion (polaris-ingest)
  • Web UI for browsing the index
  • Price $0
Install on GitHub →
Waitlist · 50% off at launch
PRO

Polaris Pro

in development
  • Markdown indexing
  • MCP search / index / status
  • Hybrid retrieval (vec + BM25 + RRF + MMR)
  • Local-first, no telemetry
  • Code, PDF, .docx ingestion (polaris-ingest)
  • Web UI for browsing the index
  • Price 50% off at launch
Join the waitlist →
Polaris Pro · Waitlist

Get Pro at 50% off at launch.

Pro extends Polaris with broader file-type ingestion and a web UI. Same hybrid retrieval, broader inputs.

  • polaris-ingest. Ingest code, PDF, and .docx — not just Markdown. Same hybrid retrieval pipeline.
  • Web UI. Browse and search your index without an agent. Useful for humans, not just agents.
  • Same local-first guarantee. Everything still runs on your machine. No cloud, no telemetry.
Join the waitlist

Opens the form on Tally · 30 seconds · early access + 50% off at launch

FAQ

Questions you're probably about to ask.

  • What is Polaris? +

    A local RAG server (retrieval-augmented generation — let the agent look stuff up before it answers) that lets coding agents semantically search your project docs over MCP — typically 10–40× fewer tokens than the usual grep-and-read loop.

  • What is MCP? +

    The Model Context Protocol — an open standard from Anthropic that lets AI agents talk to external tools. Polaris implements an MCP server so Claude Code, Cursor, and Codex can call it directly.

  • What's the difference between Polaris and Polaris Pro? +

    The open-source Polaris server indexes Markdown only and is CLI-driven. Polaris Pro adds polaris-ingest for code, PDF, and .docx, plus a web UI for browsing the index without an agent. Pro is in development — early signups on the waitlist get 50% off at launch.

  • Does Polaris work with Claude Code, Cursor, and Codex? +

    Yes. Any MCP-compatible client works. polaris setup writes the .mcp.json and updates CLAUDE.md / AGENTS.md / GEMINI.md automatically.

  • Do I need an API key or cloud account? +

    No. Embeddings run locally via a bundled ONNX model. Nothing is sent over the network after the initial model download.

  • How does Polaris compare to LangChain, LlamaIndex, or Haystack? +

    Those are full RAG frameworks for building applications. Polaris is a thin, zero-config server purpose-built for the coding-agent use case: drop it next to a repo, get MCP search.

  • Can I use Polaris on private or proprietary code? +

    Yes. Everything runs locally; there's no telemetry. The MIT license permits commercial use.

  • Does Polaris keep the index up to date automatically? +

    Yes. When you run polaris setup in a Claude Code project, it installs a PostToolUse hook that reindexes any changed markdown file after every Write or Edit — in about 300 ms. Your agent always searches current docs, not a stale snapshot.

  • Can Polaris search on every prompt? +

    Yes. An opt-in UserPromptSubmit hook (installed with polaris setup --search-hook) searches the index on every qualifying prompt and injects the top result as context. It adds about 1 second of latency, so it is off by default.