vision-memory-mcp
One-line summary: vision-memory-mcp is a local-first MCP server that caches visual UI states with perceptual hashing and CLIP embeddings, so AI agents can recognize screens, navigate UIs, and track visual changes without repeated vision-LLM calls.
Capabilities:
Perceive & cache screenshots —
analyze_screenshotandbatch_analyze_screenshotsingest base64 images or file paths (plus optional accessibility trees/tags), returning a matched or newly created visual state;force_refreshbypasses the L1/L2 cache.Search visual memory —
recall_memoryfinds past states by text query, screenshot, or AX tree using fast/semantic/thorough strategies;get_session_contextreturns recent states, frequent states, and cache stats.Ground elements & predict actions —
predict_next_actionsuggests the next UI action from transition success rates and goals;record_outcomelogs action transitions and updates stats.Navigate the UI graph —
get_navigation_pathsruns BFS shortest-path planning between states;wait_for_visual_statepolls until a target state appears, avoiding agent spin loops.Compare & diff visuals —
compare_statesandget_visual_diffproduce layout/region and hash-level diffs between two states.Manage snapshots —
save_visual_snapshot,export_snapshot,restore_snapshot, anddiff_visual_snapshotscheckpoint, transfer, and detect drift across visual memory versions.Enforce Visual SDD —
set_visual_spec,verify_visual_spec(with Hamming tolerance), andlist_visual_specsregister mockups as baselines and check live screenshots against them.Export training data —
export_visual_trajectoriesandexport_joint_trajectoriesemit JSON/Llava/Qwen2-VL multimodal datasets, optionally correlated by trace ID with state-memory-mcp.Integrate with state-memory-mcp —
create_visual_blockergenerates blocker payloads for logging as task-DAG nodes.Maintain privacy & hygiene —
forget_statepurges a state's embeddings and hashes;undo_last_visual_mutationreverts the last state or transition write.Monitor & introspect —
get_metricsreports cache-hit ratio, similarity scores, and token savings;app_versionreturns server/package info.
@putervision/vision-memory-mcp
@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-mcp2. Workspace Initialization
Run init in your project root to scaffold database directories, .gitignore, .env, and IDE rules:
vision-memory-mcp init --yes3. 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 viewRelated 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_sliceexport 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-mcptask 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-1KBcompact_sliceexport).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 |
High-signal architectural overview, 4-tier pipeline, module inventory, and design decisions. | |
Key features, 4-tier retrieval pipeline, element grounding, and Dual MCP Synergy. | |
Complete specifications, parameters, and schemas for all 15 consolidated MCP tools. | |
Step-by-step configs for Cursor, Claude Desktop, Antigravity, Windsurf, Zed, Roo Code & Agent Rules. | |
Full guide for all 16 CLI management, visual spec, and snapshot commands. | |
Complete | |
Encryption details, local storage privacy, and PII masking guarantees. | |
Development setup, codebase structure, and submission guidelines. | |
Security vulnerability reporting and privacy disclosures. | |
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-mcpstandalone 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-loadfor 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 toolsanalyze_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 VersionARead-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 StatesARead-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 BlockerARead-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 CheckpointsARead-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 TrajectoriesBRead-onlyIdempotent
Export unified interleaved visual state transitions and workflow graph events correlated by session/trace ID.
Inputs: limit, trace_id.
export_snapshotExport Snapshot ArchiveARead-onlyIdempotent
Export a named visual snapshot as a full standalone JSON archive containing states, transitions, and metadata.
Inputs: name (required).
export_visual_trajectoriesExport Visual TrajectoriesARead-onlyIdempotent
Export multimodal visual state transition trajectories for local model fine-tuning.
Inputs: limit, format, git_branch.
forget_stateForget Visual StateADestructive
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 MetricsARead-onlyIdempotent
Query cache-hit ratio, average visual similarity scores, and token-savings estimates.
Inputs: no named parameters.
get_session_contextGet Session ContextARead-onlyIdempotent
Fetch aggregated visual context, listing recent/frequent states and active transitions.
Inputs: include_recent, response_format, include_frequent.
get_visual_diffGet Visual DiffARead-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 SpecsARead-onlyIdempotent
List all registered Visual Spec baselines across the project and their perceptual hash details.
Inputs: no named parameters.
predict_next_actionPredict Next UI ActionARead-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 MemoryARead-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 MutationBDestructive
Undo the last visual state ingestion or transition edge addition.
Inputs: type.
verify_visual_specVerify Visual SpecARead-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 StateARead-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
Scored across 24 tools
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.
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.
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.
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
Related MCP Connectors
Shared memory for coding agents. Stop re-explaining your codebase every session.
Persistent engineering memory designed to follow developers across coding agents.
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Shared knowledge cache for AI coding agents — reuse an answer once it exists.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables LLMs to capture and analyze screenshots of your screen, windows, or regions with smart detection capabilities. Features natural language queries, automatic window targeting, and text enhancement for UI debugging and visual inspection.2MIT
- AlicenseAqualityDmaintenanceEnables blind AI coding models to debug visual bugs by capturing screenshots, analyzing them with a vision-capable model, and returning a written report.15MIT
- AlicenseNot gradedqualityDmaintenanceProvides structured visual analysis tools for coding agents, enabling UI analysis, screenshot comparison, OCR, and crop-based refinement through VLM.MIT
- AlicenseNot gradedqualityBmaintenanceEyes for text-only LLMs: decodes screenshots into exact structured text (words, coordinates, sizes, colors) using pure-code CV and OCR. Enables text-only models to reason about UI layouts without vision models or VRAM usage.2MIT