
A Mem Mcp
io.github.DiaaAj由 GitHub 账号 DiaaAj 发布v0.2.1更新于 Oct 24, 2026
Self-evolving memory system for AI agents
概览
一个本地 MCP 服务器,为编码代理提供可自我演化、图结构的项目知识记忆库。
- 可以做什么
- A-MEM 保存助手添加的笔记,通过 LLM 提取关键词、上下文和标签,再把新笔记与语义相近的既有记忆关联起来,并随时间演化这些连接。它提供八个工具:add_memory_note、search_memories、search_memories_agentic、search_memories_by_time、read_memory_note、update_memory_note、delete_memory_note 和 check_task_status。检索结合向量相似度与图遍历,并采用先浏览元数据、再按需读取完整内容的模式以节省 token。记忆持久化在 ChromaDB 中。
- 适用场景
- 适合让编码代理跨会话记住决策、约定和上下文,而不必每次重新推导。最适合使用 Claude Code、希望拥有按项目隔离且会不断生长和关联的记忆(而非普通向量库)的用户。
- 运行要求
- 以 Python 包形式在本地通过 stdio 运行(pip install a-mem),仅支持桌面端。需要配置 LLM 后端:LLM_BACKEND(openai、ollama、sglang 或 openrouter)与 LLM_MODEL。当 LLM_BACKEND=openai 时必须提供 OPENAI_API_KEY;使用 OpenRouter 需要其对应的密钥。可选配置包括 EMBEDDING_MODEL、CHROMA_DB_PATH 和 EVO_THRESHOLD。在 Claude Code 中会自动安装会话启动钩子。
安装
在 SourceWeft 中
- 打开 控制台中的 A Mem Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
A-MEM: Self-evolving memory for coding agents
[PyPI version] [PyPI downloads] [MCP Registry]
mcp-name: io.github.DiaaAj/a-mem-mcp
A-MEM is a self-evolving memory system for coding agents. Unlike simple vector stores, A-MEM automatically organizes knowledge into a Zettelkasten-style graph with dynamic relationships. Memories don't just get stored—they evolve and connect over time.
Currently tested with Claude Code. Support for other MCP-compatible agents is planned.
[图片]Quick Start
Install
Add to Claude Code
That's it! A session-start hook installs automatically to remind Claude to use memory.
Note: Memory is stored per-project in
./chroma_db. For global memory across all projects, see Memory Scope.
Uninstall
How It Works
- Add a memory → A-MEM extracts keywords, context, and tags via LLM
- Find neighbors → Searches for semantically similar existing memories
- Evolve → Decides whether to link, strengthen connections, or update related memories
- Store → Persists to ChromaDB with full metadata and relationships
The result: a knowledge graph that grows smarter over time, not just bigger.
Features
Self-Evolving Memory Memories aren't static. When you add new knowledge, A-MEM automatically finds related memories and strengthens connections, updates context, and evolves tags.
Semantic + Structural Search Combines vector similarity with graph traversal. Find memories by meaning, then explore their connections.
Peek and Drill
Start with breadth-first search to capture relevant memories via lightweight metadata (id, context, keywords, tags). Then drill depth-first into specific memories with read_memory_note for full content. This minimizes token usage while maximizing recall.
MCP Tools
A-MEM exposes 8 tools to your coding agent:
Example Usage
Advanced Configuration
JSON Config
For more control, edit ~/.claude/settings.json (global) or .claude/settings.local.json (project):
Environment Variables
Memory Scope
- Project-specific (default): Each project gets isolated memory in
./chroma_db - Global: Share across projects by setting
CHROMA_DB_PATH=~/.local/share/a-mem/chroma_db
Alternative Backends
Ollama (local, free)
OpenRouter (100+ models)
Hook Management (Claude Code)
The session-start hook reminds Claude to use memory tools. It installs automatically with Claude Code, but you can manage it manually:
Python API
Use A-MEM directly in Python (works with any agent or application):
Research
A-MEM implements concepts from the paper:
A-MEM: Agentic Memory for LLM Agents Xu et al., 2025 arXiv:2502.12110
来源:README.md,提交 dce0ac6
工具
0版本历史
1- v0.2.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分