Model Context Protocol · Interop

Your retrieval engine, callable by any AI.

The same grounded, self-checking pipeline behind this app is exposed as an MCP tool. Any MCP-compatible client — a coding agent in your terminal, for instance — can store text and ask questions that are answered onlyfrom what was stored: with citations, or an honest “not enough evidence.”

Data ownership

Your data, your control.

Your memory lives in a store you own — not locked inside the model vendor. Every recall is cited, your keys are revocable, and you can self-host the whole engine so nothing ever leaves your machine.

The idea

Language models hallucinate, forget everything between sessions, and cite nothing. This turns retrieval into a memory that fixes exactly those failures: it answers only from stored material, traces every claim to its source, and refuses when the evidence is not there.

It is deliberately notanother “remembers your preferences” memory — that lane is crowded. This is a document / fact memory whose one differentiator is that it self-checks and abstains. A memory that does not make things up.

Abstain eval: refusing the unanswerable 10 adversarial questions with no answer in the corpus (false-premise / cross-domain / out-of-scope) — measured 100% 10 / 10 correctly refused zero fabricated answers False premise Cross-domain Out-of-scope 3 / 3 4 / 4 3 / 3 The gatekeeper deflects off-topic and false-premise queries before synthesis, and the pipeline abstains when the documents lack support — so nothing is fabricated. Complements the retrieval benchmark: this measures refusal quality, not recall.
Measured, not asserted: across a set of unanswerable questions, the pipeline refused every one rather than fabricate an answer.
Get started

From zero to a working memory in five steps. You need an account and any MCP-capable client (Claude Code, Antigravity, Cursor, Windsurf, Cline, Claude Desktop, …). There is nothing to host or run yourself — the engine is already online.

  1. 1

    Create an account

    Sign in or sign up on the web app. This is where your stored memory lives and where you manage access.

  2. 2

    Generate an API key

    Open API Keys, click Generate, and copy your key. It begins with are_live_ and is shown only once, so paste it somewhere safe. Lost it? Revoke it and make a new one.

  3. 3

    Add the server to your client

    Put this block into your client’s MCP config, with your key in the RESEARCH_API_KEY field:

    {
      "mcpServers": {
        "research-memory": {
          "command": "npx",
          "args": ["-y", "research-memory-mcp"],
          "env": { "RESEARCH_API_KEY": "are_live_your_key_here" }
        }
      }
    }

    Where that config lives, by client:

    • Claude Code — run one command instead of editing a file:
      claude mcp add research-memory --env RESEARCH_API_KEY=are_live_your_key_here -- npx -y research-memory-mcp
    • Antigravity — Manage MCP Servers → View raw config, then paste the block into ~/.gemini/config/mcp_config.json (or .agents/mcp_config.json for one workspace).
    • Cursor / Windsurf / Cline / Claude Desktop— paste the same block into that client’s MCP settings file.
  4. 4

    Confirm it connected

    Reload your client. It should now list three tools — ingest, retrieve, and ask. If it shows an auth error, the key is wrong or revoked; generate a fresh one.

  5. 5

    Use it — just talk

    You never call the tools by hand. Talk to your AI normally — “Remember: our launch is March 3rd.” then later “When’s our launch?” — and it picks the right tool for you. The exact shapes are in The tools below.

Honest note. The engine is hosted, so there is nothing to install or run yourself beyond that one config. Usage is rate-limited and tied to your key — this is a personal instrument, not an open public service.

The tools

You won’t type these by hand — when you talk to your AI, it calls the right one for you. This is the shape it sends, and what comes back.

ingest(text, source?)

Store text so it can be recalled later.

  • textrequiredthe content you want to remember
  • sourceoptionala label for where it is filed — reuse the same label to overwrite it

Template

ingest({
  "text": "<the content you want to remember>",
  "source": "meeting-notes"
})

Example

ingest({ text: "Project Falcon ships on March 3rd.", source: "roadmap" })
→ Stored under source "roadmap" (1 chunk, 1 embedded).

