mcpField
S
State Memory MCP

State Memory MCP

Local
statememorymcp.comMemory & Knowledge40Updated 4w ago

About State Memory MCP

State Memory MCP is a deterministic MCP server that gives AI coding assistants such as Cursor and Claude Code a persistent SQLite graph of tasks, decisions, artifacts and blockers. It needs no extra infrastructure, and all data stays in the workspace's .state-memory-mcp/ directory.

Key features

  1. 01SQLite graph of tasks, decisions and blockers
  2. 02Dependency-ordered task queue with blocker detection
  3. 03FTS5 search and session context bootstrap
  4. 04SHA-256 tamper-evident event ledger
  5. 05Browser-based 3D graph visualizer

Use cases

  1. 01Keeping task progress and decisions across coding sessions
  2. 02Finding unblocked tasks and the reasons others are blocked
  3. 03Sharing state between multiple agents through a common board

MCP support

This project is an MCP server that exposes 13 consolidated tools, including manage_nodes, manage_tasks and query_graph, to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"putervision-state-memory": {
"command": "npx",
"args": [
"-y",
"@putervision/state-memory-mcp"
]
}
}
}
Run commandnpx -y @putervision/state-memory-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@putervision/state-memory-mcp1.4.1

Tools

13

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
idstringNoUnique node identifier for get, update, or remove.
idsarrayNoArray of node IDs for batch_update.
tagsarrayNoArray of searchable tags.
textstringNoText note content for add_note.
typeenumNoThe type classification of the node.task | decision | artifact | plan | milestone | blocker | observation | spec | requirement | acceptance_criterion | visual_state
limitnumberNoMaximum number of items to return (1-1000).
nodesarrayNoArray of node payloads for batch_create.
querystringNoSearch term for full-text search.
titlestringNoTitle or label of the node.
actionenumYesThe node management action to execute: create, update, get, remove, list, search, batch_create, batch_update, add_note.create | update | get | remove | list | search | batch_create | batch_update | add_note
offsetnumberNoNumber of items to skip for pagination.
statusstringNoStatus of the node (e.g. pending, in_progress, done, blocked, active, accepted, current).
compactbooleanNoWhether to return a lightweight compact summary.
projectstringNoTarget project name or slug.
metadataobjectNoArbitrary structured key-value metadata.
algorithmenumNoSearch algorithm for search action.fts5 | tfidf | hybrid
attach_tostringNoNode ID to attach observation note to via references edge.
git_branchstringNoGit branch filter.
session_idstringNoActive session identifier for change attribution.
include_edgesbooleanNoWhether to include inbound/outbound edges on get.
expected_versionnumberNoOptimistic concurrency version check for update.

Details

From the project README

@putervision/state-memory-mcp

npm version version npm downloads CI Node TypeScript Website License: MIT

@putervision/state-memory-mcp is a zero-infrastructure, deterministic Model Context Protocol (MCP) server that provides AI coding assistants (such as Cursor, Claude Code, Gemini, or Copilot) with a structured, persistent SQLite graph for tracking workflow state—tasks, decisions, artifacts, plans, blockers, and their semantic relationships.

🌐 Official Documentation & Website: statememorymcp.com


⚡ Quick Start & Installation

Prerequisites: Node.js >= 18.18.0

# 1. Install globally
npm install -g @putervision/state-memory-mcp

# 2. Navigate to your project directory
cd your-project

# 3. Initialize state-memory-mcp
# Creates .state-memory-mcp/, updates .gitignore, registers project,
# and scaffolds IDE instructions and MCP configs for Cursor, Claude, VS Code, Windsurf, etc.
state-memory-mcp init

# Done! Restart your IDE or Agent Manager to activate.
Alternative Options
# Run directly via binary (after global install)
state-memory-mcp run

# Re-initialize across all registered workspace projects
state-memory-mcp init-global

🌟 Key Highlights

  • 🧠 Deterministic State Memory & Compact TaskSlices: Zero LLM in the loop for memory operations; fast, deterministic SQLite graph traversals, and sub-1KB TaskSlice extraction for System 1 fast path evaluation.
  • ⚡ 13 Production-Grade Consolidated MCP Tools: Full CRUD, relationship linking, DAG cycle checks, FTS5 search, TF-IDF RAG, time-travel history rollback, Spec-Driven Development, and auto-healing validation.
  • 📉 Efficient Context Management & Decision Thresholding: Offloads context to a local SQLite database, filters sub-0.70 routine decisions to append-only event logs to prevent graph bloat, and preserves high-significance turns.
  • 🚀 67%–74% Latency Reduction: Eliminates multi-step file scanning loops; agents retrieve unblocked tasks and blockers in milliseconds.
  • 🤝 Multi-Agent Blackboard: Shared Context Store allowing parallel subagents to publish decisions, tasks, and blocker updates safely.
  • 🎨 Interactive 3D Visualizer: Browser-based dark-mode 3D WebGL force-directed graph visualizer (state-memory-mcp view).
  • 🔗 Dual-MCP Synergy: Pair with @putervision/vision-memory-mcp for visual state caching, perceptual hashing, and cryptographic multimodal evidence packs.
  • 🛡️ 100% Local & Private: Local-first architecture; all state stays inside .state-memory-mcp/ in your workspace.

🛠️ MCP Tool Suite

