Skip to main content
Glama

@putervision/vision-memory-mcp

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

@putervision/vision-memory-mcp is a zero-infrastructure, local-first Model Context Protocol (MCP) server and CLI tool that provides AI coding assistants (such as Cursor, Claude Code, Gemini, or Copilot) with visual state caching using perceptual hashing, local CLIP embeddings, and transition graphs to eliminate repetitive vision LLM calls.

🌐 Official Documentation & Website: visionmemorymcp.com


⚡ Quick Start & Installation

Prerequisites: Node.js >= 18.18.0

1. Installation

# Global installation via npm
npm install -g @putervision/vision-memory-mcp

2. Workspace Initialization

Run init in your project root to scaffold database directories, .gitignore, .env, and IDE rules:

vision-memory-mcp init --yes

3. Basic MCP Client Setup

Add to your MCP client config (e.g. .cursor/mcp.json or .vscode/mcp.json):

{
  "mcpServers": {
    "vision-memory-mcp": {
      "command": "vision-memory-mcp",
      "args": ["run"]
    }
  }
}

Alternative Options & CLI Usage Examples

# Run stdio MCP server directly via binary (after global install)
vision-memory-mcp run

# Start server skipping heavy CLIP model downloads (air-gapped / offline mode)
vision-memory-mcp run --skip-model-load

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

# Health check dependencies, sharp bindings, and git safety
vision-memory-mcp doctor

# Run health diagnostics & aggregate metrics across all registered projects
vision-memory-mcp doctor-global

# Inspect stored visual states and metadata in terminal ASCII table
vision-memory-mcp inspect

# Register baseline design mockup contract (Visual SDD)
vision-memory-mcp spec set --name "Dashboard" --file ./dashboard-spec.png

# Save visual memory checkpoint snapshot
vision-memory-mcp snapshot save --name "v1.0-milestone"

# Ingest WebM / MP4 video recording into visual state memory timeline
vision-memory-mcp video ingest ./playwright-test.webm --category playwright_test

# Open interactive force-directed visual graph viewer in browser
vision-memory-mcp view

Related MCP server: Vision-Graft MCP

🌟 Key Highlights

  • 👁️ Perceptual Visual Caching & Compact Slices: Sub-5ms L1/L2 dHash zero-token fast-path layout recognition and sub-1KB compact_slice export for Pentad System 1 StatePack assembly.

  • 🎬 WebM & MP4 Video Ingestion: Digest E2E test recordings & screen captures into searchable keyframe visual states & state transition graphs.

  • ⚡ 15 Core MCP Tools: High-coherence consolidated toolset covering perception, video memory, evidence packs, trajectory comparison, semantic retrieval, element grounding, visual SDD, snapshots, and unified context & metrics.

  • 🔗 Dual-MCP Synergy & Immutable Evidence Packs: Deeply bridges @putervision/state-memory-mcp task DAGs with visual state memory, generating cryptographically hashable evidence packs for compliance and audit trails.

  • 📉 Reduced Token Overhead: Caches UI states locally using dHash, local CLIP vector search, and accessibility trees to maximize vision token savings.

  • 🚀 Sub-5ms Fast-Path Latency: Eliminates repetitive vision LLM API calls and avoids visual hallucination loops.

  • 🎯 Element Grounding & Action Target Prediction: Maps screen elements to CSS selectors and coordinates for deterministic UI interaction.

  • 🎨 Visual Spec-Driven Development (Visual SDD): Register design mockups or screenshots as perceptual baseline contracts to verify visual regression.

  • 🛡️ 100% Local-First Privacy: Local LanceDB vector store, local CLIP model, zero cloud telemetry, and PII redaction guarantees.


🛠️ MCP Tool Suite

@putervision/vision-memory-mcp provides 15 production-grade consolidated MCP tools structured across 4 core visual perception & automation domains:

  • Perception & Semantic Search: analyze_screenshot (L1/L2 perceptual dHash & AX tree parsing, single/batch), recall_memory (text & image semantic vector search), get_session_context (aggregated cache hit metrics, recent states, and sub-1KB compact_slice export).

  • Element Grounding & Navigation: predict_next_action (deterministic CSS selectors & bounding coordinates), record_outcome (UI action transitions & visual blockers), get_navigation_paths (BFS shortest-path planner), wait_for_visual_state (polling for target UI state).

  • Video Trajectories & Evidence Packs: manage_video (WebM/MP4 keyframe ingestion, timeline search), compare_states (visual layout diffs & video trajectory comparison), create_evidence_pack (cryptographic audit proof linking video keyframes to state-memory DAGs), export_trajectories (multimodal fine-tuning datasets).

  • Snapshots & Visual SDD: manage_visual_spec (mockup baseline contracts & regression checks), manage_snapshot (checkpoints, export, restore), undo_visual_mutation (revert state ingestion), forget_state (privacy & PII purging).

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


