Zep Graphiti MCP server
Zep's self-hosted Graphiti MCP server: turn episodes into a temporal knowledge graph of entities and facts, then search it from any MCP client.
The Graphiti MCP server lives in the mcp_server/ directory of getzep/graphiti, the open-source temporal knowledge graph library that Zep's commercial service is built on. The agent calls add_memory with an episode (text, chat messages, or JSON); Graphiti uses an LLM to extract entities and the facts between them, stores them as nodes and edges with validity timestamps, and marks older facts invalid when newer episodes contradict them. search_nodes and search_memory_facts run hybrid search (semantic similarity, BM25 keyword match, and graph distance) over entity summaries and facts, and add_triplet writes a single fact directly.
You run it yourself. The graph lives in FalkorDB (the default, bundled in the zepai/knowledge-graph-mcp Docker image) or Neo4j, the LLM and embedder can be OpenAI, Azure OpenAI, Anthropic, Gemini, Groq, or Voyage, and data is partitioned by group_id. It serves Streamable HTTP on localhost:8000/mcp/ by default, or stdio with --transport stdio. The code is Apache-2.0. The README calls it a reference implementation with no authentication or authorization, so any caller that reaches it can read or delete the whole graph; Zep Cloud is the hosted product and is not what this server connects to.
Quick install
Copy-paste configs are provided for all 8 supported clients. Pick your client below.
Add to ~/.claude.json
{
"mcpServers": {
"zep": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"OPENAI_API_KEY",
"-e",
"NEO4J_URI",
"-e",
"NEO4J_USER",
"-e",
"NEO4J_PASSWORD",
"zepai/knowledge-graph-mcp:standalone",
"uv",
"run",
"--no-sync",
"main.py",
"--transport",
"stdio",
"--database-provider",
"neo4j"
],
"env": {
"OPENAI_API_KEY": "<OPENAI_API_KEY>",
"NEO4J_URI": "<NEO4J_URI>",
"NEO4J_USER": "<NEO4J_USER>",
"NEO4J_PASSWORD": "<NEO4J_PASSWORD>"
}
}
}
}claude mcp add zep -- docker run -i --rm -e OPENAI_API_KEY -e NEO4J_URI -e NEO4J_USER -e NEO4J_PASSWORD zepai/knowledge-graph-mcp:standalone uv run --no-sync main.py --transport stdio --database-provider neo4jAvailable tools
| Tool | Description |
|---|---|
| add_memory | Add an episode (text, messages, or JSON) to the graph; entities and facts are extracted from it in a background queue. |
| search_nodes | Search entity nodes and their summaries, optionally filtered by group and entity type. |
| search_memory_facts | Search facts (entity edges) with hybrid search, optionally centered on a given node. |
| delete_entity_edge | Delete one fact (entity edge) by UUID. |
| delete_episode | Delete one episode by UUID. |
| get_entity_edge | Get one fact (entity edge) by UUID. |
| get_episodes | List recent episodes for one or more group IDs. |
| summarize_saga | Summarize a saga, an ordered group of related episodes. |
| build_communities | Detect communities of related entities and write a summary for each. |
| add_triplet | Add a single fact directly as source entity, fact, and target entity, without LLM extraction. |
| get_episode_entities | Get the entities and facts that specific episodes created. |
| clear_graph | Delete all graph data for the given group IDs. |
| get_status | Report server status and the database connection. |
Required configuration
- OPENAI_API_KEYRequired
OpenAI key for entity extraction and the default embedder. Other providers use ANTHROPIC_API_KEY, GOOGLE_API_KEY, GROQ_API_KEY, AZURE_OPENAI_API_KEY, or VOYAGE_API_KEY.
- NEO4J_URIOptional
Neo4j Bolt URI when the database provider is neo4j. Defaults to bolt://localhost:7687.
- NEO4J_USEROptional
Neo4j username. Defaults to neo4j.
- NEO4J_PASSWORDOptional
Neo4j password.
- FALKORDB_URIOptional
FalkorDB URI when the database provider is falkordb (the default). Defaults to redis://localhost:6379.
- GRAPHITI_GROUP_IDOptional
Default group_id namespace for the graph. Defaults to main.
- MODEL_NAMEOptional
LLM used for extraction. Overrides the model in config.yaml.
- SEMAPHORE_LIMITOptional
Maximum concurrent episode-processing calls, tuned to your LLM provider's rate limit.
What you can do with it
Facts that change over time
When a later episode says a customer moved plans or a service changed owners, Graphiti invalidates the old edge, and search_memory_facts returns the current fact with its validity window.
Graph memory on your own infrastructure
Running FalkorDB or Neo4j yourself keeps every episode and extracted fact inside your network, with group_id separating projects or tenants.
Load structured records next to conversation
add_memory accepts JSON episodes, so product catalogs or CRM exports can sit in the same graph as chat history and be searched together.
FAQ
- Is it free?
- Yes. The server and the Graphiti library are open source under Apache-2.0. You pay for the LLM and embedding calls Graphiti makes on every episode and for whatever runs the graph database. Zep Cloud, the separate hosted product, has a free tier and paid plans.
- Does it support remote or OAuth?
- It serves Streamable HTTP at /mcp/ on port 8000 by default, so remote clients can connect, but it has no authentication of any kind. The README says not to expose it to an untrusted network. There is no OAuth and no Zep-hosted endpoint for this server.
- How does it compare to a team memory service like Glen?
- Graphiti gives you a self-hosted temporal graph that agents write to by calling add_memory, partitioned by group_id with no per-user permissions. Glen is a hosted service that records agent sessions and connected tools on its own and checks each user's access to every observation at recall.
