State Memory MCP

io.github.putervision由 GitHub 账号 putervision 发布v1.4.1更新于 Oct 24, 2026

Persistent workflow graph server tracking tasks, decisions, spatial entities, and blockers.

发布方自己的服务:Memory.fit

概览

AI 生成的概览

本地 SQLite 工作流图谱服务器,让 AI 编程助手跨会话跟踪任务、决策、阻塞项、规格及其关系。

可以做什么
  • 创建、更新和搜索任务、决策、阻塞项、产物等图谱节点,并用带类型的边连接它们。
  • 按依赖顺序处理任务队列、检测阻塞、带产物完成任务并管理代理会话。
  • 解析规格文档为需求与任务,校验验收标准并计算合规评分。
  • 查询子图、追踪依赖、执行原始 SQL 并提取精简的上下文切片。
  • 读取分析指标、审计事件、快照与备份,并通过共享黑板协调并行代理。
适用场景
适合跨多个会话的长周期编码工作,让助手记住计划、决策和未解决的阻塞,而不必反复扫描文件。也适合规格驱动开发和需要共享本地状态存储的并行子代理。
运行要求
作为本地 stdio 进程在桌面运行;需要 Node.js 18.18.0 或更高版本并全局安装该 npm 包。初始化会在项目中写入 .state-memory-mcp/ 目录,并生成 IDE 与 MCP 配置。未声明认证、环境变量或请求头。
安装前请注意
助手可以写入、修改和删除图谱数据、执行原始 SQL、回滚到快照以及合并数据库分支,请审慎对待破坏性操作。初始化过程还会修改 .gitignore 和 IDE/MCP 配置文件。状态保存在项目目录本地,应将该目录视为敏感数据并做好备份。

安装

在 SourceWeft 中

  1. 打开 控制台中的 State Memory MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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

bash
# 1. Install globallynpm install -g @putervision/state-memory-mcp
# 2. Navigate to your project directorycd 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

bash
# Run directly via binary (after global install)state-memory-mcp run
# Re-initialize across all registered workspace projectsstate-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

bash
# 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.

来源:README.md,提交 0f60ae4

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

5
  1. v1.4.1最新Oct 3, 2026
  2. v1.4.0Oct 2, 2026
  3. v1.3.1Sep 29, 2026
  4. v1.3.0Sep 26, 2026
  5. v1.2.1Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Memory 集成