经 AI Skill Hub 精选评估,engram MCP工具 获评「强烈推荐」。已获得 3.5k 颗 GitHub Star,这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.5 分,适合有一定技术背景的用户使用。
为AI编码代理提供持久化内存管理的开源MCP工具。采用Go语言实现,提供SQL存储后端,支持多Agent通用。使得AI助手能够跨会话保留上下文和历史信息,显著提升编码效率和连贯性。适合构建长期记忆的AI编程助手开发者。
engram MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
为AI编码代理提供持久化内存管理的开源MCP工具。采用Go语言实现,提供SQL存储后端,支持多Agent通用。使得AI助手能够跨会话保留上下文和历史信息,显著提升编码效率和连贯性。适合构建长期记忆的AI编程助手开发者。
engram MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/Gentleman-Programming/engram
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"engram-mcp--": {
"command": "npx",
"args": ["-y", "engram"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 engram MCP工具 执行以下任务... Claude: [自动调用 engram MCP工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"engram_mcp__": {
"command": "npx",
"args": ["-y", "engram"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
<p align="center"> <img width="1024" alt="Engram — One Brain. Local or Cloud." src="assets/branding/engram-banner.png" /> </p>
<p align="center"> <strong>Persistent memory for AI coding agents</strong><br> <em>One brain. Local or cloud. Agent-agnostic, single binary, zero dependencies.</em> </p>
<p align="center"> <a href="docs/INSTALLATION.md">Installation</a> • <a href="docs/engram-cloud/README.md">Engram Cloud</a> • <a href="docs/AGENT-SETUP.md">Agent Setup</a> • <a href="docs/CODEBASE-GUIDE.md">Codebase Guide</a> • <a href="docs/ARCHITECTURE.md">Architecture</a> • <a href="docs/PLUGINS.md">Plugins</a> • <a href="CONTRIBUTING.md">Contributing</a> • <a href="DOCS.md">Full Docs</a> </p>
---
engram /ˈen.ɡræm/ — neuroscience: the physical trace of a memory in the brain.
Your AI coding agent forgets everything when the session ends. Engram gives it a brain.
A Go binary with SQLite + FTS5 full-text search, exposed via CLI, HTTP API, MCP server, and an interactive TUI. Works with any agent that supports MCP — Claude Code, OpenCode, Gemini CLI, Codex, VS Code (Copilot), Antigravity, Cursor, Windsurf, or anything else.
Agent (Claude Code / OpenCode / Gemini CLI / Codex / VS Code / Antigravity / ...)
↓ MCP stdio
Engram (single Go binary)
↓
SQLite + FTS5 (~/.engram/engram.db)
brew install gentleman-programming/tap/engram
Windows, Linux, and other install methods → docs/INSTALLATION.md
| Agent | One-liner |
|---|---|
| Claude Code | claude plugin marketplace add Gentleman-Programming/engram && claude plugin install engram |
| Pi | engram setup pi |
| OpenCode | engram setup opencode |
| Gemini CLI | engram setup gemini-cli |
| Codex | engram setup codex |
| VS Code | code --add-mcp '{"name":"engram","command":"engram","args":["mcp"]}' |
| Cursor / Windsurf / Any MCP | See [docs/AGENT-SETUP.md](docs/AGENT-SETUP.md) |
Full per-agent config, Memory Protocol, and compaction survival → docs/AGENT-SETUP.md
That's it. No Node.js, no Python, no Docker. One binary, one SQLite file.
```bash git clone https://github.com/Gentleman-Programming/engram.git engram-beta-repo cd engram-beta-repo && git checkout feat/memory-conflict-surfacing-cloud-sync docker compose -f docker-compose.beta.yml up -d go build -o ./engram-beta ./cmd/engram
1️⃣ Phase 1 — Conflict detection on save (sanity)
./engram-beta save \
"Use Clean Architecture" \
"Layers: entities, use cases, adapters." \
--type architecture --project beta-test
./engram-beta save \
"Use Hexagonal Architecture" \
"Ports and adapters separate domain from infra." \
--type architecture --project beta-test
✅ Second save returns candidates[] with the first memory's id.
2️⃣ Phase 2 — Cloud sync of relations cross-machine
```bash ./engram-beta cloud enroll beta-test ./engram-beta sync --cloud --project beta-test ./engram-beta cloud status
export ENGRAM_DATA_DIR=/tmp/engram-beta-data export ENGRAM_CLOUD_SERVER=http://127.0.0.1:28080 export ENGRAM_CLOUD_TOKEN=beta-token-CHANGE-ME-please-32chars mkdir -p "$ENGRAM_DATA_DIR" ```
| Command | Description |
|---|---|
engram setup [agent] | Install agent integration |
engram serve [port] | Start HTTP API (default: 7437) |
engram mcp [--tools=PROFILE] | Start MCP server (stdio transport) |
engram tui | Launch terminal UI |
engram search <query> | Search memories |
engram save <title> <msg> | Save a memory |
engram timeline <obs_id> | Chronological context |
engram context [project] | Recent session context |
engram stats | Memory statistics |
engram export [file] | Export to JSON |
engram import <file> | Import from JSON |
engram sync | Git sync export/import |
engram cloud <subcommand> | Opt-in cloud config/status/enrollment + cloud runtime (serve) |
engram projects list\|consolidate\|prune | Manage project names |
engram obsidian-export | Export to Obsidian vault (beta) |
engram version | Show version |
Full CLI with all flags → docs/ARCHITECTURE.md#cli-reference
Engram has a first-class Pi package: gentle-engram.
engram setup pi
It gives Pi persistent project memory, compaction recovery, and shared memory with other MCP agents through the same local-or-cloud Engram brain. The package is part of the Gentleman Programming agentic-coding ecosystem alongside Gentle-AI, SDD, skills, and Engram Cloud.
Cloud is optional. Local SQLite stays authoritative; cloud is replication/shared access only.
Recommended first path (local smoke):
docker compose -f docker-compose.cloud.yml up -d
engram cloud config --server http://127.0.0.1:18080
engram cloud enroll smoke-project
engram sync --cloud --project smoke-project
Cloud mode is always project-scoped (--project is required; engram sync --cloud --all is intentionally blocked). Known repairable cloud sync/upsert/canonicalization failures keep the original error visible and recommend the explicit doctor/repair flow below; Engram never auto-applies repair from sync or autosync. For blocked cloud sync, transport_failed, or legacy session directory repair, see Engram Cloud Troubleshooting. If cloud sync stays blocked after doctor/repair, download the rescue helper and run the recommended exported-row repair:
tools/repair-missing-session-directory.sh --apply --interactive --fix-exported <project>
engram sync --cloud --project <project>
--fix-exported repairs local exported sessions[].directory and observations[] required fields that can still break the final push after doctor reports ready. For sequential legacy sync_mutations blockers, use tools/repair-missing-session-directory.sh --apply --interactive --all <project>.
After upgrading engram while an MCP client is already running:
engram setup claude-code
Then restart Claude Code so it reloads the Engram MCP subprocess and refreshed hook/config files. Updating the engram binary on disk does not replace an already-running stdio MCP process.
Upgrade flow for existing local databases (diagnose → repair → bootstrap → status):
engram cloud upgrade doctor --project smoke-project # read-only readiness check
engram cloud upgrade repair --project smoke-project --dry-run
engram cloud upgrade repair --project smoke-project --apply
engram cloud upgrade bootstrap --project smoke-project # resumable enroll + push + verify
engram cloud upgrade status --project smoke-project # stage/class/reason
See DOCS.md — Cloud upgrade flow for the full state machine.
For authenticated mode, upgrade flow, dashboard behavior, reason codes, and full runtime/env details:
→ Report feedback: issues with beta-phase-2-3-4 label
优秀的MCP工具实现,解决AI Agent长期记忆痛点。Go语言保证高性能,SQL存储提供灵活查询能力。社区活跃度高,是构建智能编码助手的核心基础设施。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:engram MCP工具 的核心功能完整,质量优秀。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | engram |
| 原始描述 | 开源MCP工具:Persistent memory system for AI coding agents. Agent-agnostic Go binary with SQL。⭐3.5k · Go |
| Topics | 持久化记忆编码代理MCP协议Go开发SQL存储 |
| GitHub | https://github.com/Gentleman-Programming/engram |
| License | MIT |
| 语言 | Go |
收录时间:2026-05-16 · 更新时间:2026-05-19 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端