RE-call MCP Memory Server

by giulioder

Not rated
GitHub

About

Postgres plus pgvector memory for AI agents, with provenance, trust verdicts and explicit abstention when memory cannot support an answer.

Details

Author
giulioder
Categories
AI

Setup

Install RE-call MCP Memory Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/giulioder/RE-call

Follow the installation instructions in the repository README, then restart your MCP client.

Memory that knows what it no longer believes.
RE-call is the retrieval engine I extracted from a research agent that had been running for months, after its memory outgrew its context window and it started confidently repeating conclusions it had already disproved.

Why RE-call·Quickstart·How it works·Product surface·Documentation·Evidence

Setup guide: install, configure and run RE-call·Validity Frontmatter: the open spec RE-call implements

Nearest-match retrieval cannot tell the difference between what is true and what merely reads like it. When a corpus keeps its history, and real agent memory does, the retracted claim and its correction are both retrievable, and the retracted one is often the nearer match. That is not a tuning problem. A ranker with no notion of validity has no way to prefer the correction.

RE-call came out of a production, long-running trading-research agent: months of operation, 792 <!-- --> typed memos, 6,469 <!-- --> chunks, re-indexed daily by a session-end hook. Every guard in this repository exists because that agent failed a specific way without it. Seedocs/CASE_STUDY.md.

It is for teams putting agent memory behind real applications, where a stale or unsupported memory is worse than no memory: keep the memory layer local by default, attach policy to every hit, calibrate the refusal threshold on your corpus, and let the application decide what to do with a result that is not trustworthy enough to answer from.

The vocabulary that carries that validity,supersedes,valid_fromandvalid_untilin a document's frontmatter, is published separately asValidity Frontmatter: MIT licensed, with a zero-dependency TypeScript implementation beside it. RE-call is its Python implementation, not its owner. The specification is deliberately licensed more permissively than this repository, so adopting the vocabulary carries no obligation to adopt the engine.

The README is the product overview. For evidence behind these claims, start withdocs/EVIDENCE.md, then useresults/FINDINGS.mdfor the full interpretation and limits.

RE-call keeps memory in your own PostgreSQL with pgvector, so a database comes first.

Already running PostgreSQL with pgvector?Skip ahead and point the DSN at it.

Want a throwaway one?Save this asdocker-compose.yml, then start it:

services: db: image: pgvector/pgvector:pg18 environment: POSTGRES_USER: recall POSTGRES_PASSWORD: recall POSTGRES_DB: recall volumes: - recall_pgdata:/var/lib/postgresql ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U recall"] interval: 2s timeout: 3s retries: 30 volumes: recall_pgdata:

Then install, create the schema, and run the guided setup wizard. The wizard records the selected embedder, retrieval options, and an optional calibration that is fitted to your labeled queries and your corpus.

pip install "recall-rag[fastembed]" python -m recall.cli --migration-dsn postgresql://recall:recall@localhost:5432/recall schema --dim 384 apply python -m recall.cli setup

Those three run unchanged in PowerShell.

The schema command targets the defaultchunkstable deliberately. Global migrations have to be applied there before any other table, so starting with--table something_elseon a fresh database stops withSchemaTooOld. To add a separate index later, apply the default target first, then pass--table.

When the wizard asks whether to calibrate, it wants a labeled query file and the corpus those queries refer to. You do not have to build either to try it: both ship inside the installed package, next to each other.

python -c "import recall.eval, pathlib; print(pathlib.Path(recall.eval.__file__).parent)"

That prints a directory holdingqueries.json, a labeled set covering both answerable and unanswerable questions, andcorpus/, the documents those questions are labeled against. Give the wizard those two paths and calibration runs end to end. Sources:recall/eval/queries.jsonandrecall/eval/corpus/.

A calibration fitted that way belongs to that sample, not to your data. It shows the mechanism working and gives you a labeled file to copy the shape of. Calibration is per embedder and per corpus, so a new model or a substantially changed corpus needs calibrating again, and a threshold fitted on the sample should not be used to judge your own memory.

A labeled file needs at least one answerable and one unanswerable query, and every entry needs aqueryand ananswerablekey. Calibration refuses the file rather than fitting a threshold to one-sided evidence.

The distribution isrecall-rag; the import isrecall. The namerecallon PyPI belongs to an unrelated package, so do not install both into the same environment.

flowchart TB M["Memo: markdown plus frontmatter"] --> CH["Chunk"] CH --> EW["Embed locally"] EW -. "optional" .-> SP["SPLADE encode"] EW --> DB SP -. "optional" .-> DB Q["Query"] --> EQ["Query encoder"] EQ --> DB[("PostgreSQL plus pgvector")] DB --> DN["Dense vector search"] DB --> SL["Postgres full-text search"] DB -. "optional" .-> LS["Learned sparse search"] DN --> F["Reciprocal Rank Fusion"] SL --> F LS -. "optional" .-> F F -. "optional" .-> RR["Cross-encoder rerank"] RR --> GP F --> GP{"Gap check: calibrated threshold"} GP --> TR{"Trust layer: supersession, validity, confidence"} CAL["Calibration: fitted per embedder and corpus"] --> TR TR -. "optional" .-> EJ{"Entailment judge"} EJ --> OUT TR --> OUT["Verdict, confidence, provenance, or ABSTAIN"] TR -. "explicit opt-in" .-> RG["Reasoning graph projection"] DB -. "generation-bound" .-> RG RG --> IP["Inference proposals: review candidates"] TR --> RP["Reasoning policy plus budget"] IP --> RP RP --> RV{"Citation and trust validation"} RV --> ROUT["Cited answer, needs review, clarification, or ABSTAIN"]

Deliberately out of scope: an end-user dashboard, entity synthesis, high availability orchestration, automatic truth extraction from prose, and corpus rewrites from inference proposals. Reasoning is opt in, citation constrained, and review aware.

The ordered SQL migration path is versioned now, pre-tenancy tables are migrated in place, and runtimeCREATE TABLE IF NOT EXISTSremains bootstrap only.

Use something else if you need managed hosting, per-chunk ACLs, automatic truth extraction from prose, or a memory system that rewrites facts for you. RE-call is a retrieval library over your PostgreSQL database, not a hosted memory platform.

RE-call is a retrieval library with an opt-in reasoning layer, not a general reasoning system. It does not infer every missing supersession edge, prove that an on-topic memory answers a near-miss question, promote proposals into corpus truth, or replace database operations with a managed service. It returns the trust signals the caller needs, and it refuses to pretend that a nearest match is always usable evidence.

For an ad hoc local markdown folder, create a table for that index, index the corpus, and search it. If you did not calibrate during setup, use development mode only for local evaluation. Replace./noteswith your memo folder.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.