
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 分