Graphiti MCP Demo

Graphiti MCP Demo

Enables AI agents to build real-time knowledge graphs using Zep's Graphiti memory, persisting context in Neo4j.

Category
Visit Server

README

<p align="center"> <a href="https://www.getzep.com/"> <img src="https://github.com/user-attachments/assets/119c5682-9654-4257-8922-56b7cb8ffd73" width="150" alt="Zep Logo"> </a> </p>

<h1 align="center">Graphiti MCP Demo</h1> <h3 align="center">πŸš€ Build Real-Time Knowledge Graphs for AI Agents</h3>

<div align="center">

Made with Love Neo4j Docker License

</div>


πŸ“‘ 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! πŸš€


Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured