Skip to content

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.

ToolWhat it does
rememberStore one observation (a hyperedge over named entities) with provenance
recallDeterministically retrieve the most relevant remembered hyperedges
reasonLLM-free stratified forward-chaining over the trusted rule store
proveReturn a proof tree for each conclusion, leaves bound to supporting edges
verifyGate the host’s own generated answer against the proofs (hallucination firewall)
detectScan memory for structural/temporal patterns (hubs, bursts, beaconing, …)

See the Tools reference for parameters and return shapes, and Connecting a host for setup.

This is the point of the whole design, so it’s enforced structurally:

An agent can write observations, but never rules or conclusions.

  • remember writes 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 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:

  1. HyperMesh reasons + proves over the relevant edges and assembles the set of allowed citation tags (HEDGE-N evidence, STEP-N steps, RULE-N rules).
  2. Every factual sentence in the draft must carry an allowed tag — unsupported sentences are stripped.
  3. 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.

The server is an optional extra (the mcp SDK). The embedded engine + analytics are also required since memory runs in-process.

Terminal window
pip install "hypermesh[mcp,engine,analytics]"
# run over stdio (the default MCP transport)
python -m hypermesh_mcp
# or, via the console script:
hypermesh-mcp

Configuration is via environment variables:

VariableDefaultMeaning
HMDB_DIRdataDatabase directory (memory + entity registry live here)
HM_MCP_TABLEMEMORYHyperedge table used as the agent’s memory
Typical agent “memory”HyperMesh verifiable memory
Storageflat files / vector blobstemporal hypergraph with provenance
Recallsimilarity, best-effortdeterministic temporal + relational retrieval
Reasoninginside the LLM (opaque)explicit, deterministic rules
Trust”the model said so”proof DAG down to stored events
Hallucination controlprompt-onlyenforced firewall (verify)
  • 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.