AI MemoryCAUTION
A production-ready Model Context Protocol (MCP) server for semantic memory management
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://www.npmjs.com/package/mcp-ai-memory) [](https://opensource.org/licenses/MIT)
A production-ready Model Context Protocol (MCP) server for semantic memory management that enables AI agents to store, retrieve, and manage contextual knowledge across sessions.
📖 System Prompt Available: See SYSTEM_PROMPT.md for a comprehensive guide on how to instruct AI models to use this memory system effectively. This prompt helps models understand when and how to use memory tools, especially for proactive memory retrieval.
Features
Core Capabilities
- TypeScript - Full type safety with strict mode
- PostgreSQL + pgvector - Vector similarity search with HNSW indexing
- Kysely ORM - Type-safe SQL queries
- Local Embeddings - Uses Transformers.js (no API calls)
- Intelligent Caching - Redis + in-memory fallback for blazing fast performance
- Multi-Agent Support - User context isolation
- Token Efficient - Embeddings removed from responses
Advanced Memory Management
- Graph Relationships - Rich relationship types (references, contradicts, supports, extends, causes, precedes, etc.)
- Graph Traversal - BFS/DFS algorithms with depth limits and filtering
- Memory Decay - Automatic lifecycle management with exponential decay
- Memory States - Active, dormant, archived, and expired states
- Preservation - Protect important memories from decay
- Soft Deletes - Data recovery with deleted_at timestamps
- Clustering - Automatic memory consolidation
- Compression - Automatic compression of archived memories
Prerequisites
- Node.js 18+ or Bun
- PostgreSQL with pgvector extension
- Redis (optional - falls back to in-memory cache if not available)
Installation
NPM Package (Recommended for Claude Desktop)
npm install -g mcp-ai-me
c94ca28a585bOBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add mcp-ai-memory -- npx -y [email protected]
{
"mcpServers": {
"mcp-ai-memory": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Exposed tools (25)
17 read · 5 write · 3 destructive. Blast radius: 3 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
conversation-context | read | Load conversation history and context |
last_n | read | Number of recent messages to load |
limit | read | Maximum number of memories to load |
load-context | read | Load relevant context for a task |
max_memories | read | Maximum number of memories to include |
memory-summary | read | Generate a summary of memories for a topic |
memory_batch | write | BATCH BULK MULTIPLE IMPORT - Store multiple memories at once for efficiency. Keywords: batch, bulk, multiple, import, mass store, save many, store all, bulk import, batch save |
memory_batch_delete | destructive | BATCH DELETE BULK REMOVE - Delete multiple memories at once. Keywords: batch delete, bulk remove, mass delete, delete many, remove all, clear multiple |
memory_consolidate | write | CONSOLIDATE MERGE CLUSTER DEDUPLICATE - Group and merge similar memories to reduce redundancy. Keywords: consolidate, merge, cluster, deduplicate, group, combine, compress, organize |
memory_decay_status | read | DECAY STATUS LIFECYCLE STATE - Get decay status and lifecycle information for a memory including state, decay score, and preservation status. Keywords: decay, status, lifecycle, state, age, freshness, preservation, expiry |
memory_delete | destructive | DELETE REMOVE FORGET ERASE - Delete a specific memory by ID. Keywords: delete, remove, forget, erase, clear, purge, discard, eliminate, destroy memory, remove fact, forget information |
memory_get_relations | read | GET RELATIONS SHOW LINKS - Get all relationships for a specific memory. Keywords: get relations, show links, list connections, view relationships, find associations |
memory_graph_analysis | read | GRAPH ANALYSIS CONNECTIVITY DEGREE - Analyze graph connectivity for a memory including degree metrics and relation type distribution. Keywords: graph analysis, connectivity, degree, network metrics, connections count |
memory_graph_search | read | GRAPH RELATED CONNECTED NETWORK - Search memories and traverse relationships to find connected information. Keywords: graph, related, connected, network, relationships, linked, associated, traverse connections |
memory_preserve | read | PRESERVE PROTECT KEEP PIN - Preserve a memory from decay, optionally until a specific date. Keywords: preserve, protect, keep, pin, save, retain, bookmark, favorite |
memory_relate | write | RELATE LINK CONNECT ASSOCIATE - Create a relationship between two memories. Keywords: relate, link, connect, associate, join, bind, reference, attach |
memory_stats | read | STATS STATUS INFO METRICS - Get database statistics, counts, and health metrics. Keywords: stats, status, info, metrics, statistics, counts, summary, overview, database info |
memory_store | write | STORE SAVE REMEMBER CREATE - Store new information, facts, preferences, conversations, or knowledge. Use after searching to avoid duplicates. Keywords: save, remember, store, record, memorize, learn, retain, persist, create memory, add knowledge, save fact, store preference, remember conversation |
memory_traverse | read | TRAVERSE EXPLORE GRAPH WALK - Traverse memory graph using BFS/DFS from a starting memory. Includes filtering by relation types, memory types, tags, and depth limits. Keywords: traverse, explore, graph, walk, navigate, follow, path, connections, network |
memory_unrelate | destructive | UNRELATE UNLINK DISCONNECT - Remove a relationship between two memories. Keywords: unrelate, unlink, disconnect, detach, unbind, separate |
memory_update | write | UPDATE MODIFY EDIT CHANGE - Update existing memory metadata, tags, confidence, or importance. Keywords: update, modify, edit, change, revise, amend, alter, adjust, correct, fix, improve memory, update fact, change information |
session_id | read | The session ID to load |
task | read | The task to load context for |
topic | read | The topic to summarize |
user_context | read | User context to filter memories |
Trust audit
CAUTIONgrade B · trust 89/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (6 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (8)
MEMORY_DB_URL: postgresql://postgres:postgres@localhost:5432/mcp_ai_memory_test
memory_batch_delete, memory_delete, memory_unrelate
import type { Database } from '../../types/database.js';import type { Database } from '../../types/database.js';import { EmbeddingService } from '../../services/embedding-service.js';import type { Database } from '../../types/database.js';import { extractTextForEmbedding } from '../../utils/text-extraction.js';@modelcontextprotocol/sdk, @types/node-cache, @xenova/transformers, bullmq, dotenv, ioredis, kysely, node-cache
Gates applied: no_behavioural_pass.
c94ca28a585bfull audit observations/trust-audit/mcp-server/scanadi__ai-memory-1.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | c94ca28a585b | CAUTION | B | 89 | first audit |
Questions
What is the AI Memory MCP server?
A production-ready Model Context Protocol (MCP) server for semantic memory management
What tools does AI Memory expose?
25 in total: 17 read-only, 5 that write, and 3 that can delete or overwrite (memory_batch_delete, memory_delete, memory_unrelate). Every one is listed on this page with its risk.
Is AI Memory safe to connect to an agent?
With care. The audit graded it B (89/100) and found 8 things worth knowing before you trust this server, listed below with the exact line each was found on. Separately from the audit: 3 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does AI Memory need?
No credential environment variables were found in its source, so it appears to need none.
How does AI Memory run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as mcp-ai-memory at 2.0.0.
How current is this page?
The grade is for one exact copy of the source (c94ca28a585b), read on 2026-10-08. The repository is watched and re-audited when it changes.