MemoryGraph
A graph-based MCP server that provides AI coding agents with persistent memory to store patterns, track complex relationships, and retrieve knowledge across sessions. It leverages graph structures to handle temporal queries and relational paths that
What is MemoryGraph?
MemoryGraph is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to graph-based mcp server that provides ai coding agents with persistent memory to store patterns, track complex relationships, and retrieve knowledge across sessions. it leverages graph structures to ha...
A graph-based MCP server that provides AI coding agents with persistent memory to store patterns, track complex relationships, and retrieve knowledge across sessions. It leverages graph structures to handle temporal queries and relational paths that
This server falls under the Knowledge & Memory and Coding Agents categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A graph-based MCP server that provides AI coding agents with
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx memorygraphConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MemoryGraph
MemoryGraph is a graph-based MCP server that gives AI coding agents persistent, structured memory across sessions using explicit node-and-edge relationships. Unlike flat key-value stores, it supports seven relationship categories, bi-temporal tracking, and fuzzy contextual search, making it possible to recall not just what was stored but how pieces of knowledge relate to each other. Developers use it to preserve architectural decisions, coding patterns, and project context so AI assistants can pick up exactly where they left off.
Prerequisites
- Python 3.10 or higher (pipx recommended for isolation)
- An MCP-compatible client such as Claude Desktop or Claude Code CLI
- Optional: Neo4j or FalkorDB for graph-native backends
- Optional: MEMORYGRAPH_API_KEY for the hosted cloud backend
Install memorygraphMCP
Install using pipx for the recommended isolated environment. The default backend uses SQLite and requires no additional database setup.
pipx install memorygraphMCP
# For Neo4j backend support:
# pipx install "memorygraphMCP[neo4j]"
# For FalkorDB backend:
# pipx install "memorygraphMCP[falkordb]"Add to Claude Desktop or Claude Code
Register the server with your MCP client. The default profile uses the local SQLite backend and needs no environment variables.
# Claude Code CLI (recommended):
claude mcp add --scope user memorygraph -- memorygraph
# With extended tools profile (adds statistics and advanced relationship queries):
claude mcp add --scope user memorygraph -- memorygraph --profile extendedOptional: configure the cloud backend
To sync memory across machines, obtain an API key from memorygraph.dev and pass it via environment variable.
claude mcp add --scope user memorygraph \
--env MEMORYGRAPH_API_KEY=mg_your_key_here \
-- memorygraph --backend cloudOptional: configure Neo4j backend
If you prefer a native graph database backend, point MemoryGraph at a running Neo4j instance using the three Neo4j environment variables.
export MEMORY_NEO4J_URI="bolt://localhost:7687"
export MEMORY_NEO4J_USER="neo4j"
export MEMORY_NEO4J_PASSWORD="your_password"
memorgraph --backend neo4jVerify the server is running
After adding the server, restart your MCP client. Ask the AI to store a test memory to confirm the connection is live.
MemoryGraph Examples
Client configuration
Claude Desktop configuration for MemoryGraph using the default SQLite backend with extended tools.
{
"mcpServers": {
"memorygraph": {
"command": "memorygraph",
"args": ["--profile", "extended"]
}
}
}Prompts to try
Example prompts that demonstrate storing, recalling, and relating knowledge with MemoryGraph.
- "Remember that we use bcrypt for password hashing in this project and tag it as security, authentication"
- "What coding patterns have you stored about authentication?"
- "Create a relationship between the bcrypt pattern and the user registration module — it solves the password storage problem"
- "Give me a session briefing — what do you know about this codebase?"
- "Show me all memories tagged with 'architecture' created this week"Troubleshooting MemoryGraph
memorygraph command not found after installation
Ensure pipx's bin directory is in your PATH. Run 'pipx ensurepath' and restart your terminal. Alternatively, install with 'pip install --user memorygraphMCP' and check ~/.local/bin is in PATH.
Neo4j connection refused or authentication failed
Verify Neo4j is running ('neo4j status') and that MEMORY_NEO4J_URI, MEMORY_NEO4J_USER, and MEMORY_NEO4J_PASSWORD are all set correctly. The default bolt port is 7687.
Memories from previous sessions are not appearing
Confirm you are using the same backend and data directory across sessions. For the default SQLite backend, the database file lives in the memorygraphMCP data directory — do not delete it between sessions. For cloud backend, verify your MEMORYGRAPH_API_KEY is consistent.
Frequently Asked Questions about MemoryGraph
What is MemoryGraph?
MemoryGraph is a Model Context Protocol (MCP) server that graph-based mcp server that provides ai coding agents with persistent memory to store patterns, track complex relationships, and retrieve knowledge across sessions. it leverages graph structures to handle temporal queries and relational paths that It connects AI assistants to external tools and data sources through a standardized interface.
How do I install MemoryGraph?
Follow the installation instructions on the MemoryGraph GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with MemoryGraph?
MemoryGraph works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MemoryGraph free to use?
Yes, MemoryGraph is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
MemoryGraph Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to MemoryGraph? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
Browse More Knowledge & Memory MCP Servers
Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up MemoryGraph in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use MemoryGraph?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.