
MegaMemory
by 0xK3vin·★ 168·综合分 50
MegaMemory 是一个为编程代理创建持久项目知识图谱的 MCP 服务器,支持语义搜索。
概述
MegaMemory 允许编程代理在会话之间构建和查询概念、架构和决策的图谱。它使用 LLM 生成的概念而非 AST 解析,在 SQLite 中持久化知识图谱。服务器提供了理解项目上下文、创建/更新概念、管理关系和解决不同版本知识图谱之间合并冲突的工具。它包含用于可视化的 Web 浏览器,并支持多个 MCP 客户端。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当您的编码助手需要跨会话持久记忆且不涉及复杂 AST 解析时,选择 MegaMemory,特别适用于架构理解随时间演变的项目。
什么时候不要选它
如果您需要实时代码符号分析或项目有严格的零磁盘使用要求,请避免使用 MegaMemory,因为它将所有知识本地存储在 SQLite 中。
此 server 暴露的工具
从 README 抽取出 9 个工具understandSemantic search over the knowledge graph. Returns matched concepts with children, edges, and parent context.
get_conceptLook up a concept by its exact ID. Returns full context including children, edges, incoming edges, and parent.
create_conceptAdd a new concept with optional edges and file references.
update_conceptUpdate fields on an existing concept. Regenerates embeddings automatically.
linkCreate a typed relationship between two concepts.
remove_conceptSoft-delete a concept with a reason. History preserved.
list_rootsList all top-level concepts with direct children.
list_conflictsList unresolved merge conflicts grouped by merge group.
resolve_conflictResolve a merge conflict by providing verified, correct content based on the current codebase.
可对比工具
安装
安装
npm install -g megamemoryClaude Desktop 配置
添加到 Claude Desktop 配置文件中:
{
"mcpServers": {
"megamemory": {
"command": "megamemory",
"args": []
}
}
}其他 MCP 客户端
megamemory install --target <客户端名称>客户端名称可以是 opencode、claudecode、antigravity 或 codex。
FAQ
- MegaMemory 如何存储知识?
- 它使用 SQLite WAL 模式存储,将概念作为节点,关系作为边。每个项目都有自己的数据库,位于 .megamemory/knowledge.db。
- 它是否需要 API 密钥或网络调用?
- 不需要,嵌入处理在内存中进行,使用 all-MiniLM-L6-v2 模型(下载一次约 23MB),无需 API 密钥。
MegaMemory 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。