Skip to main content
Glama

MCP メモリサーバー

このサーバーは、効率的なベクトル類似性検索を実現する pgvector を備えた PostgreSQL を搭載し、mem0 原則を使用して AI アシスタントの長期記憶機能を実装します。

特徴

  • ベクトル類似性検索のためのpgvectorを使用したPostgreSQL

  • BERTを使用した自動埋め込み生成

  • メモリ操作用のRESTful API

  • セマンティック検索機能

  • さまざまな種類の記憶(学習、経験など)のサポート

  • タグベースの記憶検索

  • 記憶の信頼度スコア

  • リアルタイム更新のためのサーバー送信イベント(SSE)

  • カーソルMCPプロトコル対応

Related MCP server: MCPMem

前提条件

  1. pgvector 拡張機能がインストールされた PostgreSQL 14+:

# In your PostgreSQL instance:
CREATE EXTENSION vector;
  1. Node.js 16以上

設定

  1. 依存関係をインストールします:

npm install
  1. 環境変数を設定します.env.sample.envにコピーし、値を調整します。

cp .env.sample .env

.env構成の例:

# With username/password
DATABASE_URL="postgresql://username:password@localhost:5432/mcp_memory"
PORT=3333

# Local development with peer authentication
DATABASE_URL="postgresql:///mcp_memory"
PORT=3333
  1. データベースを初期化します。

npm run prisma:migrate
  1. サーバーを起動します。

npm start

自動リロードを使用した開発の場合:

npm run dev

カーソルの使用

カーソルにMCPサーバーを追加する

Cursor にメモリサーバーを追加するには、 ~/.cursor/mcp.json mcpServersある MCP 設定ファイルを変更する必要があります。mcpServers オブジェクトに以下の設定を追加します。

{
  "mcpServers": {
    "memory": {
      "command": "node",
      "args": [
        "/path/to/your/memory/src/server.js"
      ]
    }
  }
}

/path/to/your/memoryメモリ サーバーのインストールへの実際のパスに置き換えます。

たとえば、リポジトリを/Users/username/workspace/memoryにクローンした場合、構成は次のようになります。

{
  "mcpServers": {
    "memory": {
      "command": "node",
      "args": [
        "/Users/username/workspace/memory/src/server.js"
      ]
    }
  }
}

サーバーは必要に応じてCursorによって自動的に起動されます。動作を確認するには、次の手順に従ってください。

  1. カーソルを開く

  2. カーソルが起動するとメモリサーバーが自動的に起動します

  3. http://localhost:3333/mcp/v1/healthにアクセスしてサーバーの状態を確認できます。

利用可能なMCPエンドポイント

SSE接続

  • エンドポイント: GET /mcp/v1/sse

  • クエリパラメータ:

    • subscribe : サブスクライブするイベントのコンマ区切りリスト(オプション)

  • イベント:

    • connected : 初期接続時に送信されます

    • memory.created : 新しいメモリが作成された時に送信されます

    • memory.updated : 既存のメモリが更新されたときに送信されます

メモリ操作

  1. 記憶を創る

POST /mcp/v1/memory
Content-Type: application/json

{
  "type": "learning",
  "content": {
    "topic": "Express.js",
    "details": "Express.js is a web application framework for Node.js"
  },
  "source": "documentation",
  "tags": ["nodejs", "web-framework"],
  "confidence": 0.95
}
  1. 思い出を探す

GET /mcp/v1/memory/search?query=web+frameworks&type=learning&tags=nodejs
  1. 思い出をリストアップ

GET /mcp/v1/memory?type=learning&tags=nodejs,web-framework

健康チェック

GET /mcp/v1/health

応答フォーマット

すべての API 応答は標準の MCP 形式に従います。

{
  "status": "success",
  "data": {
    // Response data
  }
}

またはエラーの場合:

{
  "status": "error",
  "error": "Error message"
}

メモリスキーマ

  • id: 一意の識別子

  • タイプ: 記憶の種類(学習、経験など)

  • コンテンツ: 実際のメモリ内容 (JSON)

  • 出典: 記憶の源

  • 埋め込み: コンテンツのベクトル表現(384次元)

  • tags: 関連タグの配列

  • 信頼度: 信頼度スコア (0-1)

  • createdAt: メモリが作成された時刻

  • 更新日時: メモリが最後に更新された日時

A
license - permissive license
Not graded
quality - not tested
F
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables AI assistants to store and retrieve long-term memories using PostgreSQL with vector similarity search. Supports semantic memory operations, tagging, and real-time updates for persistent learning across conversations.
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to store and retrieve memories with semantic search capabilities using vector embeddings. Provides persistent memory storage with SQLite backend for context retention across conversations.
    143
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to store, retrieve, and manage contextual knowledge across sessions using semantic search with PostgreSQL and vector embeddings. Supports memory relationships, clustering, multi-agent isolation, and intelligent caching for persistent conversational context.
    28
    48
    MIT
  • A
    license
    Not graded
    quality
    F
    maintenance
    Persistent semantic memory for AI agents using PostgreSQL and vector embeddings, enabling cross-session continuity and semantic search.
    AGPL 3.0

View all related MCP servers

Related MCP Connectors

  • Long-term memory for AI assistants. Hybrid retrieval, query expansion, auto-topics.

  • Persistent memory for AI agents. Search, store, and recall across sessions.

  • Persistent memory for AI agents — verbatim conversations, searchable by meaning.

View all MCP Connectors

Latest Blog Posts

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/sdimitrov/mcp-memory'

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