state-memory-mcp
@putervision/state-memory-mcp
@putervision/state-memory-mcp は、ゼロインフラストラクチャで決定的な Model Context Protocol (MCP) サーバーであり、AI コーディングアシスタント (Cursor、Claude Code、Gemini、Copilot など) に、タスク、決定、成果物、計画、ブロッカー、およびそれらの意味的関係といったワークフロー状態を追跡するための、構造化された永続的な SQLite グラフを提供します。
🌐 公式ドキュメント & ウェブサイト: statememorymcp.com
⚡ クイックスタート & インストール
前提条件: 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.代替オプション
# Run directly via binary (after global install)
state-memory-mcp run
# Re-initialize across all registered workspace projects
state-memory-mcp init-globalRelated MCP server: AIVectorMemory
🌟 主な特長
🧠 決定的な状態メモリ: メモリ操作に LLM を一切介在させません。高速で決定的な SQLite グラフ走査を実現します。
⚡ 本番グレードの統合 MCP ツール 13 個: 完全な CRUD、関係リンク、DAG サイクルチェック、FTS5 検索、TF-IDF RAG、タイムトラベル履歴ロールバック、Spec-Driven Development、自己修復バリデーション。
📉 効率的なコンテキスト管理: コンテキストをローカルの SQLite データベースにオフロードし、プロンプトコンテキストの肥大化とコンテキストウィンドウの使用量を削減します。
🚀 レイテンシを 67%–74% 削減: 多段階のファイルスキャンループを排除し、エージェントはブロックされていないタスクとブロッカーをミリ秒単位で取得できます。
🤝 マルチエージェントブラックボード: 並列サブエージェントが決定、タスク、ブロッカーの更新を安全に公開できる共有コンテキストストア。
🎨 インタラクティブな 3D ビジュアライザー: ブラウザベースのダークモード対応 3D WebGL フォースダイレクトグラフビジュアライザー (
state-memory-mcp view)。🔗 デュアル MCP シナジー:
@putervision/vision-memory-mcpと組み合わせて使用し、視覚状態キャッシュ、知覚ハッシュ、暗号化マルチモーダル証拠パックを実現します。🛡️ 100% ローカル & プライベート: ローカルファーストアーキテクチャ。すべての状態はワークスペース内の
.state-memory-mcp/に保持されます。
🛠️ MCP ツールスイート
@putervision/state-memory-mcp は、5 つの主要なワークフロードメインにわたって構成された 本番グレードの統合 MCP ツール 13 個を提供します:
グラフ & 関係:
manage_nodes(ノード CRUD、FTS5/TF-IDF ベクトル検索、原子的バッチ変更、観察ノート)、manage_edges(型付き DAG リンク、マルチモーダル視覚状態リンク)。タスク実行 & ワークキュー:
manage_tasks(トポロジカルな依存関係キュー、ブロッカー検出、成果物付きタスク完了、自動プルーニング)、manage_sessions(エージェント帰属、ターン追跡、コンテキストブートストラップ)。Spec-Driven Development (SDD):
manage_specs(PRD/RFC 解析、要件からタスクへの分解、ライブ受入基準検証、コンプライアンススコアリング)。分析、監査 & 診断:
get_analytics(ベロシティ、バーンダウン、トークン ROI、認知負荷、クリティカルパス)、get_events(SHA-256 改ざん検出可能なイベント台帳)、run_diagnostics(DAG 検証、ヘルスチェック、AST 参照整合性)。データ、スナップショット & マルチエージェント:
manage_snapshots(チェックポイント、タイムトラベル undo)、manage_database(バックアップ、チェックサム監査、VCS ブランチマージ)、manage_data(一括インポート/エクスポート、ML トラジェクトリ)、query_graph(サブグラフ、依存関係トレーシング、生 SQL)、use_blackboard(マルチエージェント非同期トピックボード)。
👉 完全なパラメータ仕様、戻り値スキーマ、サンプルペイロードについては、ツールリファレンスガイド と 正式 API リファレンス を参照してください。
🚀 アーキテクチャ & 状態グラフライフサイクル
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
└─────────────────────────────────┘📚 ドキュメントディレクトリ
専用ガイドと詳細な解説は docs/ ディレクトリでご覧いただけます:
ガイド | 説明 |
情報量の高いアーキテクチャ概要、モジュール一覧、データフロー、設計上の決定事項。 | |
ステップバイステップの移行ガイド、レガシーツール対応表、 | |
認知的外部化、FSM 形式主義、ファーストホップ決定性 & ベンチマーク指標。 | |
📋 状態メモリの概念 | ノードタイプ ( |
自動初期化の詳細、環境変数テーブル、エディタ設定 (Cursor、VS Code、Claude、Antigravity、Windsurf)。 | |
CLI フラグ ( | |
セッションライフサイクル、イベント監査証跡、スナップショット、トラジェクトリ、サブディレクトリ対応 & Spec-Driven Development。 | |
13 個の統合 MCP ツールすべて、読み取り専用の | |
すべての MCP エンドポイントの正式なパラメータ、戻り値スキーマ、コードシグネチャ。 | |
インタラクティブな WebGL 3D フォースダイレクトグラフビジュアライザーの表示とエクスポート。 | |
🗄️ データベーススキーマ | SQLite テーブル、カラム、インデックス、スキーマ移行履歴。 |
📖 エージェントプレイブック: 5 ステップの標準ワークフロー
自律型 AI エージェントが 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")🧪 テスト
# Run full unit, integration, and performance benchmark test suite across all 110 test files (406 tests)
npm run test⚖️ ライセンス & 免責事項
PuterVision によって開発・保守されています。MIT License の下で公開されています。
ローカルストレージの保証: すべてのグラフデータ、決定記録、イベントログはワークスペース内に 100% ローカルに保持されます。テレメトリやプロジェクトデータが送信されることは一切ありません。
商標 & 非提携: 製品名 (Cursor、Claude Code、Gemini、Windsurf、VS Code、GitHub、SQLite) は各所有者の財産であり、互換性の識別のみを目的として使用されています。
Available Tools
13 toolsget_analyticsARead-onlyIdempotent
Compute workflow metrics, velocity, burndown, cognitive load, decision lineages, and contradiction audits (actions: summary, velocity, burndown, value_metrics, cognitive_load, critical_path, context_snapshot, active_context, decision_trail, find_related_decisions, contradictions). Use get_analytics instead of query_graph when calculating high-level progress statistics, ROI metrics, or auditing decision conflicts.
Returns summary dashboard, velocity charts, burndown series, cognitive load metrics, critical path DAG, or contradiction reports.
Inputs: action (required), days, node_id, project, +3 more.
get_eventsARead-onlyIdempotent
Inspect the append-only event audit ledger, query structured changesets, and generate session post-mortems (actions: log, changelog, post_mortem). Use get_events instead of manage_snapshots when examining the granular chronological sequence of mutations rather than restoring state checkpoints.
Returns chronological event array, structured changeset diff, or session post-mortem markdown report.
Inputs: action (required), limit, since, until, +5 more.
manage_dataADestructive
Export and import graph structures, issue tracker items, fine-tuning trajectories, and multimodal synergy metrics (actions: export_graph, export_issues, export_trajectories, export_joint_trajectories, export_synergy_metrics, from_tick, import_graph, import_issues, import_spec). Use manage_data instead of query_graph when bulk-transferring graph data or generating AI training datasets.
Returns serialized graph payload, trajectory dataset, synergy metrics, or import statistics.
Inputs: action (required), edges, force, limit, +9 more.
manage_databaseADestructive
Physical SQLite database maintenance, backups, integrity checks, and Git VCS state sync (actions: backup, restore, audit, merge, branch_diff, branch_merge). Use manage_database instead of manage_snapshots when managing physical SQLite files, cross-branch merges, or database corruption audits.
Returns database backup path, foreign key integrity report, branch merge conflict report, or diff.
Inputs: action (required), force, project, backupPath, +5 more.
manage_edgesADestructive
Manage typed graph relationships between nodes (actions: add, remove, batch_add, link_visual). Use manage_edges instead of manage_nodes when creating or modifying relationships between existing entities rather than entity data itself.
Returns created edge record, batch count, or visual link confirmation.
Inputs: action (required), type, edges, project, +8 more.
manage_nodesADestructive
Manage graph nodes in the state graph (actions: create, update, get, remove, list, search, batch_create, batch_update, add_note). Use manage_nodes instead of manage_tasks when operating on general node types (decisions, artifacts, plans, milestones, blockers) rather than runnable task workflow states.
Returns node object, edge connections, batch results, or search matches.
Inputs: action (required), id, ids, tags, +17 more.
manage_sessionsA
Manage agent tracking sessions and multi-turn workflow attribution (actions: start, end, list, bootstrap). Use manage_sessions instead of manage_tasks when establishing agent session boundaries and tracking multi-turn workflows rather than individual work items.
Returns session record, bootstrap context snapshot, or active session listing.
Inputs: action (required), limit, project, agent_id, +4 more.
manage_snapshotsADestructive
State checkpointing, time travel, diffing, and undo operations (actions: save, list, diff, get_state, revert, undo, get_history). Use manage_snapshots instead of manage_database when reverting state graph mutations or comparing checkpoints rather than physical database file maintenance.
Returns snapshot record, state graph diff, historical graph state, or node audit history.
Inputs: action (required), force, limit, node_id, +5 more.
manage_specsA
Spec-Driven Development (SDD) lifecycle and workflow template generation (actions: scaffold, ingest, export, compliance, verify, decompose_feature, template). Use manage_specs instead of manage_nodes when authoring, ingesting, or verifying formal SDD specifications against acceptance criteria.
Returns specification AST, compliance matrix, verification verdict, or decomposed feature plan.
Inputs: action (required), name, title, format, +9 more.
manage_tasksA
Task prioritization, workflow execution, blockers, and stale task management (actions: next, complete, find_blocked, find_stale, find_blockers, find_similar_blockers, auto_prune). Use manage_tasks instead of query_graph when querying runnable tasks by priority order or resolving execution blockers.
Returns prioritized runnable tasks, blocker hierarchy, similar resolved blockers, or completion confirmation.
Inputs: action (required), type, limit, query, +16 more.
query_graphARead-onlyIdempotent
Query graph topology, neighborhoods, dependency paths, safe read-only SQL queries, and compact System One task slices (actions: subgraph, trace, raw, natural_language, compact_slice). Use query_graph instead of get_analytics when exploring graph topology and path traversals rather than aggregated numerical metrics.
Returns subgraph nodes and edges, upstream/downstream trace path, raw SQL rows, or compact task slice.
Inputs: action (required), sql, depth, query, +7 more.
run_diagnosticsADestructive
Run graph sanity checks, health diagnostics, reference validation, audit chain verification, and storage maintenance (actions: validate, doctor, check_refs, audit_chain, compact, archive, prune_events, version, dedupe). Use run_diagnostics instead of get_analytics when performing database repair, AST reference auto-healing, or verifying SHA-256 event hash chains.
Returns validation diagnostics, health report, broken reference repair log, Merkle chain audit, or maintenance stats.
Inputs: action (required), apply, checks, dry_run, +6 more.
use_blackboardADestructive
Multi-agent shared blackboard for asynchronous coordination and mutex leases (actions: get, set, delete, lease, list, post, read). Use use_blackboard instead of manage_nodes when exchanging transient inter-agent messages or mutex resource leases rather than recording persistent graph knowledge.
Returns blackboard message payload, lease acquisition status, active topic list, or deletion confirmation.
Inputs: action (required), id, mode, limit, +9 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
The descriptions are unusually thorough with explicit 'use X instead of Y' guidance, which genuinely helps separate tools like manage_nodes vs manage_edges vs use_blackboard and manage_snapshots vs manage_database vs get_events. However, the underlying domain heavily overlaps: nodes/edges/specs/blackboard all manipulate graph-like entities, and query_graph/get_analytics/run_diagnostics all operate on the same graph for read, aggregate, and maintenance purposes. Boundaries are clarified by prose rather than being intrinsically clean.
Most tools use a manage_* pattern (manage_data, manage_nodes, manage_edges, manage_sessions, manage_tasks, manage_snapshots, manage_specs, manage_database), which is consistent. But the remaining tools break the pattern with distinct verbs (query_graph, get_analytics, get_events, run_diagnostics, use_blackboard), producing mixed conventions. It remains readable, but there is no single predictable verb_noun scheme.
13 tools is within the well-scoped range and appropriate for a state/memory graph server covering graph, tasks, sessions, specs, analytics, events, and diagnostics. The design consolidates many operations as actions within each tool rather than exploding the tool count, keeping the surface manageable. Slightly heavy given the breadth, but reasonable.
Coverage is broad: node/edge CRUD, task workflow, sessions, snapshots/time-travel, specs, database maintenance, graph queries, analytics, event ledger, diagnostics, and multi-agent blackboard. Most lifecycle operations (create, update, get, list, remove, batch) appear across the mutation tools. Minor gaps exist, such as bulk-delete actions being less explicit than bulk-create.
Maintenance
Related MCP Connectors
Shared memory for your AI tools: tasks, notes and context every tool can read and write over MCP.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Cross-tool persistent memory and context for AI assistants over MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA self-hosted MCP server that provides AI assistants with a shared, persistent SQLite-backed memory for storing and retrieving project context, decisions, and discoveries. It enables cross-session continuity and team-wide knowledge sharing to keep AI coding tools aligned and informed.3MIT
- AlicenseBqualityDmaintenanceMCP server that provides cross-session persistent memory for AI coding assistants using local vector database and semantic search, enabling automatic recall of project context, issues, and tasks.997 PyPI93Apache 2.0
- FlicenseNot gradedqualityDmaintenanceA persistent, conflict-aware memory MCP server for AI coding assistants (Cursor, Claude Code).-
- AlicenseNot gradedqualityDmaintenanceA local MCP memory server that gives AI assistants durable project memory across coding sessions, storing context, changes, and decisions.1MIT