Cover image
Try Now
2025-03-29

3 years

Works with Finder

3

Github Watches

14

Github Forks

100

Github Stars

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

  1. Clone this repository
  2. Initialize the uv environment:
uv venv
  1. Activate the virtual environment:
source .venv/bin/activate
  1. Install the dependencies using uv:
# Install in editable mode from pyproject.toml
uv pip install -e .
  1. Update .env file in the root directory with your mem0 API key:
MEM0_API_KEY=your_api_key_here

Usage

  1. Start the MCP server:
uv run main.py
  1. In Cursor, connect to the SSE endpoint, follow this doc for reference:
http://0.0.0.0:8080/sse
  1. 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:

  1. 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
  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
    • 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.

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • 林乔安妮
  • A fashion stylist GPT offering outfit suggestions for various scenarios.

  • apappascs
  • Entdecken Sie die umfassendste und aktuellste Sammlung von MCP-Servern auf dem Markt. Dieses Repository dient als zentraler Hub und bietet einen umfangreichen Katalog von Open-Source- und Proprietary MCP-Servern mit Funktionen, Dokumentationslinks und Mitwirkenden.

  • pontusab
  • Die Cursor & Windsurf -Community finden Regeln und MCPs

  • av
  • Führen Sie mühelos LLM -Backends, APIs, Frontends und Dienste mit einem Befehl aus.

  • ravitemer
  • Ein leistungsstarkes Neovim -Plugin für die Verwaltung von MCP -Servern (Modellkontextprotokoll)

  • jae-jae
  • MCP -Server für den Fetch -Webseiteninhalt mit dem Headless -Browser von Dramatikern.

  • patruff
  • Brücke zwischen Ollama und MCP -Servern und ermöglicht es lokalen LLMs, Modellkontextprotokoll -Tools zu verwenden

  • 1Panel-dev
  • 🔥 1Panel bietet eine intuitive Weboberfläche und einen MCP -Server, um Websites, Dateien, Container, Datenbanken und LLMs auf einem Linux -Server zu verwalten.

  • Mintplex-Labs
  • Die All-in-One-Desktop & Docker-AI-Anwendung mit integriertem Lappen, AI-Agenten, No-Code-Agent Builder, MCP-Kompatibilität und vielem mehr.

  • GeyserMC
  • Eine Bibliothek für Kommunikation mit einem Minecraft -Client/Server.

    Reviews

    4 (1)
    Avatar
    user_oipjoZV1
    2025-04-17

    As a dedicated user of the mem0-mcp application, I'm thoroughly impressed with its efficiency and functionality. The user interface is intuitive and the features offered are incredibly useful for my needs. I highly recommend checking out this project on GitHub by mem0ai. The attention to detail and regular updates make it stand out. This is a must-try for anyone interested in maximizing their productivity with cutting-edge tools.