Auditable memory for coding agents: evidence chains, supersession history, keyless embedded SQLite
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Auditable memory for coding agents and AI systems. Every fact StateCore holds carries its evidence, its version chain, and a recorded reason for every discard β so "why do you believe this, and what did you believe before?" always has an answer.
StateCore is a self-hosted, low-drift long-term memory runtime for local or BYO models. It turns memory from accumulated text into governed state: events are ingested, run through a deterministic digest pipeline, and merged into protected stable state. The LLM proposes; the pipeline decides.
No server, no signup, no model key β one SQLite file over MCP:

remember a decision in one session, ask why in the next: you get the fact, the evidence behind it, and its version history β superseded and retired facts stay on the record, marked, never deleted. And sessions hand off across vendors: handoff records where one session stopped, and the next one β Claude Code, Codex, Cursor, any MCP client on the same project β receives it at the top of recall, with every earlier stop-point still on the audit chain. Configs for Cursor, dsh, and every other MCP host: apps/mcp/README.md.
Most agent-memory tools compete on capturing more β hook every event, compress the transcript, inject it back. Capture is the solved half of the problem. The unsolved half is what those tools' own issue trackers are full of: memories that silently stop being written, stale decisions injected as if still current, cross-project leakage, and no way to audit or repair what the store believes. That is not a rhetorical claim β docs/prior-art-failure-modes.md cites the verified issues, by number, across five systems.
StateCore is built for that second half:
supersededBy chain; retired facts are marked, never deleted.degraded; the budget reports what it refused; retrieval reports which embedding stages failed and derives its mode from what actually ran, not from what was configured.why returns a fact's evidence and full version history; a digest's selection report shows exactly what it kept and dropped.How this compares to other memory systems, mechanism by mechanism: docs/why-auditable.md.
retrieval.degraded instead of silently downgrading qualitystatecore-mcp, a zero-deploy Model Context Protocol front end for coding agents; keyless by default, one SQLite file, no infrastructureMinimum required variables:
To enable LLM features (digest, answers):
On OpenAI, pick a model that accepts
reasoning_effort. The runtime turn sends it on every request βassistant-runtime.tsdefaults it tolowrather than leaving it unset β soPOST /v1/memory/runtime/turnfails against agpt-4o*model, which rejects the parameter. Digest and answers do not send it unlessMODEL_STRUCTURED_OUTPUT_REASONING_EFFORTis set, so agpt-4o*model appears to work right up until the first runtime turn. Any endpoint that accepts the parameter, or ignores unknown ones, is fine.
This starts Postgres (with pgvector) and Redis.
The API is available at http://localhost:3002 (or whatever PORT is set to).
All requests require an x-user-id header. For local development, set LOCAL_USER_TOKEN=local-dev-user in .env and send:
/v1)The /v1 prefix exposes the stable, public-facing subset of the API. Full OpenAPI schema:
Interactive Scalar UI:
Reference documentation: docs/api.md
| Method | Path | Description |
|---|---|---|
POST | /v1/memory/events | Ingest a stream event or document |
POST | /v1/memory/retrieve | Retrieve grounded evidence for a query, within an optional maxChars budget |
POST | /v1/memory/digest | Trigger a State Layer digest job |
GET | /v1/memory/facts | Grouped memory facts for a scope |
GET | /v1/memory/facts/:factId/provenance | A fact's evidence and its full version chain |
GET | /v1/memory/digests/:digestId/selection | What a digest kept, and what it discarded and why |
GET | /v1/facet-pack | The active facet ontology for a scope or account |
GET | /v1/scopes | List scopes |
GET | /memory/stable-state | Current stable-state snapshot ΒΉ |
GET | /memory/working-state | Current working-memory snapshot ΒΉ |
GET | /memory/layer-status | Aggregated layer health ΒΉ |
The three audit readers in the middle are the ones that make the engine's memory
checkable rather than merely stored; docs/api.md lists the full frozen surface.
API stability: the
/v1contract is frozen and additive-only β see STABILITY.md. It currently covers 22 operations across 20 paths. The contract carries its own version in the generated OpenAPI document (info.version, currently1.6.0), which is what tells you how current a spec you are holding; it is not the release tag and not any package version.
ΒΉ Internal read-model endpoints β registered only at /memory/..., not under /v1, and not part of the frozen /v1 contract.
statecore-mcp is a separately published npm package that fronts this engine
over the Model Context Protocol β no
running server required. It runs the engine embedded (one process, one SQLite
file), keylessly by default:

Point any MCP client at it, or run it against a full StateCore deployment via
--url for shared/multi-agent memory. Full docs, host configs, and the
keyless/keyed capability matrix: apps/mcp/README.md.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/statecore-mcp)<a href="https://allmcps.com/mcp/statecore-mcp"><img src="https://allmcps.com/api/badge/statecore-mcp?style=directory" alt="Statecore MCP on AllMCPs" /></a>