@putervision/state-memory-mcp provides 13 production-grade consolidated MCP tools organized across 5 core workflow domains:

  • Graph & Relationships: manage_nodes (node CRUD, FTS5/TF-IDF vector search, atomic batch mutations, observation notes, thresholded fast decision logging), manage_edges (typed DAG links, multimodal visual state linking).
  • Task Execution & Work Queue: manage_tasks (topological dependency queue, blocker detection, task completion with artifacts, auto-prune), manage_sessions (agent attribution, turn tracking, context bootstrap).
  • Spec-Driven Development (SDD): manage_specs (PRD/RFC parsing, requirement-to-task decomposition, live acceptance criteria verification, compliance scoring).
  • Analytics, Audit & Diagnostics: get_analytics (velocity, burndown, token ROI, cognitive load, critical path), get_events (SHA-256 tamper-evident event ledger), run_diagnostics (DAG validation, health checks, AST reference integrity).
  • Data, Snapshots & Multi-Agent: manage_snapshots (checkpoints, time-travel undo), manage_database (backups, checksum audits, VCS branch merge), manage_data (bulk import/export, ML trajectories with interleaved fast decision events), query_graph (subgraphs, dependency tracing, raw SQL, sub-1KB compact_slice), use_blackboard (multi-agent asynchronous topic board).

👉 For complete parameter specifications, return schemas, and example payloads, see the Tools Reference Guide and Formal API Reference.


🚀 Architecture & State Graph Lifecycle

                      AI Agent Prompt / Task
                                │
                                ▼
               ┌─────────────────────────────────┐
               │  Agent Session Attribution       │ ──▶ manage_sessions(action: "start")
               └────────────────┬────────────────┘
                                │
                                ▼
               ┌─────────────────────────────────┐
               │  Context & Task Prioritization   │ ──▶ get_analytics(action: "summary")
               │                                 │ ──▶ manage_tasks(action: "next")
               └────────────────┬────────────────┘
                                │
                                ▼
               ┌─────────────────────────────────┐
               │  Deterministic Graph Mutation   │ ──▶ manage_nodes(action: "create"|"update")
               │  (Tasks, Decisions, Blockers)   │ ──▶ manage_edges(action: "add"|"link_visual")
               └────────────────┬────────────────┘
                                │
                                ▼
               ┌─────────────────────────────────┐
               │  Spec & Integrity Verification  │ ──▶ manage_specs(action: "compliance"|"verify")
               │                                 │ ──▶ run_diagnostics(action: "validate")
               └────────────────┬────────────────┘
                                │
                                ▼
               ┌─────────────────────────────────┐
               │  Persistent SQLite Storage      │ ──▶ .state-memory-mcp/graph.db (WAL mode)
               │  Append-Only Event Ledger       │ ──▶ SHA-256 Cryptographic Audit Chain
               └─────────────────────────────────┘

📚 Documentation Directory

Explore dedicated guides and deep dives in the docs/ directory:

GuideDescription
🏗️ Architecture & Codebase DistillationHigh-signal architectural overview, module inventory, data flows, and design decisions.
🚀 v0.10 → v1.0 Migration GuideStep-by-step migration guide, legacy tool mapping table, and STATE_MEMORY_COMPAT mode.
💡 Value Proposition & TheoryCognitive Externalization, FSM Formalism, First-Hop Determinism & Benchmark metrics.
📋 State Memory ConceptsNode Types (task, decision, blocker...), Status Values, Typed Edges & Seeding Guidelines.
⚙️ Configuration & IDE SetupAuto-Initialization details, Environment Variables table, and Editor Configs (Cursor, VS Code, Claude, Antigravity, Windsurf).
🛠️ CLI Command ReferenceCLI flags (init, run, view, inspect, metrics, audit, doctor, backup, restore, merge) & Git Scanner.
⏱️ Sessions, Snapshots & SDDSession Lifecycle, Event Audit Trail, Snapshots, Trajectories, Sub-directory support & Spec-Driven Development.
🧰 Tools, Resources & PromptsComplete reference for all 13 Consolidated MCP Tools, read-only state-memory:/// Resources, and Prompt templates.
📘 Formal API ReferenceFormal parameters, return schemas, and code signatures for all MCP endpoints.
🎨 3D Visualizer GuideViewing and exporting the interactive WebGL 3D Force-Directed Graph visualizer.
🗄️ Database SchemaSQLite tables, columns, indexes, and schema migration history.

📖 Agent Playbook: 5-Step Canonical Workflow

When an autonomous AI agent enters a repository with state-memory-mcp:

1. Orient & Bootstrap ──▶ manage_sessions(action: "start") + get_analytics(action: "summary")
2. Task Selection     ──▶ manage_tasks(action: "next") + manage_tasks(action: "find_blockers")
3. Trace Context      ──▶ query_graph(action: "trace") + manage_specs(action: "compliance")
4. Execute & Record   ──▶ manage_nodes(action: "create", type: "decision") + manage_edges(action: "link_visual")
5. Validate & Close   ──▶ run_diagnostics(action: "validate") + manage_tasks(action: "complete") + manage_sessions(action: "end")

🧪 Testing

# Run full unit, integration, and performance benchmark test suite across all 113 test files (418 tests)
npm run test

⚖️ License & Disclaimers

Developed and maintained by PuterVision. Released under the MIT License.

  • Local Storage Guarantee: All graph data, decision records, and event logs remain 100% local in your workspace. No telemetry or project data is ever transmitted.
  • Trademarks & Non-Affiliation: Product names (Cursor, Claude Code, Gemini, Windsurf, VS Code, GitHub, SQLite) are property of their respective owners and used solely for compatibility identification.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.