Graphiti MCP Server
OfficialClick 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., "@Graphiti MCP ServerAdd a new node for SpaceX and connect it to Elon Musk"
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.
Graphiti MCP Server 🧠
🌟 A powerful knowledge graph server for AI agents, built with Neo4j and integrated with Model Context Protocol (MCP).
🚀 Features
🔄 Dynamic knowledge graph management with Neo4j
🤖 Seamless integration with OpenAI models
🔌 MCP (Model Context Protocol) support
🐳 Docker-ready deployment
🎯 Custom entity extraction capabilities
🔍 Advanced semantic search functionality
Related MCP server: Logseq MCP Tools
🛠️ Installation
Prerequisites
Docker and Docker Compose
Python 3.10 or higher
OpenAI API key
Minimum 4GB RAM (recommended 8GB)
2GB free disk space
Quick Start 🚀
Clone the repository:
git clone https://github.com/gifflet/graphiti-mcp-server.git
cd graphiti-mcp-serverSet up environment variables:
cp .env.sample .envEdit
.envwith your configuration:
# Required for LLM operations
OPENAI_API_KEY=your_openai_api_key_here
MODEL_NAME=gpt-4.1-mini
# Optional: Custom OpenAI endpoint (e.g., for proxies)
# OPENAI_BASE_URL=https://api.openai.com/v1
# Neo4j Configuration (defaults work with Docker)
NEO4J_URI=bolt://neo4j:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=demodemoStart the services:
docker compose up -dVerify installation:
# Check if services are running
docker compose ps
# Check logs
docker compose logs graphiti-mcpAlternative: Environment Variables
You can run with environment variables directly:
OPENAI_API_KEY=your_key MODEL_NAME=gpt-4.1-mini docker compose up🔧 Configuration
Service Ports 🌐
Service | Port | Purpose |
Neo4j Browser | 7474 | Web interface for graph visualization |
Neo4j Bolt | 7687 | Database connection |
Graphiti MCP | 8000 | MCP server endpoint |
Environment Variables 🔧
OpenAI Configuration
Variable | Required | Default | Description |
| ✅ | - | Your OpenAI API key |
| ❌ | - | Custom OpenAI API endpoint (consumed by OpenAI SDK) |
| ❌ |
| Main LLM model to use |
| ❌ |
| Small LLM model for lighter tasks |
| ❌ |
| LLM temperature (0.0-2.0) |
| ❌ |
| Embedding model |
Neo4j Configuration
Variable | Required | Default | Description |
| ❌ |
| Neo4j connection URI |
| ❌ |
| Neo4j username |
| ❌ |
| Neo4j password |
Server Configuration
Variable | Required | Default | Description |
| ❌ | - | MCP server host binding |
| ❌ |
| Concurrent operation limit for LLM calls |
Azure OpenAI Configuration (Optional)
For Azure OpenAI deployments, use these environment variables instead of the standard OpenAI configuration:
Variable | Required | Default | Description |
| ✅* | - | Azure OpenAI endpoint URL |
| ✅* | - | Azure OpenAI API version |
| ✅* | - | Azure OpenAI deployment name |
| ❌ |
| Use Azure managed identity for auth |
| ❌ | - | Separate endpoint for embeddings |
| ❌ | - | API version for embeddings |
| ❌ | - | Deployment name for embeddings |
| ❌ | - | Separate API key for embeddings |
* Required when using Azure OpenAI
Notes:
OPENAI_BASE_URLis consumed directly by the OpenAI Python SDK, useful for proxy configurations or custom endpointsSEMAPHORE_LIMITcontrols concurrent LLM API calls - decrease if you encounter rate limits, increase for higher throughputAzure configuration is an alternative to standard OpenAI - don't mix both configurations
Neo4j Settings 🗄️
Default configuration for Neo4j:
Username:
neo4jPassword:
demodemoURI:
bolt://neo4j:7687(within Docker network)Memory settings optimized for development
Docker Environment Variables 🐳
You can run with environment variables directly:
OPENAI_API_KEY=your_key MODEL_NAME=gpt-4.1-mini docker compose upFor Azure OpenAI:
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com \
AZURE_OPENAI_API_VERSION=2024-02-01 \
AZURE_OPENAI_DEPLOYMENT_NAME=your-deployment \
OPENAI_API_KEY=your_key \
docker compose up🔌 Integration
Cursor IDE Integration 🖥️
Configure Cursor MCP settings:
{
"mcpServers": {
"Graphiti": {
"command": "uv",
"args": ["run", "graphiti_mcp_server.py"],
"env": {
"OPENAI_API_KEY": "your_key_here"
}
}
}
}For Docker-based setup:
{
"mcpServers": {
"Graphiti": {
"url": "http://localhost:8000/sse"
}
}
}Add Graphiti rules to Cursor's User Rules (see
graphiti_cursor_rules.mdc)Start an agent session in Cursor
Other MCP Clients
The server supports standard MCP transports:
SSE (Server-Sent Events):
http://localhost:8000/sseWebSocket:
ws://localhost:8000/wsStdio: Direct process communication
💻 Development
Local Development Setup
Install dependencies:
# Using uv (recommended)
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync
# Or using pip
pip install -r requirements.txtStart Neo4j locally:
docker run -d \
--name neo4j-dev \
-p 7474:7474 -p 7687:7687 \
-e NEO4J_AUTH=neo4j/demodemo \
neo4j:5.26.0Run the server:
# Set environment variables
export OPENAI_API_KEY=your_key
export NEO4J_URI=bolt://localhost:7687
# Run with stdio transport
uv run graphiti_mcp_server.py
# Or with SSE transport
uv run graphiti_mcp_server.py --transport sse --use-custom-entitiesTesting
# Run basic connectivity test
curl http://localhost:8000/health
# Test MCP endpoint
curl http://localhost:8000/sse🔍 Troubleshooting
Common Issues
🐳 Docker Issues
# Clean up and restart
docker compose down -v
docker compose up --build
# Check disk space
docker system dfLogs and Debugging
# View all logs
docker compose logs -f
# View specific service logs
docker compose logs -f graphiti-mcp
docker compose logs -f neo4j
# Enable debug logging
docker compose up -e LOG_LEVEL=DEBUGPerformance Issues
Memory: Increase Neo4j heap size in
docker-compose.ymlStorage: Monitor Neo4j data volume usage
Network: Check for firewall blocking ports 7474, 7687, 8000
🏗️ Architecture
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ MCP Client │ │ Graphiti MCP │ │ Neo4j │
│ (Cursor) │◄──►│ Server │◄──►│ Database │
│ │ │ (Port 8000) │ │ (Port 7687) │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│
▼
┌──────────────────┐
│ OpenAI API │
│ (LLM Client) │
└──────────────────┘Components
Neo4j Database: Graph storage and querying
Graphiti MCP Server: API layer and LLM operations
OpenAI Integration: Entity extraction and semantic processing
MCP Protocol: Standardized AI agent communication
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
Neo4j team for the amazing graph database
OpenAI for their powerful LLM models
MCP community for the protocol specification
Graphiti Core for the knowledge graph framework
Need help? Open an issue or check our troubleshooting guide above.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gifflet/graphiti-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server