mem0-mcp

mem0-mcp

A Model Context Protocol server for Mem0, which helps with managing coding preferences.

514
Stars
105
Forks
0
Releases

Overview

This MCP server demonstrates a structured approach for using an MCP server with Mem0 to manage coding preferences efficiently. It is designed to work with Cursor by exposing an SSE endpoint for MCP clients to connect, retrieve, and semantically search stored coding preferences. The server exposes three core tools: add_coding_preference to store complete code snippets with context (dependencies, language/framework versions, setup instructions, documentation, examples, and best practices); get_all_coding_preferences to retrieve all stored coding preferences for analysis; and search_coding_preferences to perform semantic searches for relevant code implementations, solutions, best practices, setup guides, and documentation. By default, the server runs on 0.0.0.0:8080 and can be configured with command-line arguments like `uv run main.py --host <host> --port <port>`. It runs as an SSE-based process that agents connect to, use, and disconnect from as needed, enabling cloud-native, decoupled usage. Access Mem0 via MEM0_API_KEY in a .env file to authenticate with Mem0.

Details

Owner
mem0ai
Language
Python
License
Updated
2025-12-07

Features

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, and 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, and technical documentation.

Audience

MCP clientsConnect to the SSE endpoint to store, retrieve, and semantically search coding preferences using MCP.
Cursor usersUse Cursor to connect to the SSE endpoint and manage coding preferences via MCP.
DevelopersDevelopers can integrate the Mem0 MCP server into applications to manage coding preferences.

Tags

MCPMem0Coding PreferencesCursorSSEModel Context ProtocolServer