Local Mem0 MCP Server
A fully self-hosted MCP server that integrates the Mem0 framework to provide persistent memory capabilities for AI assistants using local models and vector storage. It enables users to store, search, and manage contextual information across conversations through a Docker-based deployment.
README
Local Mem0 MCP Server
A fully self-hosted Model Context Protocol (MCP) server that integrates Mem0 for persistent memory capabilities. Enables AI assistants like Claude to store and retrieve contextual information across conversations.
⨠Features
- š§ Persistent Memory: Store and retrieve memories across conversations
- š Fully Self-Hosted: No external APIs or cloud dependencies
- š³ Containerized: Complete Docker deployment with one command
- š Easy Installation: Single script setup for Windows, Mac, and Linux
- š¤ Local AI Models: Uses Ollama with phi3:mini and nomic-embed-text
- š Vector Storage: PostgreSQL with pgvector for efficient memory search
- š MCP Compatible: Works with Claude Desktop and other MCP-capable AI tools
š Quick Start
Prerequisites
- Docker Desktop installed and running
- Claude Desktop (for testing)
Installation
Windows:
git clone https://github.com/Synapse-OS/local-mem0-mcp.git
cd local-mem0-mcp
install.bat
Mac/Linux:
git clone https://github.com/Synapse-OS/local-mem0-mcp.git
cd local-mem0-mcp
chmod +x install.sh
./install.sh
The installation will:
- Build the MCP server container
- Start PostgreSQL and Ollama services
- Download AI models (~2.5GB total)
- Configure Claude Desktop integration
- Test the installation
Testing
After installation and configuration:
- Restart Claude Desktop completely (close and reopen)
- Verify MCP server: Type
/mcp- should listmem0-localas available - Test memory storage: "Remember that I'm testing the MCP memory system today"
- Test memory retrieval: "What do you remember about me?"
- Verify persistence: Restart Claude Desktop and ask again - memories should persist
Troubleshooting MCP Connection:
- If
/mcpshows no servers, check the configuration file path and JSON syntax - Ensure Docker containers are running:
docker ps - Check MCP server logs:
docker logs mem0-mcp-server
šļø Architecture
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā Claude ā ā MCP Server ā ā PostgreSQL ā
ā Desktop āāāāāŗā (FastMCP) āāāāāŗā + pgvector ā
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāā
ā Ollama ā
ā phi3:mini + ā
ā nomic-embed-text ā
āāāāāāāāāāāāāāāāāāāā
š§ Configuration
Claude Desktop MCP Configuration
After installation, configure Claude Desktop to use the MCP server:
Windows:
Edit %APPDATA%\Claude\claude_desktop_config.json:
Mac:
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
Linux:
Edit ~/.config/Claude/claude_desktop_config.json:
Add this configuration:
{
"mcpServers": {
"mem0-local": {
"command": "docker",
"args": [
"exec", "-i", "mem0-mcp-server",
"python", "/app/src/server.py"
]
}
}
}
System Configuration
The system is configured for local operation by default:
- MCP Server: Runs in Docker container with STDIO transport
- Database: PostgreSQL with pgvector on port 5432
- AI Models: Local Ollama instance on port 11434
- Memory Storage: User-isolated memories with vector embeddings
š Available Memory Operations
- add_memory: Store new memories
- search_memories: Find relevant memories by query
- get_all_memories: Retrieve all memories for a user
- update_memory: Modify existing memories
- delete_memory: Remove specific memories
- delete_all_memories: Clear all memories for a user
- get_memory_stats: Get memory statistics
š Troubleshooting
Check services:
docker ps
View logs:
docker-compose -f docker-compose.local.yml logs
Restart services:
docker-compose -f docker-compose.local.yml restart
Clean restart:
docker-compose -f docker-compose.local.yml down -v
# Run install script again
š¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š Acknowledgments
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.