Overview
The MCP server exposes Graphiti’s core functionality through two transport modes:- HTTP transport (default): Accessible at
http://localhost:8000/mcp/for broad client compatibility - stdio transport: For clients that only support standard input/output
- Episode management (add, retrieve, delete)
- Entity and relationship operations
- Semantic and hybrid search
- Group-based data organization
- Graph maintenance operations
Quick Start
Docker Deployment (Recommended)
The simplest way to run the MCP server is using Docker with the bundled FalkorDB database:- MCP server on
http://localhost:8000/mcp/ - FalkorDB on
localhost:6379 - FalkorDB web UI on
http://localhost:3000
Local Development
For development or customization:Configuration
The server supports three configuration methods (in order of precedence):- Command-line arguments
- Environment variables
config.yamlfile
Database Configuration
FalkorDB (Default)
FalkorDB is a Redis-based graph database bundled in a single container:Neo4j
For production deployments:LLM Provider Configuration
The server supports multiple LLM providers:Ollama for Local LLM
Run LLMs locally using Ollama:Environment Variables
Theconfig.yaml supports environment variable expansion:
OPENAI_API_KEY- OpenAI API keyANTHROPIC_API_KEY- Anthropic API keyGOOGLE_API_KEY- Google Gemini API keyGROQ_API_KEY- Groq API keyAZURE_OPENAI_API_KEY- Azure OpenAI keySEMAPHORE_LIMIT- Concurrency control (see Performance Tuning)
Command-Line Arguments
Entity Types
The MCP server includes built-in entity types for structured knowledge extraction:- Preference: User preferences, choices, opinions
- Requirement: Specific needs or functionality requirements
- Procedure: Standard operating procedures
- Location: Physical or virtual places
- Event: Time-bound activities
- Organization: Companies, institutions, groups
- Document: Information content (books, articles, videos)
- Topic: Subject of conversation (fallback)
- Object: Physical items, tools, devices (fallback)
config.yaml:
MCP Client Integration
Cursor IDE
-
Start the MCP server:
-
Configure Cursor (
.cursor/mcp.json): -
Add Graphiti rules to Cursor’s User Rules (see
cursor_rules.md)
Claude Desktop (via mcp-remote)
Claude Desktop requires themcp-remote gateway for HTTP transport:
-
Start the MCP server:
-
Install
mcp-remote(optional,npxwill fetch it): -
Configure Claude Desktop (
claude_desktop_config.json): - Restart Claude Desktop
stdio Transport
For clients supporting only stdio transport:Available Tools
The MCP server exposes these tools to AI assistants:Episode Management
add_episode- Add text, JSON, or message episodes to the graphget_episodes- Retrieve recent episodes for a groupdelete_episode- Remove an episode by UUID
Entity & Relationship Operations
get_entity_edge- Get an entity edge by UUIDdelete_entity_edge- Delete an entity edgesearch_nodes- Search for relevant node summariessearch_facts- Search for relevant facts (entity relationships)
Graph Maintenance
clear_graph- Clear all data and rebuild indicesget_status- Check server and database connection status
Working with JSON Data
Ingest structured JSON data for entity extraction:Deployment
Production Deployment with Neo4j
Health Checks
Monitor the MCP server:Telemetry
The MCP server uses Graphiti core’s telemetry. To disable:.env:
- Anonymous usage statistics
- System information
- Configuration choices (LLM provider, database type)
Troubleshooting
Connection Issues
Problem: MCP client cannot connect to server Solutions:- Verify server is running:
curl http://localhost:8000/health - Check firewall allows port 8000
- For Docker: ensure containers are on same network
Database Connection Errors
Problem: Cannot connect to Neo4j/FalkorDB Solutions:- Verify database is running
- Check credentials in config or environment
- For Neo4j: ensure Bolt port 7687 is accessible
- For FalkorDB: ensure Redis port 6379 is accessible
Rate Limit Errors
Problem: 429 errors from LLM provider Solution: LowerSEMAPHORE_LIMIT (see Performance Tuning)