Everything you store is private to your account — your key scopes it to only you. source is simply where it is filed, so related notes can share one label.

retrieve(query)

Find the most relevant stored chunks — raw retrieval, with each chunk's source and timestamp. No answer synthesis.

  • queryrequiredwhat you are looking for

Template

retrieve({
  "query": "<what you are looking for>"
})

Example

retrieve({ query: "Falcon ship date" })
→ [1] (source: roadmap · stored 2026-08-05)
   Project Falcon ships on March 3rd.
ask(query)

Answer a question through the full self-checking pipeline: a cited answer, or a plain "not enough evidence" — never a guess.

  • queryrequiredyour question

Template

ask({
  "query": "<your question>"
})

Example

ask({ query: "When does Project Falcon ship?" })
→ Project Falcon ships on March 3rd. [DOC-1327]
   Grounded in chunks: 1327

ask({ query: "Who is the CEO of Tesla?" })
→ Not enough evidence in the stored corpus to answer this.
Where you would use it

Anywhere an AI agent needs to recall facts from your own material — and cite them — instead of guessing. It stores and recalls text; it does not run it.

Team knowledge, cited

RFCs, runbooks, and design docs your agent answers from — with a source, not a guess.

Coding standards & conventions

Store your rules once; any agent recalls them with a citation, so it cannot hallucinate your standards.

Long-term project memory

Decisions and facts that outlive a single chat session, ready to recall next week.

Onboarding

Point an agent at your handbook so new context is a question away.

Research & paper Q&A

A corpus whose answers you can actually trust, because every claim is traced.

Personal notes across clients

Save something in one client, recall it from another — the memory is yours, not the app’s.

How it works

The MCP server is a thin adapter, not a second implementation. Each tool forwards to the same internal endpoints the app itself uses. Chunking, embedding, encryption, ranking, and the self-correcting answer pipeline all live in one place — so a change to storage or verification takes effect in exactly one place.

Agentic Research Engine Self-correcting, document-grounded RAG with cross-provider verification Browser React client Next.js BFF Vercel · cookies → JWT · SSE Express API Render · auth · retrieval · state FastAPI · LangGraph Render · reasoning graph Claude Haiku answer + k=5 critic OpenAI verifier + embeddings PostgreSQL + pgvector Neon · chunks (AES-GCM), embeddings Redis Upstash · cache · trace Cross-encoder /rerank sentence-transformers · flagged SSE bearer stream async verify retrieval + cache callback pgvector rerank request / data path callback / async (Python → Node, second-opinion) Retrieval logic lives in Node: the Python graph calls back into Express, which runs the dense pgvector search and (when enabled) the cross-encoder rerank. After the answer streams, OpenAI re-checks faithfulness as a background task.
The retrieval and verification pipeline the MCP tools sit on top of.
Is it safe?
  • Encrypted at rest. Stored chunk text is encrypted (AES-GCM) at the application layer.
  • PII-redacted on the way in. Ingested text is sanitized before storage, the same as uploaded documents.
  • It abstains. When the evidence is missing, it says so instead of inventing an answer.
  • Scoped API keys.Each key is generated from your account and used to derive who is calling — so a request can never reach another user’s corpus. Keys are stored only as a hash, shown once, and revocable at any time.

One design decision worth calling out: the relevance gate judges a query by its form — is this a factual, information-seeking request? — and deliberately not by whether the topic sounds real. Deciding whether evidence exists is the job of the check that runs after retrieval, not the gate. The chart below shows the fix.

Where your data goes. Your memory sits in a store you control. At answer time it passes through model APIs — Anthropic and OpenAI, neither of which trains on your data. Self-host if you want nothing to leave your machine. Full data-flow →

