Knowledge Graph MCP Server
The Graphiti MCP Server is an experimental implementation that exposes Graphiti’s key functionality through the Model Context Protocol (MCP). This enables AI assistants like Claude Desktop and Cursor to interact with Graphiti’s knowledge graph capabilities, providing persistent memory and contextual awareness.
The Graphiti MCP Server bridges AI assistants with Graphiti’s temporally-aware knowledge graphs, allowing assistants to maintain persistent memory across conversations and sessions. By integrating through MCP, assistants can automatically store, retrieve, and reason with information from their interactions.
Key Features
The MCP server exposes Graphiti’s core capabilities:
- Episode Management: Add, retrieve, and delete episodes (text, messages, or JSON data)
- Entity Management: Search and manage entity nodes and relationships
- Search Capabilities: Semantic and hybrid search for facts and node summaries
- Group Management: Organize data with group_id filtering for multi-user scenarios
- Graph Maintenance: Clear graphs and rebuild indices as needed
Quick Start with OpenAI
This quick start assumes you have OpenAI API access. For other LLM providers and detailed configuration options, see the MCP Server README.
Prerequisites
Before getting started, ensure you have:
- Python 3.10+ installed on your system
- Neo4j database (version 5.26 or later) running locally or accessible remotely
- OpenAI API key for LLM operations and embeddings
Installation
- Clone the Graphiti repository:
- Navigate to the MCP server directory and install dependencies:
Configuration
Set up your environment variables in a .env
file:
Running the Server
Start the MCP server:
For development with custom options:
MCP Client Integration
Claude Desktop
Configure Claude Desktop to connect via the stdio transport:
Cursor IDE
For Cursor, use the SSE transport configuration:
Available Tools
Once connected, AI assistants have access to these Graphiti tools:
add_memory
- Store episodes and interactions in the knowledge graphsearch_facts
- Find relevant facts and relationshipssearch_nodes
- Search for entity summaries and informationget_episodes
- Retrieve recent episodes for contextdelete_episode
- Remove episodes from the graphclear_graph
- Reset the knowledge graph entirely
Docker Deployment
For containerized deployment, use the provided Docker Compose setup:
This starts both Neo4j and the MCP server with SSE transport enabled.
Next Steps
For comprehensive configuration options, advanced features, and troubleshooting:
- Full Documentation: See the complete MCP Server README
- Integration Examples: Explore client-specific setup guides for Claude Desktop and Cursor
- Custom Entity Types: Configure domain-specific entity extraction
- Multi-tenant Setup: Use group IDs for organizing data across different contexts
The MCP server is experimental and under active development. Features and APIs may change between releases.