Mem0 Coding Preferences Manager
An MCP server that integrates with mem0.ai to help users store, retrieve, and search coding preferences for more consistent programming practices.
mem0ai
README
MCP Server with Mem0 for Managing Coding Preferences
This demonstrates a structured approach for using an MCP server with mem0 to manage coding preferences efficiently. The server can be used with Cursor and provides essential tools for storing, retrieving, and searching coding preferences.
Installation
- Clone this repository
- Initialize the
uv
environment:
uv venv
- Activate the virtual environment:
source .venv/bin/activate
- Install the dependencies using
uv
:
# Install in editable mode from pyproject.toml
uv pip install -e .
- Update
.env
file in the root directory with your mem0 API key:
MEM0_API_KEY=your_api_key_here
Usage
- Start the MCP server:
uv run main.py
- In Cursor, connect to the SSE endpoint, follow this doc for reference:
http://0.0.0.0:8080/sse
- Open the Composer in Cursor and switch to
Agent
mode.
Demo with Cursor
https://github.com/user-attachments/assets/56670550-fb11-4850-9905-692d3496231c
Features
The server provides three main tools for managing code preferences:
-
add_coding_preference
: Store code snippets, implementation details, and coding patterns with comprehensive context including:- Complete code with dependencies
- Language/framework versions
- Setup instructions
- Documentation and comments
- Example usage
- Best practices
-
get_all_coding_preferences
: Retrieve all stored coding preferences to analyze patterns, review implementations, and ensure no relevant information is missed. -
search_coding_preferences
: Semantically search through stored coding preferences to find relevant:- Code implementations
- Programming solutions
- Best practices
- Setup guides
- Technical documentation
Why?
This implementation allows for a persistent coding preferences system that can be accessed via MCP. The SSE-based server can run as a process that agents connect to, use, and disconnect from whenever needed. This pattern fits well with "cloud-native" use cases where the server and clients can be decoupled processes on different nodes.
Server
By default, the server runs on 0.0.0.0:8080 but is configurable with command line arguments like:
uv run main.py --host <your host> --port <your port>
The server exposes an SSE endpoint at /sse
that MCP clients can connect to for accessing the coding preferences management tools.
Recommended Servers

E2B
Using MCP to run code via e2b.
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.
AIO-MCP Server
🚀 All-in-one MCP server with AI search, RAG, and multi-service integrations (GitLab/Jira/Confluence/YouTube) for AI-enhanced development workflows. Folk from
Persistent Knowledge Graph
An implementation of persistent memory for Claude using a local knowledge graph, allowing the AI to remember information about users across conversations with customizable storage location.
React MCP
react-mcp integrates with Claude Desktop, enabling the creation and modification of React apps based on user prompts

Any OpenAI Compatible API Integrations
Integrate Claude with Any OpenAI SDK Compatible Chat Completion API - OpenAI, Perplexity, Groq, xAI, PyroPrompts and more.
Exa MCP
A Model Context Protocol server that enables AI assistants like Claude to perform real-time web searches using the Exa AI Search API in a safe and controlled manner.
AI 图像生成服务
可用于cursor 集成 mcp server
Perplexity Chat MCP Server
MCP Server for the Perplexity API.