Mem0 MCP Server

Integrations

  • Optional integration for knowledge graph features when self-hosting Mem0, allowing creation and management of graph relationships between memory entities

Mem0 MCP サーバー

AI アシスタントを Mem0.ai の永続メモリ システムに統合するためのモデル コンテキスト プロトコル (MCP) サーバー。

概要

このサーバーは、MCP互換ツールを提供し、対応するAIアシスタントがMem0に保存された永続メモリにアクセスし、管理できるようにします。AIモデルとMem0メモリシステム間のブリッジとして機能し、アシスタントは以下のことが可能になります。

  • 記憶を保存し、取り出す
  • 意味的類似性で記憶を検索する
  • さまざまな記憶タイプ(エピソード記憶、意味記憶、手続き記憶)を管理する
  • 会話の文脈に短期記憶を活用する
  • 選択的記憶パターンを適用する
  • 記憶から知識グラフを作成する

プロジェクト構造

プロジェクト コードはsrc/mcp_mem0_general/ディレクトリ内にあります。

はじめに(インストールは不要です!)

このサーバーは、リポジトリをクローンしたりローカルにインストールしたりすることなく、 uvxを使用して GitHub から直接実行できます。

サーバーの実行

uvがインストールされていることを確認してください ( pipx install uvまたはbrew install uv )。

ターミナルで直接サーバーをテストできます。

# Make sure MEM0_API_KEY is set in your environment export MEM0_API_KEY="your-mem0-api-key-here" # Run the server using uvx uvx git+https://github.com/ryaker/mcp-mem0-general.git mcp-mem0-general

サーバーが起動し、初期化手順がログに記録されます。

