Graphiti MCP Server logo

Graphiti MCP Server

Community
gifflet

Graphiti MCP Server

Publishergifflet
Repositorygraphiti-mcp-server
LanguagePython
Forks
18
Stars
144
Available tools
0
Transport typestdio, streamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Graphiti MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    144 stars and 18 forks from the linked repository.

Graphiti MCP Server 🧠

Python Version License Docker

🌟 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

🛠️ 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 🚀

  1. Clone the repository:
bash
git clone https://github.com/gifflet/graphiti-mcp-server.git
cd graphiti-mcp-server
  1. Set up environment variables:
bash
cp .env.sample .env
  1. Edit .env with your configuration:
bash
# 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=demodemo
  1. Start the services:
bash
docker compose up -d
  1. Verify installation:
bash
# Check if services are running
docker compose ps

# Check logs
docker compose logs graphiti-mcp

Alternative: Environment Variables

You can run with environment variables directly:

bash
OPENAI_API_KEY=your_key MODEL_NAME=gpt-4.1-mini docker compose up

🔧 Configuration

Service Ports 🌐

ServicePortPurpose
Neo4j Browser7474Web interface for graph visualization
Neo4j Bolt7687Database connection
Graphiti MCP8000MCP server endpoint

Environment Variables 🔧

OpenAI Configuration

VariableRequiredDefaultDescription
OPENAI_API_KEY✅-Your OpenAI API key
OPENAI_BASE_URL❌-Custom OpenAI API endpoint (consumed by OpenAI SDK)
MODEL_NAME❌gpt-4.1-miniMain LLM model to use
SMALL_MODEL_NAME❌gpt-4.1-nanoSmall LLM model for lighter tasks
LLM_TEMPERATURE❌0.0LLM temperature (0.0-2.0)
EMBEDDER_MODEL_NAME❌text-embedding-3-smallEmbedding model

Neo4j Configuration

VariableRequiredDefaultDescription
NEO4J_URI❌bolt://neo4j:7687Neo4j connection URI
NEO4J_USER❌neo4jNeo4j username
NEO4J_PASSWORD❌demodemoNeo4j password

Server Configuration

VariableRequiredDefaultDescription
MCP_SERVER_HOST❌-MCP server host binding
SEMAPHORE_LIMIT❌10Concurrent operation limit for LLM calls

Azure OpenAI Configuration (Optional)

For Azure OpenAI deployments, use these environment variables instead of the standard OpenAI configuration:

VariableRequiredDefaultDescription
AZURE_OPENAI_ENDPOINT✅*-Azure OpenAI endpoint URL
AZURE_OPENAI_API_VERSION✅*-Azure OpenAI API version
AZURE_OPENAI_DEPLOYMENT_NAME✅*-Azure OpenAI deployment name
AZURE_OPENAI_USE_MANAGED_IDENTITY❌falseUse Azure managed identity for auth
AZURE_OPENAI_EMBEDDING_ENDPOINT❌-Separate endpoint for embeddings
AZURE_OPENAI_EMBEDDING_API_VERSION❌-API version for embeddings
AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME❌-Deployment name for embeddings
AZURE_OPENAI_EMBEDDING_API_KEY❌-Separate API key for embeddings

* Required when using Azure OpenAI

Notes:

  • OPENAI_BASE_URL is consumed directly by the OpenAI Python SDK, useful for proxy configurations or custom endpoints
  • SEMAPHORE_LIMIT controls concurrent LLM API calls - decrease if you encounter rate limits, increase for higher throughput
  • Azure configuration is an alternative to standard OpenAI - don't mix both configurations

Neo4j Settings 🗄️

Default configuration for Neo4j:

  • Username: neo4j
  • Password: demodemo
  • URI: bolt://neo4j:7687 (within Docker network)
  • Memory settings optimized for development

Docker Environment Variables 🐳

You can run with environment variables directly:

bash
OPENAI_API_KEY=your_key MODEL_NAME=gpt-4.1-mini docker compose up

For Azure OpenAI:

bash
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 🖥️

  1. Configure Cursor MCP settings:
json
{
  "mcpServers": {
    "Graphiti": {
      "command": "uv",
      "args": ["run", "graphiti_mcp_server.py"],
      "env": {
        "OPENAI_API_KEY": "your_key_here"
      }
    }
  }
}
  1. For Docker-based setup:
json
{
  "mcpServers": {
    "Graphiti": {
      "url": "http://localhost:8000/sse"
    }
  }
}
  1. Add Graphiti rules to Cursor's User Rules (see graphiti_cursor_rules.mdc)
  2. Start an agent session in Cursor

Other MCP Clients

The server supports standard MCP transports:

  • SSE (Server-Sent Events): http://localhost:8000/sse
  • WebSocket: ws://localhost:8000/ws
  • Stdio: Direct process communication

💻 Development

Local Development Setup

  1. Install dependencies:
bash
# Using uv (recommended)
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync

# Or using pip
pip install -r requirements.txt
  1. Start Neo4j locally:
bash
docker run -d \
  --name neo4j-dev \
  -p 7474:7474 -p 7687:7687 \
  -e NEO4J_AUTH=neo4j/demodemo \
  neo4j:5.26.0
  1. Run the server:
bash
# 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-entities

Testing

bash
# Run basic connectivity test
curl http://localhost:8000/health

# Test MCP endpoint
curl http://localhost:8000/sse

🔍 Troubleshooting

Common Issues

🐳 Docker Issues

bash
# Clean up and restart
docker compose down -v
docker compose up --build

# Check disk space
docker system df

Logs and Debugging

bash
# 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=DEBUG

Performance Issues

  • Memory: Increase Neo4j heap size in docker-compose.yml
  • Storage: 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


Need help? Open an issue or check our troubleshooting guide above.

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "gifflet-graphiti-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server"
      ]
    }
  }
}

Use Graphiti MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Graphiti MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Graphiti MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Graphiti MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "gifflet-graphiti-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Graphiti MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Graphiti MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Graphiti MCP Server to help me with this task?
Graphiti MCP Server
Sure. I read it.
Here is what I found using Graphiti MCP Server.

Option 2: Add an MCP server URL

Use this when Graphiti MCP Server is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter your server URL in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste your server URL into the Server URL field.
  2. Enter a connection name for Graphiti MCP Server.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the Graphiti MCP Server connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the Graphiti MCP Server tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the Graphiti MCP Server tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Graphiti MCP Server to help me with this task?
Graphiti MCP Server
Sure. I read it.
Here is what I found using Graphiti MCP Server.

Frequently asked questions

What is the Graphiti MCP Server MCP server used for?

Graphiti MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Graphiti MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Graphiti MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Graphiti MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Graphiti MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Graphiti MCP Server MCP to TypingMind?

Graphiti MCP Server can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does Graphiti MCP Server MCP provide in TypingMind?

Graphiti MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Graphiti MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Graphiti MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