🚀 Architecture At a Glance

                     Incoming Screen
                            │
                            ▼
              ┌──────────────────────────────┐
              │ L1: In-Memory Cache Lookup   │ ──(Hit)──▶ Return Cached Description & Grounded Elements
              └──────────────┬───────────────┘
                             │ (Miss)
                             ▼
              ┌──────────────────────────────┐
              │ L2: Perceptual Hash Scan     │ ──(Hit)──▶ Return Cached Description & Grounded Elements
              └──────────────┬───────────────┘
                             │ (Miss)
                             ▼
              ┌──────────────────────────────┐
              │ L3: Local CLIP Vector Search │ ──(Hit)──▶ Return Semantically Close
              └──────────────┬───────────────┘
                             │ (Miss)
                             ▼
              ┌──────────────────────────────┐
              │ L4: Vision LLM Fallback      │ ──(Ingest)──▶ Save Redacted State to DB
              └──────────────┬───────────────┘

📚 Documentation Directory

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

Guide

Description

🏗️ Architecture & Codebase Distillation

High-signal architectural overview, 4-tier pipeline, module inventory, and design decisions.

🚀 Features & Architecture

Key features, 4-tier retrieval pipeline, element grounding, and Dual MCP Synergy.

📘 Formal API Reference

Complete specifications, parameters, and schemas for all 15 consolidated MCP tools.

🔌 Multi-IDE Integration Guide

Step-by-step configs for Cursor, Claude Desktop, Antigravity, Windsurf, Zed, Roo Code & Agent Rules.

💻 CLI Commands Reference

Full guide for all 16 CLI management, visual spec, and snapshot commands.

⚙️ Configuration Guide

Complete .env environment variables, thresholds, and L4 vision fallback setup.

🔒 Storage Encryption & Security

Encryption details, local storage privacy, and PII masking guarantees.

🤝 Contributing Guide

Development setup, codebase structure, and submission guidelines.

🛡️ Security Policy

Security vulnerability reporting and privacy disclosures.

📜 Changelog

Chronological record of release features, fixes, and patch updates.


⚠️ When Not to Use This Server

While vision-memory-mcp is designed for visual frontend state caching, UI testing, and multimodal workflows, it may not be appropriate for:

  • Headless / Pure Backend Development: Non-visual CLI tools, database scripts, or pure backend microservices with no UI rendering. (Use state-memory-mcp standalone instead).

  • High-Framerate Live Video Streaming: Continuous 60 fps live video ingest without discrete keyframe or test action boundaries.

  • Ultra Low-Memory Embedded Environments (<512 MB RAM): Running full local CLIP neural embeddings requires ~300 MB RAM (use --skip-model-load for lightweight dHash-only perception if memory is constrained).


🧪 Testing

# Run full unit and integration test suite across all 72 test files (312 tests)
npm run test

⚖️ License & Disclaimers

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

  • Local Storage Guarantee: Provided "as is" without warranty. Screenshots, perceptual hashes, vector embeddings, and transition graphs are stored locally unencrypted at the application level in .vision-memory-mcp/. Zero telemetry or analytics data is ever transmitted.

  • Trademarks & Non-Affiliation: Product names (Cursor, Claude Code, Gemini, Windsurf, VS Code, Sharp, LanceDB, ONNX, HuggingFace) are property of their respective owners and used solely for compatibility identification.

Available Tools

24 tools
analyze_screenshotAnalyze & Cache ScreenshotA

Ingest a screenshot or file path, check visual state cache, and return details of the state (generating a new memory entry if not matched).

Inputs: tags, trace_id, file_path, git_branch, +6 more.

app_versionGet Application VersionA
Read-onlyIdempotent

Get version, package name, MCP identifier, and server information of vision-memory-mcp.

Inputs: no named parameters.

batch_analyze_screenshotsBatch Analyze ScreenshotsC

Process multiple screenshots or file paths in a single batch call.

Inputs: items (required), git_branch, response_format.

compare_statesCompare Visual StatesA
Read-onlyIdempotent

Compare two states visually and structurally with key-level JSON diffs.

Inputs: state_a_id (required), state_b_id (required), response_format.

create_visual_blockerCreate Visual BlockerA
Read-onlyIdempotent

Generates a structured visual blocker payload. The calling agent should use the output to call state-memory-mcp:add_node to log a blocker.

Inputs: description (required), visual_state_id (required), project.

diff_visual_snapshotsDiff Visual CheckpointsA
Read-onlyIdempotent

Diff two snapshots to locate additions, deletions, or visual drift regressions.

Inputs: snapshot_a_name (required), snapshot_b_name (required).

