a-mem-mcp-server
A-MEM Agentic Memory System - MCP Server for IDE Integration (Cursor, VSCode) | Dual-Storage: ChromaDB + NetworkX DiGraph with explicit typed edges | Based on Zettelkasten
Install / Use
claude mcp add tobs-code -- npx -y github:tobs-code/a-mem-mcp-serverIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of a-mem-mcp-server
a-mem-mcp-server scores 80/100 on our quality scale, 773rd of 965 AI & Machine Learning skills we index.
Its MCP Server is 29 KB long, well organised into 82 sections with 25 code examples: a thorough specification that gives an agent plenty to work with.
It has 10 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 9 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-09-29 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 79/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
a-mem-mcp-server compared with similar skills
All 4 of these similar skills score higher than a-mem-mcp-server; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| a-mem-mcp-server (this skill)by tobs-code | 80 | 10 | 9mo ago | MCP Server |
| claude-memby thedotmack | 100 | 113.5k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 109.2k | today | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 90.9k | 10d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 78.9k | today | CLAUDE.md |
Frequently asked questions
- How do I install a-mem-mcp-server?
- Run
claude mcp add tobs-code -- npx -y github:tobs-code/a-mem-mcp-server. The install tabs above show the steps for each supported agent. - Which AI agents does a-mem-mcp-server work with?
- It is written for Claude Code, Claude Desktop and Cursor, as a MCP Server file. Other agents that read the same format can often use it too.
- Is a-mem-mcp-server safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 79/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is a-mem-mcp-server still maintained?
- The repository was last updated about 9 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubA-MEM: Agentic Memory System
An agentic memory system for LLM agents based on the Zettelkasten principle.
Based on: "A-Mem: Agentic Memory for LLM Agents"
by Wujiang Xu, Zujie Liang, Kai Mei, Hang Gao, Juntao Tan, Yongfeng Zhang
Rutgers University, Independent Researcher, AIOS Foundation
🚀 Features
Core Features
- ✅ Note Construction: Automatic extraction of keywords, tags, and contextual summary
- ✅ Link Generation: Automatic linking of similar memories
- ✅ Memory Evolution: Dynamic updating of existing memories
- ✅ Semantic Retrieval: Intelligent search with graph traversal
- ✅ Multi-Provider Support: Ollama (local) or OpenRouter (cloud)
- ✅ Environment Variables: Configuration via
.envfile - ✅ Graph Backend Selection: Choose between NetworkX (default), RustworkX (3x-100x faster), or FalkorDB (experimental, not fully tested)
- ✅ Parameter Validation: Automatic validation of all MCP tool parameters
- ✅ Safe Graph Wrapper: Edge case handling and data sanitization for robust operations
Advanced Features (New)
- ✅ Type Classification: Automatic classification of notes into 6 types (rule, procedure, concept, tool, reference, integration)
- ✅ Priority Scoring: On-the-fly priority calculation based on type, age, usage, and edge count for better search rankings
- ✅ Event Logging: Append-only JSONL event log for all critical operations (NOTE_CREATED, RELATION_CREATED, MEMORY_EVOLVED)
- ✅ Memory Enzymes: Autonomous background processes for graph maintenance
- Link Pruner: Removes old/weak edges automatically
- Relation Suggester: Finds new semantic connections between notes
- Dead-End Node Auto-Linker: Automatically creates out-connections for dead-end nodes with intelligent filtering
- Summary Digester: Compresses overcrowded nodes with many children
- ✅ Automatic Scheduler: Runs memory enzymes every hour in the background
- ✅ Metadata Field: Experimental fields support without schema changes
- ✅ Researcher Agent: Deep web research for low-confidence queries (JIT context optimization)
- Automatic triggering when retrieval confidence < threshold
- Manual research via
research_and_storeMCP tool - Hybrid approach: MCP tools (if available) or HTTP-based fallbacks (Google Search API, DuckDuckGo, Jina Reader)
- ✅ Local Jina Reader: Support for local Docker-based Jina Reader instance (fallback to cloud API)
- ✅ Unstructured PDF Extraction: Automatic PDF extraction using Unstructured (library or API)
🔄 Relationship to Original Implementation
This implementation was developed independently based on the research paper "A-Mem: Agentic Memory for LLM Agents". The original authors' production-ready system (A-mem-sys) was discovered after this implementation was completed.
Key Differences:
This implementation focuses on MCP Server integration for IDE environments (Cursor, VSCode), providing:
- Direct IDE integration via MCP protocol
- Explicit graph-based memory linking using NetworkX (DiGraph) with typed edges, reasoning, and weights
- File import with automatic chunking
- Memory reset and management tools
- Modern TUI benchmarking tool for Ollama model speed testing
The original A-mem-sys repository provides a pip-installable Python library with:
- Multiple LLM backend support (OpenAI, Ollama, OpenRouter, SGLang)
- Library-based integration for Python applications
- Comprehensive API for programmatic usage
- Implicit linking via ChromaDB embeddings (no explicit graph structure)
Technical Architecture Difference:
-
This implementation: Dual-storage architecture
- ChromaDB for vector similarity search
- Graph Backend Selection: NetworkX (default), RustworkX (3x-100x faster), or FalkorDB (experimental, not fully tested)
- Explicit typed relationships (with
relation_type,reasoning,weight) - Graph traversal for finding directly connected memories
- Enables complex queries like "find all memories related to X through type Y"
- Safe Graph Wrapper: Automatic edge case handling and data sanitization
-
Original implementation: Single-storage architecture
- ChromaDB as primary storage
- Implicit linking through embedding similarity
- Simpler architecture, less overhead
Both implementations are valid approaches to the same research paper, serving different use cases and integration scenarios.
🆕 New Features Overview
Type Classification
Every note is automatically classified into one of 6 types:
- rule: Imperative instructions ("Never X", "Always Y")
- procedure: Numbered steps or sequential instructions
- concept: Explanations of concepts, no commands
- tool: Describes functions, APIs, or utilities
- reference: Tables, comparison lists, cheatsheets
- integration: Describes connections between systems
Priority Scoring
Search results are ranked using on-the-fly priority calculation:
- Type Weight: Rules and procedures have higher priority
- Age Factor: Newer notes have higher priority
- Usage Count: Frequently accessed notes get boosted
- Edge Count: Well-connected notes are prioritized
Event Logging
All critical operations are logged to data/events.jsonl:
NOTE_CREATED: When a new note is createdRELATION_CREATED: When two notes are linkedMEMORY_EVOLVED: When an existing note is updatedLINKS_PRUNED: When old/weak links are removedRELATION_PRUNED: When a specific relation is pruned (with reason)NODE_PRUNED: When a zombie node is removedDUPLICATES_MERGED: When duplicate notes are mergedSELF_LOOPS_REMOVED: When self-loops are removedISOLATED_NODES_FOUND: When isolated nodes are detectedISOLATED_NODES_LINKED: When isolated nodes are automatically linkedKEYWORDS_NORMALIZED: When keywords are normalizedQUALITY_SCORES_CALCULATED: When quality scores are calculatedNOTES_VALIDATED: When notes are validatedTYPES_VALIDATED: When note types are validated and correctedNOTES_ARCHIVED: When old notes are archived (temporal cleanup)NOTES_DELETED: When old notes are deleted (temporal cleanup)GRAPH_HEALTH_CALCULATED: When graph health score is calculatedDEAD_END_NODES_FOUND: When dead-end nodes are detectedDEAD_END_NODES_AUTO_LINKED: When dead-end nodes are automatically linked with out-connectionsLOW_QUALITY_NOTES_REMOVED: When low-quality notes are removedCORRUPTED_NODES_REPAIRED: When corrupted nodes are repairedRELATIONS_SUGGESTED: When new connections are foundENZYME_SCHEDULER_RUN: When automatic maintenance runs
Memory Enzymes
Autonomous background processes that maintain graph health:
- Link Pruner: Removes edges older than 90 days or with weight < 0.3, and orphaned edges to missing/zombie nodes
- Zombie Node Remover: Automatically removes nodes without content (empty nodes)
- Duplicate Merger: Finds and merges duplicate notes (exact matches + semantic duplicates via embeddings)
- Edge Validator: Validates and fixes edges (adds missing reasoning, standardizes types, removes weak edges)
- Self-Loop Remover: Removes self-referential edges (nodes linking to themselves)
- Isolated Node Finder: Identifies nodes without any connections
- Isolated Node Linker: Automatically links isolated nodes to similar notes (similarity threshold: 0.70)
- Keyword Normalizer: Normalizes and cleans keywords (removes duplicates, corrects typos, limits to max 7 keywords)
- Quality Score Calculator: Calculates quality scores for notes (based on content, metadata, connections)
- Note Validator: Validates notes and corrects missing/invalid fields (summary, keywords, tags)
- Type Validator: Validates and corrects invalid note types using LLM-based classification
- Temporal Note Cleanup: Archives or deletes notes older than specified age (default: 365 days)
- Graph Health Score Calculator: Calculates overall graph health score (0.0-1.0) based on average note quality, connectivity, edge quality, and completeness
- Dead-End Node Detector: Identifies nodes with incoming but no outgoing edges (dead ends in knowledge flow)
- Dead-End Node Auto-Linker: Automatically creates out-connections for dead-end nodes using intelligent filtering:
- Combined Strategy: Ignores generic tags (reference, documentation, tool, etc.), prioritizes keywords, requires similarity check
- Smart Thresholds: 0.46 for strong signals (keywords or meaningful tags), 0.60 for weak signals (generic tags only), 0.58 for no signals
- Quality Control: Prevents low-quality connections by requiring meaningful semantic signals
- Low Quality Note Remover: Removes irrelevant notes (CAPTCHA pages, error pages, spam)
- Summary Refiner: Refines similar summaries to make them more specific and distinct
- Corrupted Node Repairer: Repairs corrupted nodes (missing fields, invalid data)
- Relation Suggester: Finds semantically similar notes (cosine similarity ≥ 0.75) with dead-end node prioritization
- Summary Digester: Compresses nodes with >8 children into compact summaries
Automatic Scheduler
The system automatically runs memory enzymes every hour:
- Runs in background without blocking MCP operations
- Executes 19+ maintenance operations in optimized sequence
- Logs all maintenance activities with detailed metrics
- Gracefully handles errors and continues running
- Comprehensive Results: Returns detailed statistics for all operations (pruned links, merged duplicates, validated notes, quality scores, graph health score, dead-end nodes, etc.)
Researcher Agent
Deep web research for low-confidence queries with JIT context optimization:
- Automatic Triggering: Activates when retrieval confidence < threshold (default: 0.5)
- Manual Research: Available via
research_and_storeMCP tool - Hybrid Approach: Uses MCP tools (if available) or HTTP-based fallbacks
- Web Search: Google Search API (primary) or DuckDuckGo HTTP (fallback)
- Content Extraction: Jina Reader (local Docker or cloud API) or Readability fallback
- PDF Support: Automatic PDF extraction using Unstructured (library or API)
- Automatic Note Creation: Research findings are automatically stored as atomic notes with metadata, keywords, and tags
📋 Installation
1. Install Dependencies
pip install -r requirements.txt
Graph Backend Selection
A-MEM supports three graph backends, selectable via GRAPH_BACKEND environment variable:
NetworkX (Default):
- ✅ Included by default (no extra installation)
- ✅ Cross-platform (Windows, Linux, macOS)
- ✅ Good for small to medium graphs (<10k nodes)
RustworkX (Recommended for Performance):
- ⚡ 3x-100x faster than NetworkX
- ✅ Windows-compatible
- ✅ Install with:
pip install rustworkx - ✅ Set
GRAPH_BACKEND=rustworkxin.env
FalkorDB (Experimental - Not Fully Integrated/Tested):
- ⚠️ Proof-of-Concept Status - Funktional, aber noch nicht vollständig integriert und getestet
- 💾 Persistent storage (survives restarts)
- ⚠️ Nicht empfohlen für Production - Siehe
docs/FALKORDB_POC_README.mdfür Details - Linux/macOS: Install with
pip install falkordblite, setGRAPH_BACKEND=falkordb - Windows: Install with
pip install falkordb redis, requires Redis with FalkorDB module (seedocs/WINDOWS_FALKORDB_SETUP.md) - ⚠️ Bekannte Einschränkungen: Memory Enzymes nutzen noch direkte
graph.graphZugriffe, Migration-Tool fehlt, Performance noch nicht getestet
Safe Graph Wrapper:
- 🛡️ Automatic edge case handling and dat
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
113.5kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
109.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
90.9kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
78.9kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
