mcp-memory-server
MCPメモリサーバー
MarkdownファイルとSQLite FTS5全文検索による、Blockbrain(または任意のMCPクライアント)向けの永続的なエージェントメモリ。
なぜ?
Blockbrainエージェントはセッション間でメモリを保持しません。すべての会話はゼロから始まります。このMCPサーバーはそれを修正します — エージェントは学んだことを保存し、次回に思い出すことができます。
仕組み:
エージェントが問題を解決 → 解決策とともに
memory_saveを呼び出すエージェントが新しいタスクを開始 → 過去の類似問題を確認するために
memory_recallを呼び出すすべてのメモリは読み取り可能なMarkdownファイルとして保存され、高速検索のためにSQLiteにインデックス化される
Related MCP server: universal-memory-mcp
ツール
ツール | 説明 |
| メモリエントリを保存(トピック、タイトル、コンテンツ) |
| キーワード/トピックでメモリを検索(FTS5) |
| 保存されたすべてのトピックとエントリ数を一覧表示 |
| IDでメモリエントリを削除 |
クイックスタート(Docker)
# 1. Clone
git clone https://github.com/lanlibbi/mcp-memory-server.git
cd mcp-memory-server
# 2. Configure
cp .env.example .env
# Edit .env — set MEMORY_API_KEY!
# Generate a key: openssl rand -hex 32
# 3. Run
docker compose up -d
# 4. Verify
curl http://localhost:8080/healthBlockbrain統合
サーバーを公開する — BlockbrainにはHTTPS URLが必要です:
オプションA: Cloudflare Tunnel(
cloudflared tunnel --url http://localhost:8080)オプションB: TLSを使用した任意のリバースプロキシ(nginx、Caddy、Traefik)
オプションC: テスト用のngrok(
ngrok http 8080)
Blockbrainに登録する:
Admin → Agents → MCP Servers に移動
"+ Add MCP Server" をクリック
以下を入力:
名前: Memory Server
サーバーURL:
https://<your-public-url>/sseトランスポート: SSE
認証: APIキー
APIキー: (.envの値)
保存して有効化
エージェントに割り当て、エージェントのシステムプロンプトに指示を追加します:
Before starting a new task, call memory_recall with keywords related to the task. After completing a task or learning something new, call memory_save with: - topic: a category for the task (e.g. "contract-review", "supplier-issue") - title: a short descriptive title - content: what was the problem, what was the solution, what was learned
設定
すべての設定は環境変数を介して行います:
変数 | デフォルト | 説明 |
| (空 = 認証なし) | X-API-Keyヘッダー用のAPIキー |
|
| Markdownファイルが保存される場所 |
|
| HTTPポート |
|
| クエリごとの最大検索結果数 |
|
| デバッグ、情報、警告、エラー |
ストレージ
メモリはYAMLフロントマター付きのMarkdownファイルとして保存されます:
/data/memories/
├── contract-review/
│ ├── nda-standard-clauses.md
│ └── liability-clause-fix.md
├── supplier-issue/
│ └── delayed-delivery-workaround.md
└── memory.db ← SQLite FTS5 index各ファイルは次のようになります:
---
id: a1b2c3d4e5f67890
topic: contract-review
title: NDA Standard Clauses
created_at: 2026-08-20T15:00:00Z
updated_at: 2026-08-20T15:00:00Z
---
# NDA Standard Clauses
The standard NDA should always include...メモリは直接閲覧、編集、削除できます — 単なるMarkdownファイルです。SQLiteインデックスは自動的に同期されます。
ローカル開発(Dockerなし)
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
export MEMORY_API_KEY=test-key
export MEMORY_DATA_DIR=./data/memories
python -m uvicorn src.server:app --host 0.0.0.0 --port 8080APIエンドポイント
エンドポイント | メソッド | 説明 |
| GET | ヘルスチェック(認証不要) |
| GET | MCPクライアント接続用のSSEエンドポイント |
| POST | MCPメッセージエンドポイント(SSEトランスポートで使用) |
技術スタック
Python 3.12 + MCP SDK
HTTP/SSE用のStarlette + Uvicorn
全文検索用のSQLite FTS5(外部依存ゼロ)
人間が読めるストレージ用のMarkdown
ライセンス
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP memory for coding agents: persistent across sessions, editable markdown, team sharing.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
One memory, every AI. A shared, user-owned markdown memory your AI clients read and write over MCP.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server providing persistent memory management for AI agents using SQLite and FTS5, enabling storage, full-text search, and recall of memories with namespace isolation.1MIT
- AlicenseAqualityCmaintenancePersistent memory MCP server for AI agents, using SQLite with hybrid keyword and semantic search for long-term memory storage.5Do What The F*ck You Want To Public
- AlicenseNot gradedqualityDmaintenancePersistent memory MCP server that stores and retrieves memories in Markdown files, enabling shared context across multiple AI agents with hybrid search and deduplication.MIT
- AlicenseAqualityBmaintenanceMCP server for persistent, cross-session, local-first memory for AI agents, storing memories as Markdown files with SQLite indexing for hybrid search.24Apache 2.0