Agent Memory (MCP)
HyperMesh MCP exposes the database as verifiable memory for AI agents over the Model Context Protocol. Any MCP host — Claude Desktop, Cursor, or a custom agent runtime — gets temporal, relational, provable memory instead of a flat scratchpad: it can remember observations, recall them deterministically, reason over them with trusted rules, and obtain machine-checked proofs for every conclusion.
The server is LLM-free by design. The host brings its own model; HyperMesh contributes the part a language model can’t be trusted to do — deterministic recall, symbolic reasoning, and proof.
The six tools
Section titled “The six tools”| Tool | What it does |
|---|---|
remember | Store one observation (a hyperedge over named entities) with provenance |
recall | Deterministically retrieve the most relevant remembered hyperedges |
reason | LLM-free stratified forward-chaining over the trusted rule store |
prove | Return a proof tree for each conclusion, leaves bound to supporting edges |
verify | Gate the host’s own generated answer against the proofs (hallucination firewall) |
detect | Scan memory for structural/temporal patterns (hubs, bursts, beaconing, …) |
See the Tools reference for parameters and return shapes, and Connecting a host for setup.
The trust boundary
Section titled “The trust boundary”This is the point of the whole design, so it’s enforced structurally:
An agent can write observations, but never rules or conclusions.
rememberwrites only base facts (hyperedges) with provenance.- Rules live in a curated
RuleStore, managed out-of-band — an agent cannot author or edit them through MCP. - Conclusions are always recomputed from base facts + trusted rules; they are never persisted from whatever the agent claims.
That separation is what keeps every answer audit-grade: the host (or an auditor)
can ask prove and get a DAG whose leaves are real stored hyperedges.
The hallucination firewall, for agents
Section titled “The hallucination firewall, for agents”The verify tool turns the verifiable-RAG firewall
into something an agent calls on itself. The host generates a draft answer with
inline citation tags, then asks verify:
- HyperMesh reasons + proves over the relevant edges and assembles the set of
allowed citation tags (
HEDGE-Nevidence,STEP-Nsteps,RULE-Nrules). - Every factual sentence in the draft must carry an allowed tag — unsupported sentences are stripped.
- With
require_proof: true, if nothing was proved the firewall abstains instead of returning a guess.
So even a cheap or local model is safe to deploy behind the gate: it can only surface claims that are backed by a proof over your data.
Install & run
Section titled “Install & run”The server is an optional extra (the mcp SDK). The embedded engine + analytics
are also required since memory runs in-process.
pip install "hypermesh[mcp,engine,analytics]"
# run over stdio (the default MCP transport)python -m hypermesh_mcp# or, via the console script:hypermesh-mcpConfiguration is via environment variables:
| Variable | Default | Meaning |
|---|---|---|
HMDB_DIR | data | Database directory (memory + entity registry live here) |
HM_MCP_TABLE | MEMORY | Hyperedge table used as the agent’s memory |
How it compares
Section titled “How it compares”| Typical agent “memory” | HyperMesh verifiable memory | |
|---|---|---|
| Storage | flat files / vector blobs | temporal hypergraph with provenance |
| Recall | similarity, best-effort | deterministic temporal + relational retrieval |
| Reasoning | inside the LLM (opaque) | explicit, deterministic rules |
| Trust | ”the model said so” | proof DAG down to stored events |
| Hallucination control | prompt-only | enforced firewall (verify) |
Where to next
Section titled “Where to next”- Tools reference — every tool, its parameters, and what it returns.
- Connecting a host — wire it into Claude, Cursor, or your own runtime, or use it in-process from Python.