MCP メモリサーバー
このサーバーは、効率的なベクトル類似性検索を実現する pgvector を備えた PostgreSQL を搭載し、mem0 原則を使用して AI アシスタントの長期記憶機能を実装します。
特徴
- ベクトル類似性検索のためのpgvectorを使用したPostgreSQL
- BERTを使用した自動埋め込み生成
- メモリ操作用のRESTful API
- セマンティック検索機能
- さまざまな種類の記憶(学習、経験など)のサポート
- タグベースの記憶検索
- 記憶の信頼度スコア
- リアルタイム更新のためのサーバー送信イベント(SSE)
- カーソルMCPプロトコル対応
前提条件
- pgvector 拡張機能がインストールされた PostgreSQL 14+:
- Node.js 16以上
設定
- 依存関係をインストールします:
- 環境変数を設定します
.env.sample
を.env
にコピーし、値を調整します。
.env
構成の例:
- データベースを初期化します。
- サーバーを起動します。
自動リロードを使用した開発の場合:
カーソルの使用
カーソルにMCPサーバーを追加する
Cursor にメモリサーバーを追加するには、 ~/.cursor/mcp.json
mcpServers
ある MCP 設定ファイルを変更する必要があります。mcpServers オブジェクトに以下の設定を追加します。
/path/to/your/memory
メモリ サーバーのインストールへの実際のパスに置き換えます。
たとえば、リポジトリを/Users/username/workspace/memory
にクローンした場合、構成は次のようになります。
サーバーは必要に応じてCursorによって自動的に起動されます。動作を確認するには、次の手順に従ってください。
- カーソルを開く
- カーソルが起動するとメモリサーバーが自動的に起動します
http://localhost:3333/mcp/v1/health
にアクセスしてサーバーの状態を確認できます。
利用可能なMCPエンドポイント
SSE接続
- エンドポイント:
GET /mcp/v1/sse
- クエリパラメータ:
subscribe
: サブスクライブするイベントのコンマ区切りリスト(オプション)
- イベント:
connected
: 初期接続時に送信されますmemory.created
: 新しいメモリが作成された時に送信されますmemory.updated
: 既存のメモリが更新されたときに送信されます
メモリ操作
- 記憶を創る
- 思い出を探す
- 思い出をリストアップ
健康チェック
応答フォーマット
すべての API 応答は標準の MCP 形式に従います。
またはエラーの場合:
メモリスキーマ
- id: 一意の識別子
- タイプ: 記憶の種類(学習、経験など)
- コンテンツ: 実際のメモリ内容 (JSON)
- 出典: 記憶の源
- 埋め込み: コンテンツのベクトル表現(384次元)
- tags: 関連タグの配列
- 信頼度: 信頼度スコア (0-1)
- createdAt: メモリが作成された時刻
- 更新日時: メモリが最後に更新された日時
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
効率的なベクトル類似性検索を実現する pgvector を備えた PostgreSQL を使用して AI アシスタントの長期記憶機能を実装し、保存された情報のセマンティック検索を可能にします。
Related MCP Servers
- -securityFlicense-qualityEnables AI assistants to enhance their responses with relevant documentation through a semantic vector search, offering tools for managing and processing documentation efficiently.Last updated -6213TypeScript
- -securityFlicense-qualityEnables AI assistants to interact with Metabase, providing access to dashboards, questions, databases, and tools for executing queries and viewing data through natural language.Last updated -JavaScript
- -securityAlicense-qualityEnhanced knowledge graph memory server for AI assistants that uses Neo4j as the backend storage engine, enabling powerful graph queries and efficient storage of user interaction information with full MCP protocol compatibility.Last updated -TypeScriptMIT License
- -securityAlicense-qualityConnects Bear Notes to AI assistants using semantic search and RAG (Retrieval-Augmented Generation), allowing AI systems to access and understand your personal knowledge base through meaningful search rather than just keyword matching.Last updated -83JavaScriptMIT License