Skip to main content

Graphiti MCP Server

Project description

Zep Logo

Graphiti MCP Demo

🚀 Build Real-Time Knowledge Graphs for AI Agents

Made with Love Neo4j Docker License


📑 Table of Contents


📖 About

We are implementing an MCP server and AI agent integration to leverage Zep's Graphiti for persistent memory and context continuity across Cursor and Claude.

This setup allows AI agents to:
✅ Connect to the MCP for dynamic tool discovery
✅ Select the optimal tool for a query
✅ Formulate responses with context continuity
✅ Persist interactions in Neo4j as a knowledge graph


🔄 Workflow of the Project

The workflow of this project shows how Cursor or Claude Desktop integrates with the MCP server and stores context in Graphiti memory (Neo4j):

  1. Developer sends a Query from Cursor IDE or Claude Desktop.
  2. The MCP Host connects to the MCP Server.
  3. The MCP Server makes tool calls (e.g., add_episode, search_nodes, clear_graph) to interact with Graphiti memory.
  4. Extracted context (documents, conversations, JSONs) is stored as structured data.
  5. This data flows into different layers of the Graphiti Memory Structure:
    • Level 1: Episodes → Raw data like documents, conversations, JSONs
    • Level 2: Entities → Nodes & relationships extracted from episodes
    • Level 3: Communities → Clusters of entities with summaries
  6. The MCP Host sends the enriched context back to the developer as a response.

📽️ Workflow Demo

Workflow

⚙️ Setup

1️⃣ Clone GitHub Repository

git clone https://github.com/getzep/graphiti.git
cd graphiti/mcp_server

2️⃣ Install Dependencies

uv sync

3️⃣ Configure Environment

Create a .env file in graphiti/mcp_server:

# Neo4j Database Configuration
NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=demodemo

# OpenAI API Configuration
OPENAI_API_KEY=<your_openai_api_key>
MODEL_NAME=gpt-4.1-mini

🖥 Running MCP Server

Graphiti MCP server can be run using Docker or Python. Docker is recommended, but direct execution helps with troubleshooting.

▶️ Run with Docker

docker compose up

📸 Docker Container Running Docker Up


▶️ Run with Python (for debugging)

uv run graphiti_mcp_server.py --model gpt-4.1-mini --transport sse

📸 Graphiti SSE Output SSE Output


🤝 Integrating MCP Clients

🔹 Cursor

Add this to your mcp.json:

{
  "mcpServers": {
    "Graphiti": {
      "url": "http://localhost:8000/sse"
    }
  }
}

🔹 Claude

Update claude_desktop_config.json:

{
  "mcpServers": {
    "graphiti": {
      "transport": "stdio",
      "command": "/path/to/uv",
      "args": [
        "run",
        "--isolated",
        "--directory",
        "/path/to/graphiti/mcp_server",
        "--project",
        ".",
        "graphiti_mcp_server.py",
        "--transport",
        "stdio"
      ]
    }
  }
}

🕸 Verifying in Neo4j

Open the Neo4j browser → http://localhost:7474/browser/

📸 Connected Neo4j Browser Neo4j Browser

📸 Data Stored in Neo4j Neo4j Data


🔄 Final Output from Cursor → Neo4j

Flow: Cursor Prompt ➝ MCP Server ➝ Neo4j Graph Storage

📸 Final Cursor Output Sent to Neo4j Final Output


🤝 Contribution

Contributions are welcome!

  • Fork this repo
  • Create a new branch
  • Make changes & submit a PR

💡 Connect with Me

Stay connected on LinkedIn for more projects, ideas, and collaborations:
Kartik Jain

Let’s build, learn, and grow together! 🚀


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_kartikk_26_mcp_server-0.4.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_kartikk_26_mcp_server-0.4.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_kartikk_26_mcp_server-0.4.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_kartikk_26_mcp_server-0.4.0.tar.gz
Algorithm Hash digest
SHA256 463904d59fe639c31a72eb7649e049759e0b30fb1bcf57a405ade56797cfa244
MD5 325c2c704c5da203150a0e6bb077bb65
BLAKE2b-256 305a35e2de7a13a7fac3323ed541323f178f4b606ab11d2d128da0b4070855b3

See more details on using hashes here.

File details

Details for the file iflow_mcp_kartikk_26_mcp_server-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_kartikk_26_mcp_server-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_kartikk_26_mcp_server-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d162e65e98f3e6145f64eeb4a6cd30055b5e8f47d3293c815192fb501d14bd79
MD5 b896fe53cc06758f4d7a952bde5e93f0
BLAKE2b-256 35366119ba45b1deede16ee8e04582bd06f68bebef4b540892f6e9b4ebc890c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page