better-mem0-mcp
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., "@better-mem0-mcp Remember that I prefer dark mode and use FastAPI"
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.
better-mem0-mcp
PROJECT DISCONTINUED — The replacement solution is being developed at mnemo-mcp.
Self-hosted MCP Server for AI memory with PostgreSQL (pgvector).
Discontinuation Notice
The better-mem0-mcp project has been discontinued as of February 2026.
The replacement solution is being developed at mnemo-mcp — a lightweight, self-hosted MCP server for persistent AI memory.
Related MCP server: MCP AI Memory
Legacy Documentation
The content below is kept for reference. The final version on PyPI/Docker still works but willnot receive any new updates.
Features
Self-hosted PostgreSQL - Your data stays with you (Neon/Supabase free tier supported)
Graph Memory - SQL-based relationship tracking alongside vector memory
Multi-provider LLM - Gemini, OpenAI, Anthropic, Groq, DeepSeek, Mistral
Fallback chains - Multi-key per provider + multi-model fallback
Zero manual setup - Just
DATABASE_URL+API_KEYS
1. Get Prerequisites
API Key: Any supported provider (Google AI Studio is free)
2. Add to mcp.json
uvx (Recommended)
{
"mcpServers": {
"better-mem0": {
"command": "uvx",
"args": ["better-mem0-mcp@latest"],
"env": {
"DATABASE_URL": "postgresql://user:pass@xxx.neon.tech/neondb?sslmode=require",
"API_KEYS": "GOOGLE_API_KEY:AIza..."
}
}
}
}Docker
{
"mcpServers": {
"better-mem0": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "DATABASE_URL", "-e", "API_KEYS", "n24q02m/better-mem0-mcp:latest"],
"env": {
"DATABASE_URL": "postgresql://...",
"API_KEYS": "GOOGLE_API_KEY:AIza..."
}
}
}
}3. Done!
Ask your AI: "Remember that I prefer dark mode and use FastAPI"
Variable | Required | Description |
| Yes | PostgreSQL with pgvector extension |
| Yes |
|
| No | Model fallback chain |
| No | Embedding model chain |
Supported LiteLLM Providers
Use environment variable names from LiteLLM docs:
GOOGLE_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, GROQ_API_KEY, etc.
Single provider:
API_KEYS=GOOGLE_API_KEY:AIza...Multi-key with fallback:
API_KEYS=GOOGLE_API_KEY:AIza-1,GOOGLE_API_KEY:AIza-2,OPENAI_API_KEY:sk-xxx
LLM_MODELS=gemini/gemini-3-flash-preview,openai/gpt-4o-mini
EMBEDDER_MODELS=gemini/gemini-embedding-001,openai/text-embedding-3-smallDefaults
Setting | Default |
|
|
|
|
Tool | Description |
| Memory operations: |
| Get full documentation for tools |
Usage Examples
{"action": "add", "content": "I prefer TypeScript over JavaScript"}
{"action": "search", "query": "programming preferences"}
{"action": "list"}
{"action": "delete", "memory_id": "abc123"}git clone https://github.com/n24q02m/better-mem0-mcp
cd better-mem0-mcp
# Setup (requires mise: https://mise.jdx.dev/)
mise run setup
# Run
uv run better-mem0-mcpRequirements: Python 3.13+
License
MIT - See LICENSE
Available Tools
2 toolshelpA
Get full documentation for a tool. Use when compressed descriptions are insufficient.
Inputs: tool_name. Returns: result
memoryB
Memory operations: add, search, list, delete.
add: Save information (requires content)
search: Find memories (requires query)
list: Get all memories
delete: Remove by ID (requires memory_id) Use
helptool for full documentation.
Inputs: action (required), limit, query, content, +2 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two top-level tools have clearly distinct roles: memory performs storage operations, while help provides documentation. Within memory, add/search/list/delete are explicitly enumerated, so there is no meaningful overlap or misselection risk.
Both top-level names are consistent lowercase nouns, but they do not follow the stronger verb_noun action pattern used in many tool sets. The convention is still predictable and free of mixed casing or style.
Only two top-level tools exist, which is borderline thin even though memory multiplexes several operations. The compact design is reasonable but relies heavily on one overloaded tool plus a documentation helper.
Memory lifecycle coverage includes add, search, list, and delete, but lacks an explicit update operation. Agents could work around this by deleting and re-adding, but the surface is not fully complete for memory management.
Maintenance
Related MCP Connectors
Shared memory for AI agents, as a graph in your own Postgres. Writes never call an LLM.
Persistent memory for AI agents. Semantic search, memory graph, W3C DID identity.
Persistent memory for AI agents. Search, store, and recall across sessions.
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to store and retrieve long-term memories using PostgreSQL with vector similarity search. Supports semantic memory operations, tagging, and real-time updates for persistent learning across conversations.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to store, retrieve, and manage contextual knowledge across sessions using semantic search with PostgreSQL and vector embeddings. Supports memory relationships, clustering, multi-agent isolation, and intelligent caching for persistent conversational context.21 npm50MIT
- FlicenseAqualityNot gradedmaintenanceProvides long-term memory storage for AI assistants with semantic search, enabling persistent storage of preferences, decisions, and context with relationship tracking between memories.19-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to store and retrieve long-term memories with semantic search, supporting various memory types and tags via PostgreSQL and pgvector.-