engram-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@engram-mcpsearch my conversations about react hooks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
engram-mcp
Claude Codeの会話履歴をローカルでセマンティック検索できるMCPサーバー。
Features
Hybrid Search: FTS5(キーワード検索)+ sqlite-vec(ベクトル検索)のRRF融合
Local Embeddings: Ollama (nomic-embed-text) によるローカル埋め込み生成
Time Decay: 古い記憶は検索スコアが減衰
Auto Save: セッション終了時に会話を自動保存(hooks連携)
Related MCP server: ClaudeHistoryMCP
Requirements
Node.js 20+
Ollama with
nomic-embed-textmodel
ollama pull nomic-embed-textInstallation
git clone https://github.com/lowbridgee/engram-mcp.git ~/.claude/memory
cd ~/.claude/memory
npm install
npm run build
npm run init-dbConfiguration
1. MCP Server設定
claude mcp add コマンドで登録する(全プロジェクト共通にするには --scope user):
claude mcp add --scope user engram-memory node /Users/$(whoami)/.claude/memory/dist/mcp_server.js登録確認:
claude mcp list2. Auto-save Hook設定
~/.claude/settings.json の hooks セクションに追加する。~ はNode.jsで展開されないため絶対パスを使うこと:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "node /Users/YOUR_USERNAME/.claude/memory/dist/save_session.js"
}
]
}
]
}
}Usage
MCP Tools
Claude Code内で以下のツールが使用可能:
search_memory: 過去の会話をハイブリッド検索(結果にはIDが付与され、500文字以上は[truncated]表示)get_memory: 指定したIDのメモリ全文を取得(truncatedされた内容を見たいときに使用)memory_stats: データベースの統計情報を表示
Manual Save
特定のセッションを手動で保存:
npm run save -- <session_id>Architecture
┌─────────────────┐ ┌─────────────────┐
│ Claude Code │────▶│ engram-mcp │
│ (MCP Client) │ │ (MCP Server) │
└─────────────────┘ └────────┬────────┘
│
┌────────────────────────┼────────────────────────┐
▼ ▼ ▼
┌───────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ memories │ │ memories_fts │ │ memories_vec │
│ (main table) │ │ (FTS5) │ │ (sqlite-vec) │
└───────────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ Ollama │
│ nomic-embed-text│
└─────────────────┘Database Schema
-- Main table
CREATE TABLE memories (
id INTEGER PRIMARY KEY,
session_id TEXT NOT NULL,
project_path TEXT,
turn_index INTEGER NOT NULL,
user_message TEXT,
assistant_message TEXT,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
-- FTS5 for keyword search (trigram tokenizer)
CREATE VIRTUAL TABLE memories_fts USING fts5(...);
-- sqlite-vec for semantic search (768-dim embeddings)
CREATE VIRTUAL TABLE memories_vec USING vec0(
memory_id INTEGER,
embedding FLOAT[768]
);License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/lowbridgee/engram-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server