export_joint_trajectoriesExport Joint TrajectoriesB
Read-onlyIdempotent

Export unified interleaved visual state transitions and workflow graph events correlated by session/trace ID.

Inputs: limit, trace_id.

export_snapshotExport Snapshot ArchiveA
Read-onlyIdempotent

Export a named visual snapshot as a full standalone JSON archive containing states, transitions, and metadata.

Inputs: name (required).

export_visual_trajectoriesExport Visual TrajectoriesA
Read-onlyIdempotent

Export multimodal visual state transition trajectories for local model fine-tuning.

Inputs: limit, format, git_branch.

forget_stateForget Visual StateA
Destructive

Purge a specific visual state, its vector embeddings, and perceptual hashes from storage for privacy or memory reset.

Inputs: state_id (required).

get_metricsGet Cache & Query MetricsA
Read-onlyIdempotent

Query cache-hit ratio, average visual similarity scores, and token-savings estimates.

Inputs: no named parameters.

get_navigation_pathsFind UI Navigation PathA
Read-onlyIdempotent

Trace historical pathways from current state to a target state or state matching description.

Inputs: max_hops, to_state_id, from_state_id, to_description, +1 more.

get_session_contextGet Session ContextA
Read-onlyIdempotent

Fetch aggregated visual context, listing recent/frequent states and active transitions.

Inputs: include_recent, response_format, include_frequent.

get_visual_diffGet Visual DiffA
Read-onlyIdempotent

Calculate perceptual dHash diff and region deltas between two visual states.

Inputs: state_id_a (required), state_id_b (required).

list_visual_specsList Visual SpecsA
Read-onlyIdempotent

List all registered Visual Spec baselines across the project and their perceptual hash details.

Inputs: no named parameters.

predict_next_actionPredict Next UI ActionA
Read-onlyIdempotent

Predict the best next UI action from current visual state based on transition success rates and goal alignment.

Inputs: current_state_id (required), goal_state_id, goal_description.

recall_memorySearch Visual MemoryA
Read-onlyIdempotent

Search visual state memory using screenshot image, text query, or accessibility tree.

Inputs: limit, query, strategy, file_path, +4 more.

record_outcomeRecord Action OutcomeA

Log an action transition between two visual states and update transition statistics.

Inputs: action (required), success (required), to_state_id (required), from_state_id (required), +4 more.

restore_snapshotRestore Snapshot ArchiveB

Restore a visual memory snapshot from an exported archive JSON object.

Inputs: archive_json (required).

save_visual_snapshotSave Visual CheckpointA

Saves current visual memory states as a named checkpoint snapshot.

Inputs: name (required), description.

set_visual_specSet Visual SpecA

Set a screenshot or mockup design as a Visual Spec baseline for UI compliance testing.

Inputs: name (required), file_path, screenshot.

undo_last_visual_mutationUndo Visual MutationB
Destructive

Undo the last visual state ingestion or transition edge addition.

Inputs: type.

verify_visual_specVerify Visual SpecA
Read-onlyIdempotent

Verify a live captured UI screenshot against a registered Visual Spec baseline.

Inputs: spec_name (required), file_path, tolerance, screenshot, +1 more.

wait_for_visual_stateWait For Visual StateA
Read-onlyIdempotent

Poll for a target visual state ID until it exists in memory or timeout occurs, avoiding spinning agent loops.

Inputs: target_state_id (required), timeout_ms, poll_interval_ms.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 24 tools

    Disambiguation2/5

    Several tools have overlapping purposes: compare_states and get_visual_diff both return visual differences between two states; analyze_screenshot and recall_memory both accept screenshots and return state information; export_visual_trajectories and export_joint_trajectories both export trajectory data; save_visual_snapshot and export_snapshot both create snapshot archives. This creates ambiguity in tool selection.

    Naming Consistency4/5

    Most tools follow a consistent verb_noun pattern (e.g., list_visual_specs, analyze_screenshot, recall_memory). The only outlier is 'app_version', which is a noun phrase rather than an action. Minor inconsistency.

    Tool Count2/5

    At 24 tools, the set feels bloated. Several tools could be consolidated (compare_states/get_visual_diff, export_visual_trajectories/export_joint_trajectories, save_visual_snapshot/export_snapshot), and batch_analyze_screenshots is just a convenience wrapper. The count exceeds the recommended range and doesn't justify itself.

    Completeness3/5

    The tool set covers core visual memory operations (ingest, search, compare, snapshot, export, forget, navigate), but has gaps: no direct way to list all visual states, no update/delete for visual specs, and create_visual_blocker depends on an external server (state-memory-mcp) for the actual logging, creating a dead end. Overall coverage is decent but not comprehensive.

    Maintenance

    ActivityNo data
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers