Skip to main content
Glama

Mem0 MCP Server

Official
by mem0ai

带有 Mem0 的 MCP 服务器用于管理编码偏好

这演示了一种使用带有mem0MCP服务器高效管理编码偏好的结构化方法。该服务器可与 Cursor 配合使用,并提供存储、检索和搜索编码偏好的基本工具。

安装

  1. 克隆此存储库
  2. 初始化uv环境:
uv venv
  1. 激活虚拟环境:
source .venv/bin/activate
  1. 使用uv安装依赖项:
# Install in editable mode from pyproject.toml uv pip install -e .
  1. 使用您的 mem0 API 密钥更新根目录中的.env文件:
MEM0_API_KEY=your_api_key_here

用法

  1. 启动 MCP 服务器:
uv run main.py
  1. 在 Cursor 中,连接到 SSE 端点,请按照此文档进行参考:
http://0.0.0.0:8080/sse
  1. 在 Cursor 中打开 Composer 并切换到Agent模式。

带光标的演示

https://github.com/user-attachments/assets/56670550-fb11-4850-9905-692d3496231c

特征

服务器提供了三种主要工具来管理代码偏好设置:

  1. add_coding_preference :存储代码片段、实现细节和编码模式以及全面的上下文,包括:
    • 包含依赖项的完整代码
    • 语言/框架版本
    • 设置说明
    • 文档和评论
    • 示例用法
    • 最佳实践
  2. get_all_coding_preferences :检索所有存储的编码偏好以分析模式、审查实施情况并确保不会遗漏任何相关信息。
  3. search_coding_preferences :通过存储的编码偏好进行语义搜索以找到相关的:
    • 代码实现
    • 编程解决方案
    • 最佳实践
    • 设置指南
    • 技术文档

为什么?

此实现允许通过 MCP 访问持久化编码偏好设置系统。基于 SSE 的服务器可以作为进程运行,代理可以根据需要随时连接、使用和断开连接。此模式非常适合“云原生”用例,其中服务器和客户端可以作为不同节点上的解耦进程。

服务器

默认情况下,服务器在 0.0.0.0:8080 上运行,但可以使用命令行参数进行配置,例如:

uv run main.py --host <your host> --port <your port>

服务器在/sse处公开一个 SSE 端点,MCP 客户端可以连接到该端点以访问编码首选项管理工具。

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

与 mem0.ai 集成的 MCP 服务器可帮助用户存储、检索和搜索编码偏好,以实现更一致的编程实践。

  1. 安装
    1. 用法
      1. 带光标的演示
        1. 特征
          1. 为什么?
            1. 服务器

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A MCP server for managing and storing code snippets in various programming languages, allowing users to create, list, and delete snippets via a standardized interface.
            Last updated -
            3
            4
            JavaScript
            MIT License
          • -
            security
            A
            license
            -
            quality
            An MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.
            Last updated -
            179
            Python
            MIT License
            • Apple
            • Linux
          • -
            security
            A
            license
            -
            quality
            An MCP server that analyzes codebases and generates contextual prompts, making it easier for AI assistants to understand and work with code repositories.
            Last updated -
            10
            Python
            MIT License
          • -
            security
            F
            license
            -
            quality
            A MCP server that allows AI assistants to interact with the browser, including getting page content as markdown, modifying page styles, and searching browser history.
            Last updated -
            5
            TypeScript

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/mem0ai/mem0-mcp'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server