SimpleMem MCP Server
Click on "Deploy 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., "@SimpleMem MCP Server Save this chat and tell me where Alice and Bob planned to meet"
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.
SimpleMem MCP Server
A Model Context Protocol (MCP) server for SimpleMem - an efficient lifelong memory system for LLM agents based on semantic lossless compression.
Overview
SimpleMem MCP Server exposes SimpleMem's powerful memory capabilities through the Model Context Protocol, enabling AI assistants like Claude to:
Store conversations with semantic lossless compression
Retrieve memories using three-stage hybrid retrieval (semantic + lexical + symbolic)
Answer questions based on long-term memory with 43.24% F1 score on LoCoMo-10 benchmark
Manage atomic memory entries with automatic coreference resolution and temporal anchoring
Key Features
Three-Stage Memory Pipeline:
Semantic Structured Compression: Converts dialogues → atomic, self-contained facts
Multi-View Indexing: Semantic (vector) + Lexical (BM25) + Symbolic (metadata)
Adaptive Query-Aware Retrieval: Planning-based decomposition + reflection mechanism
Advanced Processing:
Coreference resolution (he/she → actual names)
Temporal anchoring (tomorrow → absolute timestamps)
Parallel processing with configurable workers
Windowed batch processing for efficiency
Performance: 30× fewer tokens than full-context methods with superior retrieval accuracy
Related MCP server: Memorium
Architecture
┌─────────────────────────┐
│ MCP Client │
│ (Claude, Cursor, etc) │
└───────────┬─────────────┘
│ stdio
▼
┌─────────────────────────────────┐
│ SimpleMem MCP Server (Node) │
│ - Tool handlers │
│ - Resource providers │
│ - Input validation (Zod) │
└───────────┬─────────────────────┘
│ spawn
▼
┌─────────────────────────────────┐
│ SimpleMem (Python) │
│ - Semantic compression │
│ - Hybrid retrieval │
│ - LanceDB vector store │
└─────────────────────────────────┘Prerequisites
Node.js 18+ and npm
Python 3.8+
SimpleMem installed and configured
OpenAI API key (or compatible LLM provider)
Installation
1. Clone and Install
cd SimpleMem-MCP
npm install
npm run build2. Configure SimpleMem
Make sure SimpleMem is properly set up:
# Navigate to SimpleMem directory
cd /path/to/SimpleMem
# Copy and configure config file
cp config.py.example config.py
# Edit config.py with your settings
# - OPENAI_API_KEY
# - LLM_MODEL (e.g., "gpt-4.1-mini")
# - EMBEDDING_MODEL (e.g., "Qwen/Qwen3-Embedding-0.6B")
# Install Python dependencies
pip install -r requirements.txt3. Set Environment Variables
Create a .env file in SimpleMem-MCP directory:
cp .env.example .envEdit .env:
# Path to SimpleMem project directory
SIMPLEMEM_PATH=/Users/jiaqi/Myprojects/new/SimpleMem
# Path to LanceDB database directory (relative to SimpleMem)
SIMPLEMEM_DB_PATH=./lancedb_data
# Python executable (optional)
PYTHON_PATH=python3Usage
Configuration for Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"simplemem": {
"command": "node",
"args": ["/path/to/SimpleMem-MCP/dist/index.js"],
"env": {
"SIMPLEMEM_PATH": "/path/to/SimpleMem",
"SIMPLEMEM_DB_PATH": "./lancedb_data"
}
}
}
}Restart Claude Desktop
After saving the configuration, restart Claude Desktop to load the MCP server.
Available Tools
1. add_dialogue
Add a single dialogue to the memory system.
Parameters:
speaker(required): Name of the speakercontent(required): What was said (max 200k chars)timestamp(optional): ISO 8601 timestamp (e.g., "2025-11-15T14:30:00")
Example:
User: "Remember this conversation. Alice said: 'Bob, let's meet at Starbucks tomorrow at 2pm.'"2. add_dialogues
Batch add multiple dialogues (more efficient).
Parameters:
dialogues(required): Array of dialogue objects
Example:
{
"dialogues": [
{
"speaker": "Alice",
"content": "Bob, let's meet at Starbucks tomorrow at 2pm",
"timestamp": "2025-11-15T14:30:00"
},
{
"speaker": "Bob",
"content": "Sure, I'll bring the market analysis report",
"timestamp": "2025-11-15T14:31:00"
}
]
}3. finalize
Process all buffered dialogues into memory entries. Important: Always call this after adding dialogues.
SimpleMem uses windowed processing (default: 40 dialogues per window), so this ensures all dialogues are processed.
4. ask
Ask a question to the memory system.
Parameters:
question(required): Your question (max 10k chars)
How it works:
Analyzes query complexity
Generates targeted search queries (planning)
Retrieves from semantic + lexical + symbolic layers
Reflects on adequacy (optional iterative refinement)
Synthesizes concise answer
Example:
User: "When and where will Alice and Bob meet?"
Assistant: "16 November 2025 at 2:00 PM at Starbucks"5. search_memories
Semantic search without answer synthesis (raw memory entries).
Parameters:
query(required): Search querytop_k(optional): Number of results (default: 10, max: 100)
Use case: Explore what the system remembers about a topic.
6. get_all_memories
Retrieve all atomic memory entries.
Returns: Complete list of memories with:
Lossless restatement (self-contained fact)
Keywords
Timestamp (if available)
Location (if mentioned)
People involved
Entities (companies, products, etc.)
Topic
7. clear_memories
Clear all memories from the database. ⚠️ Warning: Cannot be undone!
Available Resources
1. simplemem://memories
Type: JSON Description: Complete list of all memory entries
Access in Claude:
User: "Can you show me all memories as JSON?"2. simplemem://stats
Type: JSON Description: System statistics and configuration
Returns:
{
"total_memories": 42,
"db_path": "./lancedb_data",
"model": "gpt-4.1-mini",
"features": {
"planning_enabled": true,
"reflection_enabled": true,
"parallel_processing": true
}
}Example Workflow
# Step 1: Add conversations
User: "Remember this: Alice said to Bob, 'Let's meet at Starbucks tomorrow at 2pm to discuss the project.'"
Assistant: [Uses add_dialogue tool]
User: "Bob replied: 'Great, I'll bring the market analysis report.'"
Assistant: [Uses add_dialogue tool]
# Step 2: Finalize processing
Assistant: [Calls finalize tool automatically]
# Step 3: Query memories
User: "What did Alice and Bob plan?"
Assistant: [Uses ask tool] → "Alice and Bob plan to meet at Starbucks on 16 November 2025 at 2:00 PM to discuss the project. Bob will bring the market analysis report."
# Step 4: Explore memories
User: "Show me all memories about meetings"
Assistant: [Uses search_memories tool with query="meetings"]How SimpleMem Works
Stage 1: Semantic Structured Compression
Input (dialogue):
Alice: "He'll meet Bob tomorrow at 2pm at the coffee shop"Output (atomic memory entry):
{
"lossless_restatement": "John will meet Bob at Starbucks on 2025-11-16T14:00:00",
"persons": ["John", "Bob"],
"location": "Starbucks",
"timestamp": "2025-11-16T14:00:00",
"keywords": ["meet", "Bob", "John", "Starbucks"]
}Transformations:
Coreference resolution: "he" → "John"
Temporal anchoring: "tomorrow at 2pm" → "2025-11-16T14:00:00"
Location normalization: "coffee shop" → "Starbucks" (from context)
Stage 2: Multi-View Indexing
Each memory is indexed across three dimensions:
Layer | Type | Purpose |
Semantic | Dense (1024-d) | Conceptual similarity |
Lexical | Sparse (BM25) | Exact keyword matching |
Symbolic | Metadata | Structured filtering |
Stage 3: Adaptive Retrieval
Simple Query (low complexity):
"When will they meet?" → Single semantic searchComplex Query (high complexity):
"What projects did Alice and Bob discuss in November at Starbucks?"
→ Multi-query decomposition:
1. Semantic: "Alice Bob projects discuss"
2. Symbolic: persons=["Alice","Bob"], location="Starbucks", time=November
3. Keyword: ["projects", "discuss"]
→ Reflection: Check if results adequate, generate follow-up if needed
→ Synthesis: Combine results and generate answerPerformance Benchmarks
LoCoMo-10 Dataset (GPT-4.1-mini):
F1 Score: 43.24%
Token Usage: ~550 tokens (30× fewer than full-context)
Retrieval Time: 388.3s for full benchmark
Comparison:
Mem0: 34.20% F1, 1350.9s construction
A-Mem: 32.58% F1, 5140.5s construction
LightMem: 24.63% F1, 577.1s retrieval
Configuration Options
SimpleMem behavior is controlled via config.py in the SimpleMem directory:
# Core Models
LLM_MODEL = "gpt-4.1-mini" # or "qwen-max", "gpt-4"
EMBEDDING_MODEL = "Qwen/Qwen3-Embedding-0.6B"
# Processing
WINDOW_SIZE = 40 # Dialogues per processing window
OVERLAP_SIZE = 2 # Window overlap for context
# Retrieval
SEMANTIC_TOP_K = 25 # Vector search results
KEYWORD_TOP_K = 5 # BM25 results
STRUCTURED_TOP_K = 5 # Metadata filter results
# Advanced Features
ENABLE_PLANNING = True # Multi-query decomposition
ENABLE_REFLECTION = True # Iterative refinement
MAX_REFLECTION_ROUNDS = 2 # Max reflection iterations
ENABLE_PARALLEL_PROCESSING = True
MAX_PARALLEL_WORKERS = 16 # Memory building workers
ENABLE_PARALLEL_RETRIEVAL = True
MAX_RETRIEVAL_WORKERS = 8 # Retrieval workersTroubleshooting
Server doesn't start
Check:
Node.js version:
node --version(should be 18+)TypeScript compiled:
npm run buildEnvironment variables set correctly
SimpleMem path exists and is accessible
Python execution fails
Check:
Python version:
python3 --version(should be 3.8+)SimpleMem dependencies installed:
pip install -r requirements.txtconfig.pyexists and has valid API keyPYTHONPATH includes SimpleMem directory
No memories returned
Common causes:
Forgot to call
finalizeafter adding dialoguesDatabase path incorrect
Embedding model not downloaded (first run may take time)
LanceDB database corrupted (try clearing and re-adding)
Slow performance
Optimization:
Use smaller LLM for compression (e.g., "qwen2.5-1.5b")
Reduce
SEMANTIC_TOP_Kfor faster retrievalDisable reflection:
ENABLE_REFLECTION = FalseIncrease parallel workers (if you have cores available)
Development
Build
npm run buildWatch mode (for development)
npm run devTesting manually
# Start server (outputs to stderr for debugging)
node dist/index.js
# The server expects JSON-RPC messages on stdin
# Use MCP Inspector for interactive testing:
npx @modelcontextprotocol/inspector node dist/index.jsProject Structure
SimpleMem-MCP/
├── src/
│ ├── index.ts # Main MCP server (tools, resources, handlers)
│ ├── simplemem-client.ts # Python SimpleMem wrapper
│ └── types.ts # TypeScript interfaces
├── dist/ # Compiled JavaScript (generated)
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── .env.example # Environment template
├── .gitignore
└── README.md # This fileReferences
SimpleMem Paper: arXiv:2601.02553
SimpleMem GitHub: AIMING-Lab/SimpleMem
MCP Documentation: Model Context Protocol
MCP SDK: @modelcontextprotocol/sdk
License
MIT License - See SimpleMem project for details.
Citation
If you use SimpleMem in your research, please cite:
@misc{simplemem2026,
title={SimpleMem: Efficient Lifelong Memory for LLM Agents via Semantic Lossless Compression},
author={AIMING Lab},
year={2026},
eprint={2601.02553},
archivePrefix={arXiv}
}Support
SimpleMem Issues: GitHub Issues
MCP Issues: MCP GitHub
Built with ❤️ using the Model Context Protocol
Available Tools
7 toolsadd_dialogueB
Add a single dialogue to SimpleMem. The system will automatically extract atomic memory entries with semantic compression, coreference resolution, and temporal anchoring.
Inputs: content (required), speaker (required), timestamp.
add_dialoguesB
Add multiple dialogues in batch. More efficient than adding one at a time. SimpleMem will process them using windowed semantic compression.
Inputs: dialogues (required).
askB
Ask a question to the SimpleMem system. Uses three-stage retrieval: semantic (vector), lexical (BM25), and symbolic (metadata). Includes planning-based query decomposition and reflection for complex questions. Returns a concise answer based on retrieved memories.
Inputs: question (required).
clear_memoriesB
Clear all memories from the database. Warning: This action cannot be undone. Use with caution.
Inputs: no named parameters.
finalizeA
Finalize dialogue processing. Call this after adding dialogues to ensure all buffered conversations are processed and converted to memory entries. SimpleMem uses windowed processing, so this ensures nothing is left unprocessed.
Inputs: no named parameters.
get_all_memoriesA
Retrieve all memory entries from the system. Each entry is an atomic, self-contained fact extracted from dialogues using semantic lossless compression.
Inputs: no named parameters.
search_memoriesA
Search memories using semantic similarity. Returns raw memory entries without answer synthesis. Useful for exploring what the system remembers about a topic.
Inputs: query (required), top_k.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools target clearly distinct operations: adding dialogues, finalizing, asking, searching, retrieving all, and clearing. The only mild overlap is between add_dialogue and add_dialogues (single vs batch) and, to a lesser extent, ask versus search_memories, but the descriptions make the distinction clear.
Five of seven tools follow a clear verb_noun pattern (clear_memories, add_dialogue, add_dialogues, search_memories, get_all_memories). The bare verbs 'ask' and 'finalize' are minor deviations but remain readable and verb-first.
Seven tools is a well-scoped set for a memory management server, covering ingestion, processing, retrieval, question answering, and clearing without unnecessary surface area.
The surface covers the core lifecycle: add dialogues, finalize processing, search/retrieve memories, ask questions, and clear all memories. It lacks targeted update or delete of individual memories and direct lookup by ID, which are minor but noticeable gaps.
Related MCP Connectors
Persistent memory for AI agents to retain, retrieve, and recall conversation context through MCP.
Persistent personal memory for AI assistants — save, search, and recall across every MCP client.
Persistent, verbatim, searchable memory for AI assistants — one memory across every MCP client.
Cross-tool persistent memory and context for AI assistants over MCP.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to have a living memory with atomic knowledge storage, multi-factor recall, organic decay, automatic learning, and graph traversal via MCP.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to have persistent long-term memory by automatically storing and retrieving important information via MCP tools.MIT
- AlicenseNot gradedqualityBmaintenanceProvides AI agents with persistent, human-like memory infrastructure via MCP, enabling them to store, search, summarize, and forget episodic, semantic, procedural, and working memories across sessions.954 npmMIT
- AlicenseAqualityBmaintenanceProvides external memory for AI assistants, storing facts, decisions, roles, and history outside the context window and retrieving relevant memories via MCP tools.1355 npm2MIT