better-memory
Enhanced MCP server for enabling memory for Claude through a knowledge graph with temporal tracking, confidence scores, and entity management
claude mcp add --transport stdio sockeye44-better-memory-mcp python server.py \ --env SEMAPHORE_ENV="production" \ --env PYTHONUNBUFFERED="1" \ --env MEMORY_MODEL_PATH="path/to/modern_colBERT_or_model"
How to use
Better Memory MCP Server provides a persistent knowledge graph memory system designed to help Claude maintain and organize knowledge across conversations. It supports entities, relations, and rich observations with timestamps and confidence scores, plus advanced features such as semantic search via ModernColBERT, entity archiving, merging, and a recent changes view. The server exposes a suite of tools for manipulating the graph: create_entities and create_relations to build the graph, add_observations to enrich entities with time-stamped facts, and read_graph or open_nodes to inspect data. Semantic search lets you retrieve relevant entities by meaning rather than exact keyword matching, while backfilling ensures existing memories become indexable for faster semantic retrieval on first use. You can archive or unarchive entities to soft-delete and restore data without losing your history, and you can merge duplicate entities to consolidate observations and relations. For day-to-day usage, you’ll typically start the server locally, then issue API-like calls to perform creation, updates, and queries against the memory graph.
How to install
Prerequisites:
- Python 3.8 or newer
- Optional: Node.js for building/using accompanying front-end tooling
- Git
Quick setup (recommended):
-
Clone the repository and install dependencies: git clone https://github.com/sockeye44/better-memory-mcp cd better-memory-mcp ./setup.sh
The setup script will:
- Verify Python 3.8+ is installed
- Create a Python virtual environment
- Install Python dependencies (including PyTorch and ModernColBERT)
- Pre-download neural models for semantic search
- Install Node.js dependencies and build the TypeScript code
-
Run the server: python server.py
Manual setup (if the script fails):
-
Install Python dependencies: pip install -r requirements.txt
-
Install Node.js dependencies (optional for frontend/tools): npm install
-
Build TypeScript (optional for frontend/tools): npm run build
Note: Semantic search requires Python 3.8+ and PyTorch. If these are not available, the server will still function with keyword-based search only.
Additional notes
Tips and caveats:
- Semantic search relies on ModernColBERT embeddings; ensure the required models are downloaded and accessible at runtime. If the model isn’t available, the system will gracefully fall back to keyword search.
- Observations are atomic; store one fact per observation to simplify merging, archiving, and deletion operations.
- Use archive_entity and unarchive_entity to soft-delete or restore entities without losing historical data.
- When adding observations, you can assign per-observation confidence scores (0-1) to express certainty.
- The get_recent_changes tool lets you filter by a time window (hours) to monitor recent activity across entities, relations, and observations.
- If you modify underlying data structures, consider running read_graph with detailLevel set to full to verify consistency across entities and relations.
- Backfill: On first use, semantic indexing may backfill memories automatically; ensure the system has sufficient compute resources for indexing large memories.
Related MCP Servers
PPTAgent
An Agentic Framework for Reflective PowerPoint Generation
MCP-Bridge
A middleware to provide an openAI compatible endpoint that can call MCP tools
mcp-pinecone
Model Context Protocol server to allow for reading and writing from Pinecone. Rudimentary RAG
Memory-Plus
🧠 𝑴𝒆𝒎𝒐𝒓𝒚-𝑷𝒍𝒖𝒔 is a lightweight, local RAG memory store for MCP agents. Easily record, retrieve, update, delete, and visualize persistent "memories" across sessions—perfect for developers working with multiple AI coders (like Windsurf, Cursor, or Copilot) or anyone who wants their AI to actually remember them.
pfsense
pfSense MCP Server enables security administrators to manage their pfSense firewalls using natural language through AI assistants like Claude Desktop. Simply ask "Show me blocked IPs" or "Run a PCI compliance check" instead of navigating complex interfaces. Supports REST/XML-RPC/SSH connections, and includes built-in complian
symfony
A Symfony package designed for building secure servers based on the Model Context Protocol, utilizing Server-Sent Events (SSE) and/or StreamableHTTP for real-time communication. It offers a scalable tool system tailored for enterprise-grade applications.