# statecore-mcp [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/yul761/StateCore  
**GitHub Stars:** 1  
**npm Downloads (last month):** 645  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/statecore-mcp

## Description
Auditable memory for coding agents: evidence chains, supersession history, keyless embedded SQLite

## Tools
Capabilities this server exposes over MCP:

- **remember** — Store a durable fact about this project or user. Use for preferences, decisions, constraints, and anything worth knowing next session. Deterministic and audit-tracked. Notes (the default path) are capped at 500 characters; pass consolidate=true for longer conversational context, accepted up to 2000 characters and distilled in the background.
- **recall** — Retrieve project memory relevant to a query, packed into a character budget. Read-only. Returns the active session handoff, the distilled digest, believed facts (with factIds for why), recent events, and a budget report of what was left out. Call at the start of a session or before relying on past context; use facts instead to see the whole memory unranked.
- **facts** — List everything currently believed about this project, grouped, with each fact's factId (for why) and factKey (for forget), plus how many captured events are still waiting for distillation. Read-only, takes no arguments, and returns the full set unranked. Use to review or audit the memory; use recall instead to get only what is relevant to a task.
- **why** — Explain why a fact is believed: its source evidence and the full version chain, including superseded and retired versions. Read-only. Use before trusting or correcting a fact that looks stale or surprising.
- **forget** — Suppress a fact that is wrong or no longer relevant, so recall and facts stop returning it. The record is retired, not deleted — why still shows it and the audit chain is preserved. To change a fact rather than drop it, call remember with the corrected version instead; the engine supersedes the old one.
- **handoff** — Record where this session stopped — a summary, open questions, and next steps — before ending or compacting. The next session (in this client or any other MCP client) receives it at the top of recall; each handoff supersedes the previous one on an auditable chain (why on the returned handoffId walks it). Pass clear=true to retire the active handoff instead.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "statecore-mcp": {
    "command": "npx",
    "args": ["-y","statecore-mcp"]
  }
}
```

## Documentation

## What statecore-mcp does

statecore-mcp provides an MCP front end for StateCore's governed memory runtime. It stores agent memory in an embedded SQLite database, keeping the deployment to one process and one local database file. The server is keyless by default and does not require a separately running StateCore service for the MCP use case.

The memory model is designed for auditability rather than plain transcript accumulation. Facts retain their supporting evidence and version history. When a fact is replaced, the earlier record remains as superseded or retired state instead of being deleted. Discarded information is recorded with a reason, allowing an agent or developer to inspect how the stored state changed.

## How it works

An agent writes information through MCP operations such as `remember`. StateCore processes events through its memory pipeline before promoting information into stable state; an LLM proposal alone cannot directly establish protected state. Later sessions can use `recall` to retrieve stored context, while `facts` exposes grouped memory for a scope.

The `why` operation is intended for provenance checks. It returns the evidence associated with a fact and its version history. `forget` handles removal from active use while preserving the audit record. `handoff` records where one session stopped so a later session can receive that continuation point through `recall`. This supports handoffs between different MCP clients on the same project.

## Setup and configuration

For Claude Code, install the package as a stdio MCP server with:

```bash
claude mcp add statecore -- npx -y statecore-mcp
```

The MCP package runs the engine locally, using one SQLite file and no model key or hosted infrastructure. The repository also contains configuration guidance for Cursor and other MCP hosts. A full self-hosted StateCore deployment is a separate setup: it uses Postgres, Redis, an API process, and a background worker, with optional model configuration for digest and answer features. Those services are not required for the embedded MCP path.

## Tools and capabilities

- `remember` stores a decision or other memory for later sessions.
- `recall` retrieves remembered context and can surface the latest handoff.
- `facts` reads grouped memory facts for a scope.
- `why` inspects evidence and the fact's version chain.
- `forget` retires memory while keeping its history available for auditing.
- `handoff` records a session stop-point for the next agent session.

The underlying runtime also supports deterministic digest processing, protected state, recorded discard reasons, and retrieval across events and digests. These mechanisms are intended to prevent stale or unsupported information from silently becoming stable memory.

## Limitations and notes

StateCore's embedded MCP mode uses local SQLite, so its default storage model is local rather than a shared hosted database. The MCP quickstart is keyless, but the broader StateCore API has a separate service configuration and authentication model. Retrieval quality can depend on which processing stages ran; the runtime reports degraded processing and refused budget items rather than silently presenting an unaffected result.

_Full upstream README: https://allmcps.com/mcp/statecore-mcp/readme_

