MemoryAI
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MemoryAIcapture the decision to move to Postgres and retrieve related past decisions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Core Principle
MemoryAI provides effectively unlimited persistent memory by storing large amounts of durable knowledge locally and retrieving only a bounded, highly relevant subset for the LLM context.
Traditional AI workflows dump raw conversation logs (80,000+ tokens) into the context window, causing high API costs, attention degradation, and prompt drift. MemoryAI operates as an autonomous cognitive layer that intercepts conversation events, extracts durable decisions, and dynamically layers context under strict token budgets:
User Request / IDE Event
↓
Event Normalizer (session.*, task.*, file.*, decision.*)
↓
Policy Evaluator (ignore, observe, capture, review, immediate)
↓
Memory Orchestrator (Two-Phase Writes & Privacy Redaction)
↓
SQLite Engine (FTS5 BM25 + Dense Vectors + Version Ledger)
↓
Hybrid Retrieval & Multi-Factor Reranking
↓
Progressive Disclosure Context (Level 1 → Level 2 → Level 3 → Level 4)
↓
Strict Token Budget (300 / 500 / 1,000 / 2,000 tokens)
↓
LLMRelated MCP server: ContextKeep
Key Highlights
Zero Manual Overhead: MemoryAI automatically detects project identity via Git/package manifests, recalls relevant context, captures durable decisions, and generates session handoffs.
Universal Cross-Client Portability: Normalized conversation events (
MemoryAIConversationEvent) seamlessly bridge Claude Code, Cursor, Codex, Gemini CLI, ChatGPT, and MCP clients.MCP 2026 Stateless Core & Tasks Extension: Fully compatible with the MCP 2026 specification featuring stateless execution, explicit application handles (
memoryContextId,taskId,handoffId,snapshotId), and background task management.4-Tier Progressive Disclosure: Context builds progressively—from Level 1 (150-token summary) and Level 2 (canonical facts) up to Level 3 (supporting evidence) and Level 4 (conversation traces).
Memory Snapshots & Historical Diffs: Take point-in-time project snapshots (
memoryai snapshot create) and inspect historical diffs (memoryai diff) across architectural decisions.Project Memory Health Diagnostics: Real-time 0–100 health scoring evaluating freshness, confidence, conflict rate, provenance, and handoff completeness (
memoryai health).Privacy & Two-Phase Writes: Automated detection and redaction of RSA private keys, AWS access keys, JWT tokens, connection strings, and PII before permanent storage.
Zero-Downtime Embedding Migrations: Atomic shadow table vector indexing with safe rollback capabilities (
memoryai embeddings migrate).Portable
.memorypackFormat: Export, backup, and restore persistent memories with SHA-256 integrity checks.
Quickstart
1. Installation
# Clone the repository
git clone https://github.com/memoryai/memoryai.git
cd memoryai
# Install dependencies and build monorepo packages
npm install
npm run build2. Run the 14-Point Diagnostic Doctor
# Verify database, vector indexes, encryption, SSRF protection, and MCP tools
node cli/dist/bin.js doctor3. Basic Usage (Remember & Recall)
# Store a durable architectural decision
node cli/dist/bin.js remember "Architectural decision: Standardized on Fastify v4 and SQLite with WAL mode" --type decision --importance 0.95
# Recall bounded context with a 500 token budget
node cli/dist/bin.js recall "Fastify and SQLite database decisions" --max-tokens 500Architecture
MemoryAI Platform
│
┌────────────────────────┼────────────────────────┐
▼ ▼ ▼
AI Clients MCP 2026 Layer Local SDK & CLI
(Claude, Cursor, (Stateless HTTP/Stdio, (Node, Shell, API)
Gemini, Codex, GPT) Explicit Handles)
│ │ │
└────────────────────────┼────────────────────────┘
▼
Event Normalizer
(session.*, task.*, file.*, memory.*)
│
▼
Event Policy Engine
(ignore, observe, capture, review, immediate)
│
▼
Memory Orchestrator
┌────────────────────────┼────────────────────────┐
▼ ▼ ▼
Memory Brain & Memory Job & Tasks Progressive Context
Two-Phase Write Engine (Async Long-Running) (Level 1 - 4 Layers)
│ │ │
▼ ▼ ▼
Privacy Classifier & Integrity Checker & Semantic Cache &
Selective Encryption Health Monitor (0-100) Model Router
│ │ │
└────────────────────────┼────────────────────────┘
▼
SQLite Storage Engine
(Memories, Vectors, Versions, Snapshots, Tasks, Events, Sync Queue)Event-Driven Memory
MemoryAI automatically reacts to IDE and agent lifecycle events rather than requiring manual intervention:
# Emit an event to the MemoryAI pipeline
node cli/dist/bin.js remember "Project migrated to Angular 21 with standalone components" --type decisionEvent Type | Policy Action | Default Handling |
|
| Persisted immediately with high importance |
|
| Processed through Memory Brain evaluation |
|
| Supersedes previous dependency versions |
|
| Stored as structured session continuity record |
|
| Quarantined in review queue if confidence is low |
|
| Tracked in local event log without context inflation |
|
| Auto-detects project identity and prepares handoffs |
Progressive Disclosure Context
Retrieve only the depth of information required for the current prompt:
Level 1 (Summary): Bounded 150-token executive summary of objectives and key facts.
Level 2 (Canonical): Deduplicated, high-importance memory records formatted in secure
<MEMORY_DATA>containers.Level 3 (Evidence): Canonical records paired with source provenance, file links, and timestamp metadata.
Level 4 (Conversation): Deep raw segment trace on explicit demand.
# Recall Level 1 summary context
node cli/dist/bin.js recall "OAuth architecture" --max-tokens 300MCP 2026 & Tasks Extension
MemoryAI provides a fully compliant MCP server over stdio for Claude Desktop, Claude Code, Cursor, Codex, and any MCP client.
Core MCP Tools (30 Active Tools):
memory_auto_context: Automatic project detection, intent evaluation, and bounded memory recall.memory_recall: Token-bounded hybrid retrieval.memory_progressive_recall: Multi-tiered progressive context disclosure.memory_remember: Autonomous durable memory capture.task_create,task_get,task_cancel,task_list: Non-blocking MCP 2026 Tasks extension for background jobs.memory_snapshot_create,memory_snapshot_list,memory_snapshot_compare: Point-in-time state management.memory_diff: Historical memory version comparison.memory_health: 0–100 Project Health score with diagnostic breakdown.memory_review_queue: Quarantined memory inspection and review.memory_handoff_create,memory_handoff_get: Multi-day session continuity.memory_share: Scoped permission-checked sharing.memory_explain,memory_explain_capture: Retrieval and capture diagnostic explanations.
Snapshots & Versioning
# Create a point-in-time milestone snapshot
node cli/dist/bin.js snapshot create v1.0.0-release "Production release snapshot"
# List project snapshots
node cli/dist/bin.js snapshot list
# Compare two project snapshots
node cli/dist/bin.js snapshot compare snap_abc123 snap_def456
# View historical diff of a memory record
node cli/dist/bin.js diff mem_123 1 2Health & Diagnostics
# Check 0-100 Project Memory Health score and diagnostic breakdown
node cli/dist/bin.js health
# Scan for orphaned vectors, broken provenance, or duplicate hashes
node cli/dist/bin.js verify
# Run automated conservative self-healing repair
node cli/dist/bin.js repair
# Calculate token economics and cloud API cost savings
node cli/dist/bin.js cost
# Run sandbox memory policy simulation
node cli/dist/bin.js simulate balanced
# Disaster recovery mode
node cli/dist/bin.js recoverySecurity & Privacy Architecture
Security Control | Implementation |
Privacy Classifier | Automatically rejects/redacts private keys, AWS credentials, JWT tokens, database URIs, and PII |
Prompt Injection Shield | Strict |
Tenant & User Isolation (IDOR) | Server-enforced tenant, user, and project authorization checks on every query and mutation |
SSRF Defense | Validates URLs blocking loopback ( |
Storage Encryption | AES-256-GCM authenticated encryption for sensitive content fields |
Rate Limiter | In-memory sliding window token bucket rate limiter |
Archive Security | Zip-slip directory traversal guards and decompression bomb ratio limits |
CLI Reference
Command | Description |
| Initialize local |
| Show local memory stats, project identity, and metrics |
| Store durable decision, preference, or fact |
| Retrieve bounded context with strict token limit |
| Search memories with hybrid FTS & vector matching |
| Manage structured session handoff records |
| Manage point-in-time project snapshots |
| Compare historical versions of a memory record |
| Project memory health score (0–100) |
| Scan database for integrity issues |
| Conservative automated integrity repair |
| Calculate cloud token reduction and cost savings |
| Run sandbox policy simulation |
| Run 14-point system diagnostics |
| Verify security hardening posture |
| Export memories to portable |
| Import memories from |
Testing & Verification
# Run all 89 unit, integration, memory, retrieval, MCP, concurrency, and performance tests
npm test
# Run all 22 OWASP API Top 10 and Privacy Security tests
npm run test:security
# Run combined full test suite
npm run test:allLicense
MIT License. Copyright (c) 2026 MemoryAI Contributors.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides AI agents with persistent, searchable memory that survives across conversations using semantic search, temporal versioning, and smart organization. Enables long-term context retention and cross-session continuity for AI assistants.14
- AlicenseNot gradedqualityAmaintenanceProvides infinite long-term memory for AI agents with persistent, searchable storage of project details, preferences, and snippets. Reduces token costs by retrieving only relevant memories while keeping all data stored locally.154MIT
- AlicenseNot gradedqualityAmaintenanceEnables persistent, portable memory for AI agents across sessions, devices, and providers with token-efficient 5-level lazy loading and automatic session capture.41MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to maintain persistent, local memory with retrieval-augmented search, knowledge graphs, and context surfacing, without any cloud dependencies.144MIT
Related MCP Connectors
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Persistent memory for AI agents — verbatim conversations, searchable by meaning.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/toozuuu/MemoryAI'
If you have feedback or need assistance with the MCP directory API, please join our Discord server