カーソルまたはクロードデスクトップでの設定

  1. uvxパスを見つける: Claude Desktop のような GUI アプリケーションは、ターミナルと同じPATHを使用しないことがよくあります。ターミナルで次のコマンドを実行して、 uvx実行ファイルのフルパスを見つけてください。
    which uvx
    出力パスをコピーします (例: /Users/yourname/.local/bin/uvxまたは/opt/homebrew/bin/uvx )。
  2. **MCP を構成する:**次の構成を MCP 構成ファイルに追加し、 /full/path/to/uvx手順 1 で確認した実際のパスに置き換えます
    • カーソル: ~/.cursor/mcp.jsonに追加/更新:
    • **Claude Desktop:**設定で同様の構成を追加/更新します。
    "mem0-memory-general": { "command": "/full/path/to/uvx", # <-- IMPORTANT: Use the full path from 'which uvx' "args": [ "git+https://github.com/ryaker/mcp-mem0-general.git", "mcp-mem0-general" ], "env": { "MEM0_API_KEY": "your-mem0-api-key-here" } }
  3. **再起動:**変更を適用するには、Cursor または Claude Desktop を再起動してください。これで、アプリケーション内でサーバーが正常に起動するはずです。

mem0ai[neo4j]に関する注意

起動時に、 warning: The package mem0ai==0.1.96 does not have an extra named neo4j

  • **マネージドMem0.aiプラットフォームを使用している場合:**この警告は無視しても問題ありません。必要なグラフ処理はMem0プラットフォームのサーバー側で実行されます。
  • **Mem0をNeo4jでセルフホスティングしている場合:**この警告は、特定のmem0aiバージョンがNeo4j関連のPythonライブラリ( langchain-neo4jneo4j )を自動的にインストールしなかったことを示しています。グラフ機能を使用する場合は、セルフホスティング環境にこれらのライブラリを手動でインストールする必要があります。

使用ガイドをメモリにロードする(推奨)

AIアシスタントがサーバーの機能を簡単に参照できるようにするには、 USAGE_GUIDE.mdコンテンツをMem0にロードします。以下の手順に従ってください。

**前提条件:**上記の「はじめに」セクションで説明されているように、AI アシスタント (Claude/Cursor) で Mem0 MCP サーバーが実行され、正しく構成されていることを確認します。

  1. ガイドコンテンツをコピーする: USAGE_GUIDE.mdファイルを開きます。テキストコンテンツ全体を選択してコピーします。
  2. アシスタントにメモリを追加するよう指示する: AIアシスタント(Claude/Cursor)にアクセスし、次のようなプロンプトを使用して、コピーしたガイドの内容を指定された場所に貼り付けます。user_idは必ず統一してください(例: user_id )。

Mem0 MCPサーバーの使用ガイドを必ずお読みください。user_idに「default_user」を使用し、メタデータ{"title": "Mem0 MCP Usage Guide", "source": "README Instruction"}を追加してください。

[--- USAGE_GUIDE.md の全内容をここに貼り付けてください ---]

The assistant should call the `mem0_add_memory` tool. 3. **Find the Memory ID:** Once the assistant confirms the memory is added, ask it to find the specific ID for that memory: ``` Please search my memories for user_id "default_user" using the query "Mem0 MCP Usage Guide" and tell me the exact memory ID of that guide memory you just added.
The assistant should use the `mem0_search_memory` tool and provide you with an ID string (e.g., `76100ac4-896e-488b-90ad-036c0dfaaa80`). **Note down this ID!**

4.後でガイドを取得する: ID がわかったので、次のようなプロンプトを使用して、いつでもアシスタントに完全なガイドを呼び出すように簡単に依頼できます。

``` First execute Retrieve memory ID *your-guide-id-here* using mem0_get_memory_by_id. Then return control to me. ``` (Replace *`your-guide-id-here`* with the actual ID you noted down in step 3).

メモリの種類

サーバーは、期間と機能別に整理されたさまざまなメモリ タイプをサポートします。

短期記憶

  • 会話メモリ:最近のメッセージ交換の思い出し
  • ワーキングメモリ:一時的に使用されている情報
  • 注意記憶:現在焦点が当てられている情報

長期記憶

  • エピソード記憶:特定の出来事や経験
  • 意味記憶:事実、概念、知識
  • 手続き記憶:スキルとハウツー情報

高度な機能

  • カスタムカテゴリ: 独自のメモリカテゴリを定義して管理します
  • 記憶指示:記憶をどのように処理すべきかのガイドラインを設定する
  • グラフ関係: エンティティ間の知識グラフ関係にアクセスします
  • 選択メモリ: 保存する前に包含/除外パターンでテキストをフィルタリングします
  • フィードバックメカニズム: メモリ品質に関するフィードバックを提供する

使用法

システム内のすべてのメモリは、デフォルトの user_id として「default_user」を使用します。

詳細な使用例については、 USAGE_GUIDE.md を参照してください。

ドキュメント

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。

謝辞

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

AI アシスタントを Mem0.ai の永続メモリ システムに統合し、モデルがさまざまな種類のメモリを保存、取得、検索、管理できるようにするモデル コンテキスト プロトコル サーバー。

  1. 概要
    1. プロジェクト構造
      1. はじめに(インストールは不要です!)
        1. サーバーの実行
        2. カーソルまたはクロードデスクトップでの設定
        3. mem0ai[neo4j]に関する注意
      2. 使用ガイドをメモリにロードする(推奨)
        1. メモリの種類
          1. 短期記憶
          2. 長期記憶
        2. 高度な機能
          1. 使用法
            1. ドキュメント
              1. ライセンス
                1. 謝辞

                  Related MCP Servers

                  • -
                    security
                    F
                    license
                    -
                    quality
                    A Model Context Protocol server that connects AI assistants like Claude to Notion workspaces, enabling them to view, search, create, and update Notion databases, pages, and content blocks.
                    Last updated -
                    275
                    JavaScript
                    • Apple
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A Model Context Protocol server that provides persistent task management capabilities for AI assistants, allowing them to create, update, and track tasks beyond their usual context limitations.
                    Last updated -
                    1
                    TypeScript
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A TypeScript implementation of the Model Context Protocol server that enables creation, management, and semantic search of memory streams with Mem0 integration.
                    Last updated -
                    TypeScript
                  • A
                    security
                    F
                    license
                    A
                    quality
                    A Model Context Protocol server that enables AI assistants to interact with the Omi API for retrieving and creating conversations and memories for users.
                    Last updated -
                    4
                    TypeScript

                  View all related MCP servers

                  ID: st9otc3knw