Gatekeeper fix: judge the query's form, not whether its topic sounds real Same five probe queries through the intent gate, before vs after a one-line prompt change — live model calls, classification only PROBE QUERY EXPECTED BEFORE AFTER What are the three handshake phases of the Marnol Protocol? Who won the 1952 Olympic marathon? Write me a short poem about the ocean. Hey, how are you doing today? In OAuth 2.0, what is the role of the authorization server? factual question — the fact was stored in the corpus factual question — no supporting document (abstains after retrieval) creative writing conversational chit-chat factual question — in corpus YES YES NO NO YES NO ✗ YES NO NO YES YES ✓ fixed YES NO NO YES Before, a fact that was actually stored in the corpus was blocked because its name sounded invented — the gate judged plausibility from its own knowledge. After, it classifies by form only: creative and chit-chat requests are still blocked, and the evidence check stays after retrieval. YES = passes to retrieval · NO = blocked at the gate · one probe changed (the false-negative); the guardrail rows are unchanged.
Before, a real stored fact was blocked because its name sounded invented. After, the gate classifies by form only — and the creative / chit-chat guardrail is untouched.
Under the hood

The retrieval choices are backed by measurement, not intuition — a fixed question set scored across strategies, and index behaviour checked as the corpus grows.

Retrieval benchmark: dense vector vs rerank vs BM25 52-question golden set, top-5 retrieval, two-document corpus (Transformer paper + RFC 6749) — measured Dense vector Cross-encoder rerank BM25 (lexical) 1.0 0.75 0.50 0.25 0 0.96 0.85 0.83 0.83 0.69 0.64 0.85 0.73 0.69 Hit@5 MRR nDCG Dense vector leads on all three metrics. Expanding the eval from n=12 to n=52 reversed the earlier read that had favored reranking — the cross-encoder helps on semantic queries but not this factual-heavy mix, which justifies shipping with reranking disabled.
Dense vector retrieval, scored head-to-head against lexical and cross-encoder rerank on the same question set.
Vector search: flat scan vs HNSW index Query latency by corpus size — measured, synthetic 768-dim vectors, top-10 cosine (log–log scale) 1 s 100 ms 10 ms 1 ms 0.1 ms 1K rows 10K rows 100K rows 3.0 ms 30 ms 368 ms 0.22 ms 0.13 ms 0.55 ms ~670× faster Flat scan — O(n), scans every row HNSW — O(log n), graph traversal, sub-millisecond Flat scan grows ~10× per 10× rows — the O(n) full scan; HNSW stays sub-millisecond (O(log n) graph traversal). The index is provisioned ahead of demand — validated here to 100K vectors.
Approximate-nearest-neighbour index behaviour as the number of stored vectors grows.
Latency: the critic dominated, so it was the thing to cut Where a query spends its seconds — measured on the running stack. Self-consistency votes parallelized; a semantic-cache hit short-circuits generation. Baseline — serial · cache miss Optimized — parallel · cache hit ≈ $0.012 / query · modelled 16s 12s 8s 4s 0 6.81s 2.16s ~3.1× · −4.6s 14.0s 5.4s ~2.5× on a hit serial parallel cache miss cache hit Critic step · k self-consistency votes End-to-end query (warm) The critic's k votes run concurrently (asyncio.gather) instead of serially — ~3.1× on a step that was ~45% of a ~14s query, shaving ~4.6s off it. Measured on the running stack (medians, small n) at the earlier k=5 setting; k now defaults to 3, so current latency is modestly lower. Cost is modelled from the call graph.
Where a query spends its time: the self-consistency critic dominated latency, so its k votes were parallelized (~3.1× on that step, ~4.6s saved); a semantic-cache hit short-circuits generation.
Limitations & roadmap

Where it stands today

  • Rate-limited. Answering is capped per key to protect the hosted engine — a personal instrument, not an open public service.
  • One corpus per account. Everything you store shares a single space; there are no separate collections yet.
  • No delete tool. Replace an item by reusing its source; removing a whole document is done in the web app.

On the roadmap

  • A forget tool so the agent can remove memories, not just replace them.
  • Named collections, so one account can keep separate memories apart.
  • Team keys and a usage view.