Better Mem0
FreeNot checked[DEPRECATED - use EchoVault] MCP Server for AI memory with PostgreSQL
About
[DEPRECATED - use EchoVault] MCP Server for AI memory with PostgreSQL
README
[!CAUTION] 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.
Legacy Documentation
[!NOTE] The content below is kept for reference. The final version on PyPI/Docker still works but will not 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
Quick Start (Legacy)
1. Get Prerequisites
- Database: Neon or Supabase (free tier works)
- 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:[email protected]/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"
Configuration (Legacy)
| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
Yes | PostgreSQL with pgvector extension |
API_KEYS |
Yes | ENV_VAR:key pairs, comma-separated |
LLM_MODELS |
No | Model fallback chain |
EMBEDDER_MODELS |
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-small
Defaults
| Setting | Default |
|---|---|
LLM_MODELS |
gemini/gemini-3-flash-preview |
EMBEDDER_MODELS |
gemini/gemini-embedding-001 |
Tools (Legacy)
| Tool | Description |
|---|---|
memory |
Memory operations: add, search, list, delete |
help |
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"}
Build from Source (Legacy)
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-mcp
Requirements: Python 3.13+
License
MIT - See LICENSE
Install Better Mem0 in Claude Desktop, Claude Code & Cursor
unyly install better-mem0Installs into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add better-mem0 -- uvx better-mem0-mcpStep-by-step: how to install Better Mem0
FAQ
Is Better Mem0 MCP free?
Yes, Better Mem0 MCP is free — one-click install via Unyly at no cost.
Does Better Mem0 need an API key?
No, Better Mem0 runs without API keys or environment variables.
Is Better Mem0 hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Better Mem0 in Claude Desktop, Claude Code or Cursor?
Open Better Mem0 on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzMCP-Agent
A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)
by lastmile-aiSpring AI MCP Client
Provides auto-configuration for MCP client functionality in Spring Boot applications.
mcp.natoma.ai
A Hosted MCP Platform to discover, install, manage and deploy MCP servers by [Natoma Labs](https://www.natoma.ai)
MCPHub
Website to list high quality MCP servers and reviews by real users. Also provide online chatbot for popular LLM models with MCP server support.
MCP Servers Rating and User Reviews
Website to rate MCP servers, write authentic user reviews, and [search engine for agent & mcp](http://www.deepnlp.org/search/agent)
mkinf
An Open Source registry of hosted MCP Servers to accelerate AI agent workflows.
Compare Better Mem0 with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
