This repository provides an MCP server integrated with mem0 for efficient coding preference management, enabling storage, retrieval, and semantic search of code snippets and best practices within Cursor.
This project demonstrates using an MCP server with mem0 to manage coding preferences. It provides tools for storing, retrieving, and searching coding preferences, designed for use with Cursor.
uv
virtual environment.uv pip install -e .
..env
file.uv run main.py
.http://0.0.0.0:8080/sse
) in Cursor, following the Cursor documentation.Agent
mode.The server offers:
add_coding_preference
: Stores code snippets with context (code, language versions, setup, docs, examples, best practices).get_all_coding_preferences
: Retrieves all stored preferences for analysis.search_coding_preferences
: Semantically searches preferences for code, solutions, best practices, setup guides, and documentation.This system provides a persistent coding preferences solution accessible via MCP. The SSE server can run independently, allowing agents to connect, use, and disconnect as needed, fitting cloud-native architectures. The server, running on 0.0.0.0:8080
by default, is configurable via command-line arguments (--host
, --port
).
mem0ai/mem0-mcp
February 18, 2025
March 28, 2025
Python