About mem0 MCP Server
mem0 MCP Server is a TypeScript MCP server that connects Mem0 memory streams to compatible tools. It supports creating, updating, searching, reading, and deleting streams, with stream access through resources.
Key features
- 01Create and append to memory streams
- 02Search memories semantically
- 03Read and delete streams
- 04Access streams as resources
Use cases
- 01Store conversation content in memory streams
- 02Search Mem0 memories by query
- 03Read or remove a specific stream
MCP support
It exposes memory stream operations as MCP tools and provides stream content and listings as resources.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEmem0 MCP Server
A TypeScript implementation of the Model Context Protocol (MCP) server for mem0, providing memory stream functionality with Mem0 integration.
Features
- Create memory streams with Mem0 integration
- Append content to memory streams
- Search memories using Mem0's semantic search
- Read from memory streams
- Resource-based access to memory streams
- Delete memory streams
Prerequisites
- Node.js and npm installed
- Mem0 API key (get one from mem0.ai)
Installation
npm install
Configuration
Set your Mem0 API key as an environment variable:
export MEM0_API_KEY=your-api-key-here
Building
npm run build
Running the Server
npm start
Testing
Run the test client to verify server functionality:
npm test
API
Tools
-
create-memory-stream- Parameters:
name: stringinitialContent: string (optional)userId: string (optional) - Mem0 user IDagentId: string (optional) - Mem0 agent ID
- Returns: Stream ID and metadata
- Parameters:
-
append-to-stream- Parameters:
streamId: stringcontent: stringrole: "user" | "assistant" (optional)
- Returns: Success confirmation
- Parameters:
-
search-memories- Parameters:
query: stringuserId: stringagentId: string (optional)threshold: number (optional)
- Returns: Search results from Mem0
- Parameters:
-
read-stream- Parameters:
streamId: stringstartIndex: number (optional)endIndex: number (optional)
- Returns: Stream content
- Parameters:
-
delete-stream- Parameters:
streamId: string
- Returns: Deletion confirmation
- Parameters:
Resources
memory://{streamId}- Access memory stream content directlymemory://- List all memory streams
Development
The server is implemented using the MCP TypeScript SDK and provides integration with Mem0 for persistent memory storage and semantic search. To extend the implementation:
- Add more Mem0 features (e.g., memory tagging, metadata)
- Implement proper error handling
- Add authentication and authorization
- Add additional memory operations
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.