
Mnemograph
io.github.tm42由 GitHub 账号 tm42 发布v0.5.1更新于 Oct 24, 2026
Event-sourced knowledge graph memory for AI coding agents with semantic search
概览
为编码助手提供持久的事件溯源知识图谱记忆,支持语义搜索、分支和类似 git 的历史记录。
- 可以做什么
- Mnemograph 将实体、关系和观察记录保存在本地知识图谱中,让助手能够跨会话记住决策、模式和经验。工具包括用于存储和检索的 remember 与 recall、会话生命周期辅助工具、分支与合并操作、重复检测与合并等图谱维护功能,以及查看、对比、回退和恢复历史状态的时间旅行工具。recall 默认返回人类可读的散文格式,并提供浅、中、深三种检索深度。
- 适用场景
- 当助手需要在多次编码会话之间保留项目知识时使用,例如架构决策、反复出现的模式和注意事项。它适合通过仓库共享记忆的多项目或团队场景,以及需要隔离分支或学习审计记录的工作流。
- 运行要求
- 作为 PyPI 包通过 stdio 在本地运行,通常用 uvx 启动,因此需要 Python 工具链。需设置 MEMORY_PATH 指向记忆目录,支持项目本地、全局和自定义路径。未声明身份验证。版本历史依赖 git。
安装
在 SourceWeft 中
- 打开 控制台中的 Mnemograph,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Mnemograph
A persistent, event-sourced knowledge graph for AI coding agents. Unlike simple key-value memory, Mnemograph captures entities, relations, and observations — enabling semantic search, tiered context retrieval, and git-based version control of your AI's memory.
Works with: Claude Code, opencode, codex CLI, Zed, Continue.dev, and any MCP-compatible agent.
Why Mnemograph?
AI coding sessions are ephemeral. Mnemograph gives your AI partner persistent memory that:
- Survives across sessions — decisions, patterns, learnings persist
- Supports semantic search — find relevant context by meaning, not just keywords
- Provides tiered retrieval — shallow summaries to deep subgraphs based on need
- Versions like code — branch, commit, diff, revert your knowledge graph
- Enables collaboration — share memory repos across users or projects
Memory Scope: Local vs Global
Before using mnemograph, decide where to store memory:
Important: Agents should ask the user which scope to use when first setting up mnemograph for a project. This affects where knowledge is stored and whether it's shared across projects.
Quick Start
Option 1: Let Claude Code install it
Give Claude Code this repo URL and ask it to set up mnemograph:
Or point Claude to the setup instructions directly:
Option 2: Manual installation
Option 3: Other MCP Clients
Each MCP client has a different configuration format. See UNIVERSAL_MCP_COMPATIBILITY.md for copy-paste configs for:
- opencode —
~/.config/opencode/opencode.json - Codex CLI —
~/.codex/config.yaml - Zed —
~/.config/zed/settings.json - Continue.dev —
~/.continue/config.json
The key environment variable is MEMORY_PATH — set it to where you want the knowledge graph stored.
Option 4: Install from source
Usage
MCP Tools (used by any agent)
Mnemograph exposes these tools via MCP:
Core Operations:
Session Lifecycle:
Branching (Parallel Workstreams):
Graph Maintenance:
Time Travel:
Edge Weights:
Recall: Prose vs Graph Format
The recall tool returns context in prose format by default — human-readable text that agents can consume directly without parsing JSON:
Depth levels:
shallow— Quick summary: entity counts, recent activity, gotchasmedium— Semantic search + 1-hop neighbors (~2000 tokens)deep— Multi-hop traversal from focus entities (~5000 tokens)
Gotcha extraction: Observations prefixed with Gotcha:, Warning:, Note:, or Important: are automatically extracted into a dedicated section.
CLI Tools
mnemograph — Unified CLI for all memory operations:
Running from anywhere (without activating the venv):
Graph Visualization — Interactive D3.js viewer:
- Layout algorithms: Force-directed, Radial (hubs at center), Clustered (by component)
- Color modes: By entity type, connected component, or degree centrality
- Edge weight slider: Filter connections by strength
- Live refresh:
--watchmode with Refresh button for real-time updates
Architecture
Event sourcing means all changes are recorded as immutable events in SQLite. The current state is computed by replaying events. This enables:
- Full history of all changes
- Revert any operation
- Branch/merge knowledge graphs
- Audit trail of what Claude learned and when
Two-layer versioning:
mnemograph vcs revert— fine-grained, undo specific events via compensating eventsmnemograph rewind/mnemograph restore— coarse-grained, git-level or timestamp-based restore
Branching
Branches let you work on isolated knowledge without affecting the main graph. Perfect for:
- Exploratory work — try approaches without polluting shared knowledge
- Feature-specific context — "feature/auth-refactor" keeps auth decisions separate
- Multiple projects — switch context between different codebases
Creating and Using Branches
How Branching Works
- Main branch always exists, contains shared knowledge
- Feature branches inherit from main but additions stay isolated
- Automatic filtering —
recall,search, etc. only see current branch + main - Merge copies branch entities/relations into target branch
- Delete cleans up after merge (or abandons exploratory work)
Branch Naming Conventions
Entity Types
Topic Convention
Use topic entities as entry points for browsing related knowledge:
Standard topics:
topic/projects— Project entitiestopic/decisions— Architectural decisionstopic/patterns— Patterns and practicestopic/learnings— Key discoveriestopic/questions— Open questions
This makes it easy to query "what decisions have we made?" by exploring topic/decisions.
Development
Based On
Mnemograph builds on MCP server-memory — Anthropic's official memory server
License
MIT
来源:README.md,提交 4136ad7
工具
0版本历史
1- v0.5.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分