How 3737123dush/mem0-mcp works
This repository offers two MCP servers for memory: a Python SSE server focused on coding preferences, and a Node.js stdio server for general memories. Clients invoke tools to add or search content, which the servers pass to Mem0; the Python server also exposes a tool to list all preferences. Both implementations are evidenced in source, while the README documents the Python/Cursor workflow. The graph omits unshown protocol internals.
Main entry points: main.py MCP tool server · index.ts Tool dispatch
Components 12
Python SSE server
- SSE endpoint
main.py - MCP tool server
main.py
Coding preference tools
- Add preference
main.py - List preferences
main.py - Search preferences
main.py
Node stdio server
- MCP stdio server
node/mem0/src/index.ts - Tool dispatch
node/mem0/src/index.ts - Add memory
node/mem0/src/index.ts - Search memories
node/mem0/src/index.ts
Other components
- Cursor or MCP client
- Mem0 API
- MCP client
Connections 14
- Cursor or MCP client → SSE endpoint: connects to
README.md - SSE endpoint → MCP tool server: runs MCP
main.py - MCP tool server → Add preference: dispatches tool
main.py - MCP tool server → List preferences: dispatches tool
main.py - MCP tool server → Search preferences: dispatches tool
main.py - Add preference → Mem0 API: adds memory
main.py - List preferences → Mem0 API: gets memories
main.py - Search preferences → Mem0 API: searches memories
main.py - MCP client → MCP stdio server: connects over stdio
node/mem0/src/index.ts - MCP stdio server → Tool dispatch: handles requests
node/mem0/src/index.ts - Tool dispatch → Add memory: dispatches add
node/mem0/src/index.ts - Tool dispatch → Search memories: dispatches search
node/mem0/src/index.ts - Add memory → Mem0 API: adds memory
node/mem0/src/index.ts - Search memories → Mem0 API: searches memories
node/mem0/src/index.ts