Memory MCP
Memory MCP
AIコーディングアシスタント向けの永続メモリおよびセッション全文検索機能。 MCP サーバーとして公開されます。
課題
AIコーディングアシスタントは、セッション間で情報をすべて忘れてしまいます。アーキテクチャの決定事項、ユーザー設定、プロジェクトのコンテキスト、先週火曜日にデバッグした内容など、すべて消えてしまいます。そのため、常に同じことを説明し直す必要があります。
Memory MCPは、以下の2つの機能でこれを解決します。
明示的メモリ -- セッションをまたいで保持されるメモ、決定事項、パターン、設定を保存します。アシスタントがあなたの指示を記憶します。
セッション検索 -- 会話履歴全体に対する全文検索。ログをスクロールすることなく、3週間前に議論した内容を見つけ出せます。
データベースサーバーは不要です。バックグラウンドプロセスも不要です。クラウドも使いません。マシン上の1つのSQLiteファイルで完結します。
Related MCP server: MCP Vector Memory
サポートされているセッションソース
ソース | 場所 | フォーマット |
| JSONL (ストリーミングコンテンツブロック) | |
Claude Code履歴 |
| JSONL (セッションファイルの整理後も保持) |
| SQLite (sessions, messages, partsテーブル) | |
| JSONL (1行1イベント) |
新しいソースを追加するには、パーサーファイル1つとレジストリへの登録が必要です。新しいセッションソースの追加を参照してください。
インストール
SQLite FTS5サポートを備えたPython 3.11以上が必要です(標準のPythonビルドに含まれています)。
pip install -e .または、uv を使用して直接実行します(インストール不要):
uv run --directory /path/to/memory_mcp python -m memory_mcpMCP設定
MCPクライアントの設定(例: ~/.claude/mcp.json またはプロジェクトレベルの .mcp.json)に追加します:
pipインストールの場合:
{
"mcpServers": {
"memory": {
"command": "memory-mcp"
}
}
}uvを使用する場合(インストール不要):
{
"mcpServers": {
"memory": {
"command": "uv",
"args": ["run", "--directory", "/path/to/memory_mcp", "python", "-m", "memory_mcp"]
}
}
}ツール
メモリ(明示的知識ストア)
ツール | 説明 |
| オプションのタグとコンテキストを付けてメモを永続化します。将来のすべてのセッションで保持されます。 |
| 保存されたメモリ全体を全文検索します。キーワードベースで、関連度順にランク付けされます。 |
| 最近のメモリを閲覧します(タグによるフィルタリングも可能)。 |
| IDを指定してメモリを削除します。 |
セッション(過去の会話検索)
ツール | 説明 |
| 過去のセッションを閲覧します。ソース( |
| 特定のセッションの会話全体を取得します。 |
| すべてのセッションメッセージ、思考ブロック、ツール使用履歴を全文検索します。 |
| セッションディレクトリを再スキャンし、新規または変更されたファイルをインデックス化します。 |
仕組み
起動時に、Memory MCPは設定されたセッションディレクトリをスキャンし、すべての会話を FTS5 全文検索インデックスを備えたローカルのSQLiteデータベースにインデックス化します。次回の起動時からは、mtime(更新日時)が変更されていないファイルはスキップされます。
データベースの場所:
~/.memory_mcp/memory.db(環境変数MEMORY_MCP_DBで上書き可能)セッションソース: 標準的な場所から自動検出されます(環境変数
MEMORY_MCP_SOURCESで拡張可能。フォーマット:type:path;type:path)インデックス化: ファイルのmtimeによる増分更新、8スレッドによる並列処理
検索: BM25ランキング、前方一致、フレーズサポートを備えたFTS5
新しいセッションソースの追加
memory_mcp/parsers/your_source.pyを作成し、SessionParserプロトコルを実装します:source_type: str属性parse_file(path: str) -> ParsedSession | Noneメソッド
memory_mcp/parsers/__init__.pyに登録しますmemory_mcp/config.pyにディレクトリ検出機能を追加します
例として parsers/claude_code.py または parsers/omp.py を参照してください。
テスト
python tests/test_e2e.pyエンドツーエンドテストでは、MCPサーバーをサブプロセスとして起動し、stdioプロトコル経由ですべての8つのツールを実行して応答を検証します。使い捨てのデータベースを使用するため、実際のデータは変更されません。
アーキテクチャ
memory_mcp/
server.py # FastMCP entry point, lifespan manages DB + startup scan
config.py # Auto-detects session dirs, DB path
db.py # SQLite + FTS5 schema, all queries, sync triggers
scanner.py # Walks session dirs, dispatches to parsers, parallel indexing
parsers/
base.py # ParsedSession / ParsedMessage dataclasses, SessionParser protocol
claude_code.py # Claude Code JSONL parser (merges streamed assistant blocks)
claude_history.py # Claude Code history.jsonl parser (one file, many sessions)
omp.py # OMP JSONL parser
opencode.py # OpenCode SQLite parser (reads DB directly, read-only)
tools/
memory.py # save_memory, search_memory, list_memories, delete_memory
sessions.py # list_sessions, get_session, search_sessions, refresh_sessionsライセンス
MIT
Maintenance
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
- -licenseNot gradedqualityNot gradedmaintenanceProvides persistent local memory functionality for AI assistants, enabling them to store, retrieve, and search contextual information across conversations with SQLite-based full-text search. All data stays private on your machine while dramatically improving context retention and personalized assistance.3
- AlicenseNot gradedqualityNot gradedmaintenanceProvides AI coding agents with persistent, long-term memory through local semantic search and SQLite storage. It enables agents to save and retrieve architectural decisions or project context across different conversation sessions without requiring cloud services.
- AlicenseNot gradedqualityCmaintenanceProvides AI coding assistants with persistent project memory to retain architectural decisions, code patterns, and domain knowledge across sessions. It stores data locally in a SQLite database, allowing agents to remember, recall, and manage project-specific context using full-text search.8Apache 2.0
- AlicenseAqualityBmaintenanceProvides AI coding assistants with persistent memory storage using a local SQLite database. Enables tools to remember project details, notes, and relationships across sessions to maintain context and reduce repetitive explanations.174MIT
Related MCP Connectors
Persistent memory for AI agents. Search, store, and recall across sessions.
Persistent memory for AI agents — verbatim conversations, searchable by meaning.
Universal memory for AI agents and tools. Save, organize and search context anywhere.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/nerdyaustin/memory_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server