Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Enhanced Knowledge Graph Memory Serverfind all project notes tagged 'research' from last month"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Memory MCP Server
An enhanced fork of the official Model Context Protocol memory server with advanced features for hierarchical nesting, intelligent compression, semantic search, graph algorithms, archiving, advanced search, and multi-format import/export.
Enterprise-grade knowledge graph with 59 tools, hierarchical organization, semantic search with embeddings, graph traversal algorithms, duplicate detection, smart archiving, and sophisticated search capabilities for long-term memory management.
Table of Contents
Features
Core Memory Capabilities
Knowledge Graph Storage: Entity-Relation-Observation model for structured memory
Persistent Memory: Information persists across chat sessions with JSONL or SQLite storage
Dual Storage Backends: JSONL (human-readable) or SQLite with better-sqlite3 (3-10x faster, FTS5 search)
Full CRUD Operations: Create, read, update, delete entities and relations
Flexible Search: Text-based, fuzzy, boolean, semantic, and TF-IDF ranked search
Advanced Features
Category | Tools | Description |
Hierarchical Nesting | 9 | Parent-child relationships for organizing tree structures |
Graph Algorithms | 4 | Path finding, connected components, centrality metrics |
Intelligent Search | 3 | Hybrid multi-layer search with query analysis and reflection |
Semantic Search | 3 | Embedding-based similarity search with OpenAI or local models |
Memory Compression | 4 | Intelligent duplicate detection and merging with similarity scoring |
Advanced Search | 7 | TF-IDF ranking, boolean queries, fuzzy matching, auto-select |
Observation Normalization | 1 | Coreference resolution and temporal anchoring |
Tag Management | 11 | Tags, aliases, bulk operations, importance scores |
Saved Searches | 5 | Store and execute frequent queries |
Import/Export | 2 | 7 export formats with brotli compression, 3 import formats |
Graph Analytics | 2 | Statistics, validation, integrity checks |
Comparison with Official Memory Server
Feature | Official | Enhanced (This Fork) |
Entity/Relation/Observation Management | ✅ | ✅ |
Basic Search | ✅ | ✅ |
Hierarchical Nesting | ❌ | ✅ Parent-child trees |
Graph Algorithms | ❌ | ✅ Path finding, centrality |
Semantic Search | ❌ | ✅ Embedding-based similarity |
Memory Compression | ❌ | ✅ Duplicate detection |
Brotli Compression | ❌ | ✅ Backups, exports, responses |
Smart Archiving | ❌ | ✅ Criteria-based |
Advanced Search | ❌ | ✅ TF-IDF + Boolean + Fuzzy |
SQLite Backend | ❌ | ✅ better-sqlite3 (3-10x faster) |
Full-Text Search | ❌ | ✅ FTS5 with BM25 ranking |
Timestamps | ❌ | ✅ createdAt + lastModified |
Import/Export Formats | ❌ | ✅ 7 export / 3 import |
Input Validation | ❌ | ✅ Zod schemas |
Backup & Restore | ❌ | ✅ Compressed snapshots |
Intelligent Search | ❌ | ✅ Hybrid + Query Analysis + Reflection |
Observation Normalization | ❌ | ✅ Coreference resolution + temporal anchoring |
Total Tools | 11 | 59 |
Code Structure | Monolithic | Modular (77 files) |
Quick Start
1. Install from NPM
Or use with npx (no installation required):
2. Configure Claude Desktop
Add to claude_desktop_config.json:
Using NPM Global Install:
Using NPX:
3. Restart Claude Desktop
Restart Claude Desktop to load the enhanced memory server.
4. Start Using
Tell Claude:
Installation
Local Build
Claude Desktop Configuration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
VS Code
Add to .vscode/mcp.json:
Core Concepts
Entities
Primary nodes in the knowledge graph.
Relations
Directed connections between entities.
Observations
Discrete facts about entities. Each observation should be atomic and independently manageable.
API Reference
Complete Tool List (59 Tools)
Entity Operations (4 tools)
Tool | Description |
| Create multiple new entities |
| Remove entities and their relations |
| Read entire knowledge graph |
| Retrieve specific nodes by name |
Relation Operations (2 tools)
Tool | Description |
| Create relations between entities |
| Remove specific relations |
Observation Management (3 tools)
Tool | Description |
| Add observations to entities |
| Remove specific observations |
| Normalize observations (resolve pronouns, anchor dates) |
Search (7 tools)
Tool | Description |
| Search with filters (tags, importance) |
| Filter by date range |
| TF-IDF relevance ranking |
| Boolean queries (AND/OR/NOT) |
| Typo-tolerant search |
| "Did you mean?" suggestions |
| Auto-select best search method |
Intelligent Search (3 tools)
Tool | Description |
| Multi-layer search combining semantic, lexical, and symbolic signals |
| Extract entities, temporal references, and classify query complexity |
| Reflection-based iterative search until results meet adequacy threshold |
Semantic Search (3 tools)
Tool | Description |
| Search by semantic similarity using embeddings |
| Find entities similar to a reference entity |
| Build or rebuild the semantic search index |
Saved Searches (5 tools)
Tool | Description |
| Save search query for reuse |
| Execute a saved search |
| List all saved searches |
| Delete a saved search |
| Update saved search parameters |
Tag Management (6 tools)
Tool | Description |
| Add tags to an entity |
| Remove tags from an entity |
| Set entity importance (0-10) |
| Bulk tag operation |
| Replace tag globally |
| Merge two tags into one |
Tag Aliases (5 tools)
Tool | Description |
| Create tag synonym |
| List all aliases |
| Remove an alias |
| Get aliases for canonical tag |
| Resolve alias to canonical form |
Hierarchical Nesting (9 tools)
Tool | Description |
| Set/remove parent relationship |
| Get immediate children |
| Get parent entity |
| Get all ancestors (parent chain) |
| Get all descendants (recursive) |
| Get entity + descendants with relations |
| Get entities with no parent |
| Get depth in hierarchy |
| Move entity to new parent |
Graph Algorithms (4 tools)
Tool | Description |
| Shortest path between entities (BFS) |
| All paths with max depth limit |
| Detect isolated subgraphs |
| Calculate centrality metrics (degree, betweenness, PageRank) |
Graph Analytics (2 tools)
Tool | Description |
| Comprehensive graph statistics |
| Validate graph integrity |
Compression & Archiving (4 tools)
Tool | Description |
| Find similar entities by threshold |
| Merge multiple entities into one |
| Auto compression with dry-run |
| Archive by age, importance, or tags |
Import & Export (2 tools)
Tool | Description |
| Export in 7 formats (JSON, CSV, GraphML, GEXF, DOT, Markdown, Mermaid) with compression |
| Import from JSON/CSV/GraphML with merge strategies |
Configuration
Environment Variables
Variable | Description | Default |
| Path to storage file |
|
| Storage backend: |
|
| Embedding provider: |
|
| OpenAI API key (required if provider is | - |
| Embedding model to use |
|
| Auto-index entities on creation |
|
Storage Backends
Feature | JSONL (Default) | SQLite (better-sqlite3) |
Format | Human-readable text | Native binary database |
Transactions | Basic | Full ACID with WAL mode |
Full-Text Search | Basic | FTS5 with BM25 ranking |
Performance | Good | 3-10x faster |
Concurrency | Single-threaded | Thread-safe with async-mutex |
Best For | Small graphs, debugging | Large graphs (10k+ entities) |
Using SQLite:
Storage Files
When you set MEMORY_FILE_PATH, the server automatically creates related files:
Migration Tool
Convert between JSONL and SQLite formats:
Development
Prerequisites
Node.js 18+
npm 9+
TypeScript 5.6+
Build Commands
Architecture
Project Structure
Dependencies
Production:
@modelcontextprotocol/sdk: ^1.21.1better-sqlite3: ^11.7.0zod: ^4.1.13async-mutex: ^0.5.0@danielsimonjr/workerpool: ^10.0.1
Development:
typescript: ^5.6.2vitest: ^4.0.13@vitest/coverage-v8: ^4.0.13@types/better-sqlite3: ^7.6.12
Documentation
Comprehensive documentation in docs/:
Architecture
API.md - Complete API documentation for all 59 tools
ARCHITECTURE.md - Technical architecture and system design
COMPONENTS.md - Component breakdown and responsibilities
OVERVIEW.md - High-level project overview
DEPENDENCY_GRAPH.md - Module dependencies
User Guides
HIERARCHY.md - Parent-child relationships (9 tools)
COMPRESSION.md - Duplicate detection and merging
ARCHIVING.md - Memory lifecycle and archiving
QUERY_LANGUAGE.md - Boolean search syntax
Development
WORKFLOW.md - Development procedures
MIGRATION.md - Version upgrade guide
Contributing
We welcome contributions!
See:
CONTRIBUTING.md - Contribution guidelines
CODE_OF_CONDUCT.md - Community standards
Ways to Help:
Report bugs
Request features
Submit pull requests
Improve documentation
Add tests
Changelog
All notable changes are documented in CHANGELOG.md.
Current version: v10.1.0 - View full changelog
Recent highlights:
v10.1.0: Documentation updates, 5 missing Phase 12 test files, architecture docs refresh
v10.0.0: Phase 12 Performance Optimization - BM25 search, parallel execution, query plan caching, embedding cache, incremental indexing
v9.8.3: SQLite storage support fix, JSON-RPC communication fix
License
MIT License - see LICENSE
Acknowledgments
Original Project
Enhanced fork of Model Context Protocol memory server by Anthropic.
Developer
Major Enhancements
Hierarchical nesting with parent-child relationships
Graph algorithms: path finding, centrality, connected components
Semantic search with embedding-based similarity
Brotli compression for backups, exports, and responses
Memory compression with intelligent duplicate detection
Smart archiving with criteria-based filtering
Advanced search: TF-IDF, boolean, and fuzzy matching
Multi-format import/export with merge strategies
SQLite backend with better-sqlite3 (3-10x faster)
Transaction support with ACID guarantees
Comprehensive test suite (2800+ tests, 97 test files)
Repository: https://github.com/danielsimonjr/memory-mcp NPM: https://www.npmjs.com/package/@danielsimonjr/memory-mcp Issues: https://github.com/danielsimonjr/memory-mcp/issues