Prism MCP
The Mind Palace for AI Agents - MCP server with persistent memory, behavioral learning, dynamic role resolution, time travel, multi-agent sync, and visual dashboard. Zero-config local mode with SQLite.
Install / Use
/learn @dcostenco/Prism MCPQuality Score
Category
Development & EngineeringSupported Platforms
README
Prism MCP — The Mind Palace for AI Agents 🧠
Your AI agent's memory that survives between sessions. Prism MCP is a Model Context Protocol server that gives Claude Desktop, Cursor, Windsurf, and any MCP client persistent memory, time travel, visual context, multi-agent sync, GDPR-compliant deletion, memory tracing, and LangChain integration — all running locally with zero cloud dependencies.
Built with SQLite + F32_BLOB vector search, optimistic concurrency control, MCP Prompts & Resources, auto-compaction, Gemini-powered Morning Briefings, MemoryTrace explainability, and optional Supabase cloud sync.
Table of Contents
- What's New (v4.0.0)
- Multi-Instance Support
- How Prism Compares
- Quick Start
- Mind Palace Dashboard
- Integration Examples
- Claude Code Integration (Hooks)
- Gemini / Antigravity Integration
- Use Cases
- Architecture
- Tool Reference
- Agent Hivemind — Role Usage
- LangChain / LangGraph Integration
- Environment Variables
- Boot Settings (Restart Required)
- Progressive Context Loading
- Time Travel
- Agent Telepathy
- Knowledge Accumulation
- GDPR Compliance
- Observability & Tracing
- Supabase Setup
- Project Structure
- Hybrid Search Pipeline
- 🚀 Roadmap
What's New in v4.0.0 — Behavioral Memory 🧠
| Feature | Description |
|---|---|
| 🧠 Behavioral Memory | session_save_experience — log actions, outcomes, corrections with confidence scores. Auto-injects warnings into context so agents learn from mistakes. |
| 🎯 Dynamic Roles | Role auto-resolves from dashboard settings. Set once in Mind Palace, applies everywhere. |
| 📏 Token Budget | max_tokens on session_load_context — intelligently truncates to fit your budget. |
| 📉 Importance Decay | Stale corrections auto-fade over time to keep context fresh. |
| 🔧 Claude Code Hooks | Simplified SessionStart/Stop hooks that reliably trigger MCP tool calls. |
| 🔄 Auto-Migrations (Supabase) | Zero-config schema upgrades — pending DDL migrations run automatically on server startup via prism_apply_ddl RPC. |
| 🔀 Multi-Instance Support | PRISM_INSTANCE env var enables instance-aware PID locks — run multiple Prism servers side-by-side without conflicts. |
| Feature | Description |
|---|---|
| 📊 Memory Analytics | Dashboard sparkline chart, session counts, rollup savings, context richness metrics. |
| ⏳ Data Retention (TTL) | Per-project TTL via knowledge_set_retention or dashboard. Auto-expires old entries every 12h. |
| 🗜️ Auto-Compaction | Background health check after saves — auto-compacts when brain is degraded. |
| 📦 PKM Export | Export project memory as ZIP of Markdown files for Obsidian/Logseq. |
| 🧪 95 Tests | Analytics, TTL, rollup, compaction, type guards, and export coverage. |
| Feature | Description |
|---|---|
| 🧹 Brain Health Clean-up | One-click Fix Issues button — detects and cleans orphaned handoffs, missing embeddings, stale rollups. |
| 👤 Agent Identity | Set Default Role and Agent Name in dashboard — auto-applies as fallback in all tools. |
| 📜 Role-Scoped Skills | Per-role persistent rules documents, auto-injected at session_load_context. |
| 🔤 Resource Formatting | memory:// resources render as formatted text instead of raw JSON. |
| Feature | Description |
|---|---|
| 🐝 Role-Scoped Memory | Optional role param — each role gets isolated memory within a project. |
| 👥 Agent Registry | agent_register, agent_heartbeat, agent_list_team — multi-agent discovery. |
| 🎯 Team Roster | Auto-injected teammate awareness during context loading. |
| ⚙️ Dashboard Settings | Runtime toggles backed by persistent key-value store. |
| 📡 Hivemind Radar | Dashboard widget showing active agents, roles, and heartbeats. |
| 🔒 Conditional Tools | PRISM_ENABLE_HIVEMIND gates multi-agent tools. |
| ✅ 58 Tests | Storage, tools, dashboard, concurrent writes, role isolation. |
| Feature | Description |
|---|---|
| 🔍 Memory Tracing | MemoryTrace with latency breakdown and scoring metadata for LangSmith. |
| 🛡️ GDPR Deletion | session_forget_memory with soft/hard delete and Article 17 justification. |
| 🔗 LangChain Integration | PrismMemoryRetriever / PrismKnowledgeRetriever BaseRetriever adapters. |
| 🧩 LangGraph Agent | 5-node research agent example with MCP bridge and hybrid search. |
| Feature | Description |
|---|---|
| 🔄 Dynamic Versioning | Version derived from package.json — MCP handshake, dashboard, and npm stay in sync. |
| 🛡️ Embedding Validation | Validates 768-dimension vectors at runtime to catch model regressions. |
| Feature | Description |
|---|---|
| 🪲 Windows Black Screen Fix | Fixed Python subprocess.Popen spawning visible Node.js terminal windows on Windows. |
| 📝 Debug Logging | Gated verbose startup logs behind PRISM_DEBUG_LOGGING for a cleaner default experience. |
| ⚡ Excess Loading Fixes | Performance improvements to resolve excess loading loops. |
| Feature | Description |
|---|---|
| 🤖 LangGraph Agent | 5-node research agent with autonomous looping, MCP integration, persistent memory. |
| 🧠 Agentic Memory | save_session node persists findings to ledger — agents don't just answer and forget. |
| 🔌 MCP Client Bridge | JSON-RPC 2.0 client wraps Prism tools as LangChain StructuredTool objects. |
| 🔧 Storage Fix | Resource/Prompt handlers route through getStorage() — eliminates EOF crashes. |
| 🛡️ Error Boundaries | Graceful error handling with proper MCP error responses. |
| Feature | Description |
|---|---|
| 🩺 Brain Health Check | session_health_check — like Unix fsck for your agent's memory. Detects missing embeddings, duplicate entries, orphaned handoffs, and stale rollups. Use auto_fix: true to repair automatically. |
| 📊 Mind Palace Health | Brain health indicator on the Mind Palace Dashboard — see your memory integrity at a glance. 🧹 Fix Issues button auto-deletes orphaned handoffs in one click. |
| Feature | Description |
|---|---|
| 🏠 Local-First SQLite | Run Prism entirely locally with zero cloud dependencies. Full vector search (libSQL F32_BLOB) and FTS5 included. |
| 🔮 Mind Palace UI | A beautiful glassmorphism dashboard at localhost:3000 to inspect your agent's memory, visual vault, and Git drift. |
| 🕰️ Time Travel | memory_history and memory_checkout act like git revert for your agent's brain — full version history with OCC. |
| 🖼️ Visual Memory | Agents can save screenshots to a local media vault. Auto-capture mode snapshots your local dev server on every handoff save. |
| 📡 Agent Telepathy | Multi-client sync: if your agent in Cursor saves state, Claude Desktop gets a live notification instantly. |
| 🌅 Morning Briefing | Gemini auto-synthesizes a 3-bullet action plan if it's been >4 hours since your last session. |
| 📝 Code Mode Templates | 8 pre-built QuickJS extraction templates for GitHub, Jira, OpenAPI, Slack, CSV, and DOM parsing — zero reasoning tokens. |
| 🔍 Reality Drift Detection | Prism captures Git state on save and warns if files changed outside the agent's view. |
💡 TL;DR: Prism MCP gives your AI agent persistent memory using
