Skip to main content
Glama

@putervision/state-memory-mcp

npm version npm downloads CI Node TypeScript Website License: MIT

@putervision/state-memory-mcp는 제로 인프라, 결정론적(deterministic) 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-global

Related MCP server: AIVectorMemory

🌟 주요 특징

  • 🧠 결정론적 상태 메모리: 메모리 연산에 LLM이 개입하지 않으며, 빠르고 결정론적인 SQLite 그래프 탐색을 제공합니다.

  • ⚡ 13개의 프로덕션급 통합 MCP 도구: 전체 CRUD, 관계 연결, DAG 사이클 검사, FTS5 검색, TF-IDF RAG, 타임트래블 기록 롤백, 명세 기반 개발(SDD) 및 자동 복구 검증을 지원합니다.

  • 📉 효율적인 컨텍스트 관리: 컨텍스트를 로컬 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가지 핵심 워크플로 도메인에 걸쳐 구성된 13개의 프로덕션급 통합 MCP 도구를 제공합니다:

  • 그래프 및 관계: manage_nodes(노드 CRUD, FTS5/TF-IDF 벡터 검색, 원자적 배치 변경, 관찰 메모), manage_edges(타입화된 DAG 링크, 멀티모달 시각적 상태 연결).

  • 작업 실행 및 작업 큐: manage_tasks(위상 정렬 의존성 큐, 차단 항목 감지, 산출물 포함 작업 완료, 자동 정리), manage_sessions(에이전트 귀속, 턴 추적, 컨텍스트 부트스트랩).

  • 명세 기반 개발(SDD): manage_specs(PRD/RFC 파싱, 요구사항-작업 분해, 실시간 승인 기준 검증, 준수 점수 산정).

  • 분석, 감사 및 진단: get_analytics(벨로시티, 번다운, 토큰 ROI, 인지 부하, 임계 경로), get_events(SHA-256 변조 방지 이벤트 원장), run_diagnostics(DAG 검증, 상태 점검, AST 참조 무결성).

  • 데이터, 스냅샷 및 멀티 에이전트: manage_snapshots(체크포인트, 타임트래블 실행 취소), 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/ 디렉토리에서 전용 가이드와 심층 분석을 살펴보세요:

가이드

설명

🏗️ 아키텍처 및 코드베이스 요약

정보 밀도가 높은 아키텍처 개요, 모듈 인벤토리, 데이터 흐름 및 설계 결정 사항.

🚀 v0.10 → v1.0 마이그레이션 가이드

단계별 마이그레이션 가이드, 레거시 도구 매핑 테이블 및 STATE_MEMORY_COMPAT 모드.

💡 가치 제안 및 이론

인지 외부화, FSM 형식주의, 첫 홉 결정론 및 벤치마크 지표.

📋 상태 메모리 개념

노드 유형(task, decision, blocker 등), 상태 값, 타입화된 엣지 및 시딩 가이드라인.

⚙️ 구성 및 IDE 설정

자동 초기화 세부 사항, 환경 변수 테이블 및 에디터 구성(Cursor, VS Code, Claude, Antigravity, Windsurf).

🛠️ CLI 명령어 레퍼런스

CLI 플래그(init, run, view, inspect, metrics, audit, doctor, backup, restore, merge) 및 Git 스캐너.

⏱️ 세션, 스냅샷 및 SDD

세션 수명주기, 이벤트 감사 추적, 스냅샷, 궤적, 하위 디렉토리 지원 및 명세 기반 개발.

🧰 도구, 리소스 및 프롬프트

13개 통합 MCP 도구 전체, 읽기 전용 state-memory:/// 리소스 및 프롬프트 템플릿에 대한 완전한 레퍼런스.

📘 공식 API 레퍼런스

모든 MCP 엔드포인트에 대한 공식 매개변수, 반환 스키마 및 코드 시그니처.

🎨 3D 비주얼라이저 가이드

인터랙티브 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 라이선스에 따라 배포됩니다.

  • 로컬 저장 보장: 모든 그래프 데이터, 결정 기록 및 이벤트 로그는 작업 공간에 100% 로컬로 유지됩니다. 텔레메트리 또는 프로젝트 데이터가 전송되는 경우는 없습니다.

  • 상표 및 비제휴: 제품 이름(Cursor, Claude Code, Gemini, Windsurf, VS Code, GitHub, SQLite)은 각 소유자의 자산이며 호환성 식별 목적으로만 사용됩니다.

Available Tools

13 tools
get_analyticsA
Read-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_eventsA
Read-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_dataA
Destructive

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_databaseA
Destructive

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_edgesA
Destructive

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_nodesA
Destructive

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_snapshotsA
Destructive

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_graphA
Read-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_diagnosticsA
Destructive

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_blackboardA
Destructive

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

    A3.7/5.0

    Scored across 13 tools

    Disambiguation3/5

    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.

    Naming Consistency3/5

    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.

    Tool Count4/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A 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.
      3
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      MCP 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.
      9
      97 PyPI
      93
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      A local MCP memory server that gives AI assistants durable project memory across coding sessions, storing context, changes, and decisions.
      1
      MIT