jamjet-labs/engram-mcp-server
Durable memory MCP server for AI agents. Temporal knowledge graph with hybrid semantic + keyword retrieval, LLM-powered fact extraction, conflict detection, and consolidation. Backed by SQLite or PostgreSQL. 11 MCP tools, 6 LLM provider backends. Part of JamJet.
README
<div align="center">
<h1>Engram MCP Server</h1>
Durable memory for AI agents — temporal knowledge graph, hybrid retrieval, SQLite or PostgreSQL.
java-ai-memory.dev · Source code · JamJet docs · Discord
</div>
Engram is a durable memory layer for AI agents. It extracts facts from conversations, stores them in a temporal knowledge graph, and retrieves them with hybrid semantic + keyword search — backed by a single SQLite file or a PostgreSQL database.
This repo hosts the Glama registry listing. Source code lives in the main JamJet repo.
Quickstart — 30 seconds
# Docker — uses local Ollama by default
docker run --rm -i \
-v engram-data:/data \
ghcr.io/jamjet-labs/engram-server:0.5.0
Or install from crates.io:
cargo install jamjet-engram-server
engram serve
Claude Desktop configuration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"engram": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-v", "engram-data:/data",
"ghcr.io/jamjet-labs/engram-server:0.5.0"
]
}
}
}
After restart, 11 MCP tools are available to the model.
MCP Tools (11)
Memory tools (7)
| Tool | Description |
|---|---|
memory_add |
Extract and store facts from conversation messages using LLM-powered fact extraction. Side effects: calls the configured LLM to parse facts, then writes them to the knowledge graph. Returns extracted fact IDs. Requires messages array and user_id. |
memory_recall |
Semantic search over stored facts using vector similarity. Read-only, no side effects. Returns ranked facts matching the query, scoped by user_id and optional org_id. Use this to retrieve relevant context before generating a response. |
memory_context |
Assemble a token-budgeted context block for LLM prompts with tier-aware fact selection. Read-only. Returns a formatted string of the most relevant facts, capped at the specified token budget. Use this instead of memory_recall when you need a ready-to-use prompt snippet. |
memory_search |
Keyword search over facts using full-text search (SQLite FTS5 / Postgres). Read-only, no side effects. Returns facts matching exact keywords. Use this when you need precise term matching rather than semantic similarity from memory_recall. |
memory_forget |
Soft-delete a fact by ID with an optional reason. Side effect: marks the fact as deleted in the knowledge graph (does not physically remove it). Irreversible via this tool. Use when a user asks to remove specific information. |
memory_stats |
Get aggregate statistics: total facts, valid (non-deleted) facts, entity count, and relationship count. Read-only, no side effects. Use this to understand the size and health of the memory store. |
memory_consolidate |
Run a maintenance cycle over the knowledge graph — decay stale facts, promote high-confidence ones, deduplicate near-duplicates, and summarize clusters. Side effects: modifies fact scores and may merge or archive facts. Run periodically to keep memory accurate. |
Message store tools (4)
| Tool | Description |
|---|---|
messages_save |
Save chat messages for a conversation by ID. Side effects: writes messages to the store and optionally triggers fact extraction (controlled by --extract-on-save). Use this to persist full conversation history alongside extracted facts. |
messages_get |
Retrieve all messages for a conversation by ID. Read-only, no side effects. Returns the ordered message array. Use this to replay or inspect a past conversation. |
messages_list |
List all conversation IDs in the message store. Read-only, no side effects. Returns an array of conversation ID strings. Use this to discover what conversations are stored before retrieving with messages_get. |
messages_delete |
Delete all messages for a conversation by ID. Side effect: permanently removes the conversation's messages from the store. Irreversible. Does not affect extracted facts — use memory_forget for that. |
All memory tools are scoped by (org_id, user_id, session_id) — org is the coarsest, session the finest.
LLM Providers
Provider-agnostic. One binary, set ENGRAM_LLM_PROVIDER=... and go:
| Provider | Env value | Notes |
|---|---|---|
| Ollama | ollama (default) |
Local, free, no API keys |
| OpenAI-compatible | openai-compatible |
OpenAI, Azure, Groq, Together, Mistral, DeepSeek, vLLM, LM Studio, ... |
| Anthropic | anthropic |
Claude via Messages API |
google |
Gemini via generateContent | |
| Shell command | command |
Pipe to any external script |
| Mock | mock |
Deterministic, for tests only |
# Example: use Groq instead of Ollama
docker run --rm -i \
-e ENGRAM_LLM_PROVIDER=openai-compatible \
-e ENGRAM_OPENAI_BASE_URL=https://api.groq.com/openai/v1 \
-e OPENAI_API_KEY=gsk_... \
-v engram-data:/data \
ghcr.io/jamjet-labs/engram-server:0.5.0
Why Engram?
| Problem | Engram's answer |
|---|---|
| Every agent memory library is Python-first | Rust core with native Python, Java, and MCP clients |
| Needs Postgres + Qdrant + Neo4j just to try | Single SQLite file (zero infra) or Postgres when you need it |
| Conversation history is not knowledge memory | Fact extraction pipeline — structured facts from messages |
| Old facts drift and contradict | Conflict detection + consolidation — decay, promote, dedup, summarize |
| Memory recall is either semantic OR keyword | Hybrid retrieval — vector search + FTS5 in one query |
| MCP support is an afterthought | MCP-native — 11 tools exposed by a single binary |
| Can't isolate memory per user or tenant | First-class scopes — org / user / session built into every query |
Client SDKs
| Language | Package | Install |
|---|---|---|
| Python | jamjet (includes EngramClient) |
pip install jamjet |
| Java | dev.jamjet:jamjet-sdk (includes EngramClient) |
Maven Central |
| Spring Boot | dev.jamjet:engram-spring-boot-starter |
Maven Central |
| Rust | jamjet-engram (embed directly) |
cargo add jamjet-engram |
Related
- JamJet — the full agent-native runtime (parent project)
- java-ai-memory.dev — comparison with Mem0, Zep, LangChain4j, Spring AI, and others
- Full Engram docs
License
Apache 2.0 — see LICENSE.
<div align="center"> <sub>Part of <a href="https://jamjet.dev">JamJet</a> · Built by <a href="https://github.com/sunilp">Sunil Prakash</a> · © 2026 JamJet Labs</sub> </div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。