Mem0 Memory MCP Server
A Model Context Protocol (MCP) server that provides memory storage and retrieval capabilities using Mem0. This server allows AI agents to store and search through memories, making it useful for maintaining context and making informed decisions based on past interactions.
Features
Store memories with user-specific context
Search through stored memories with relevance scoring
Simple and intuitive API
Built on the Model Context Protocol
Automatic error handling
Support for multiple user contexts
Deployable on Smithery
Installation
Using npx (Recommended)
Local Development
Configuration
The server requires a Mem0 API key to function. You can obtain one from Mem0 Dashboard.
For Smithery Deployment
When deploying on Smithery, users will be prompted to provide their API key through the configuration interface.
For Local Development
Create a .env file in the root directory:
Available Tools
1. Add Memory (add-memory)
Store new memories with user-specific context.
Parameters:
content(string, required): The content to store in memoryuserId(string, required): User ID for memory storage
2. Search Memories (search-memories)
Search through stored memories to retrieve relevant information.
Parameters:
query(string, required): The search queryuserId(string, required): User ID for memory storage
Usage with MCP Clients
Cursor
Open Cursor Settings
Go to Features > MCP Servers
Add the server configuration:
VS Code
Add to your User Settings (JSON):
Deployment on Smithery
This server is configured for deployment on Smithery:
Push your code to GitHub
Connect your repository to Smithery
Deploy from the Deployments tab
The server will be available via Smithery's Streamable HTTP transport, allowing users to connect without installing dependencies locally.
Development
Project Structure
Scripts
npm run dev- Start development server with Smithery playgroundnpm run build- Build the project using Smithery CLInpm run build:local- Build using tsup directlynpm run dev:local- Watch mode with tsupnpm start- Run the built server
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
This server cannot be installed