# State Memory MCP

Persistent SQLite graph that records tasks and architectural choices across coding sessions. Keeps agent context local without extra LLM calls.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 40
- Author: putervision
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/putervision/state-memory-mcp
- Updated: 2026-10-03
- HTML: https://affpapa.org/en/nevibecode/mcp/state-memory-mcp

## What it does

The server stores project workflow state directly into a local SQLite database using WAL mode inside `.state-memory-mcp/`. Instead of rescanning workspace files on every turn, coding assistants query tasks and blocker dependencies via 13 dedicated MCP tools such as `manage_tasks` and `query_graph`.

Graph operations remain fully deterministic. Data mutations run directly without invoking secondary neural network calls. The toolkit includes DAG cycle detection, FTS5 full-text search, snapshot restoration, and an asynchronous blackboard tool for coordinating multi-agent workflows. Running the package requires Node.js version 18.18.0 or newer; execution fails without it.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add state-memory-mcp -- npx -y @putervision/state-memory-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add state-memory-mcp -- npx -y @putervision/state-memory-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "state-memory-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@putervision/state-memory-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "state-memory-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@putervision/state-memory-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add state-memory-mcp npx -y @putervision/state-memory-mcp
```

## When to use it
- preserve architectural decisions and blocker states across agent sessions
- trace task dependencies using a directed acyclic graph
- prevent context bloat by moving workflow state into local SQLite storage
- coordinate task assignments across parallel subagents using a shared board

## Example prompts
- Record our auth refactoring decision and add its dependency links to the graph
- Show all active blockers and fetch the next unblocked task from the queue
- Take a state snapshot of the current workflow before starting database migration

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
