# mem0-mcp

> MCP Server

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.

## Overview

- **Category:** Developer Tools
- **Language:** Python
- **Stars:** 659
- **Forks:** 8
- **Owner:** mem0ai
- **GitHub:** https://github.com/mem0ai/mem0-mcp
- **Created:** 2025-02-18T08:35:49+00:00
- **Updated:** 2025-03-28T17:04:58+00:00
- **Source:** https://model-context-protocol.com/servers/code-preference-management-mcp-mem0-server

## Setup

## Setup

1. Clone this repository
2. Initialize the `uv` environment:

```bash
uv venv
```

3. Activate the virtual environment:

```bash
source .venv/bin/activate
```

4. Install the dependencies using `uv`:

```bash
uv pip install -e .
```

5. Update `.env` file in the root directory with your mem0 API key:

```bash
MEM0_API_KEY=your_api_key_here
```

## Tools

## Available Tools

1. `add_coding_preference`: Store code snippets, implementation details, and coding patterns with comprehensive context.
2. `get_all_coding_preferences`: Retrieve all stored coding preferences to analyze patterns, review implementations, and ensure no relevant information is missed.
3. `search_coding_preferences`: Semantically search through stored coding preferences to find relevant code implementations, programming solutions, best practices, setup guides, and technical documentation.
