---
title: "Deploy Graphiti 0.31 MCP + FalkorDB"
description: "Graphiti agent memory MCP server, FalkorDB knowledge graph, token auth"
category: "AI/ML"
url: https://railway.com/deploy/graphiti-031-mcp-falkordb
---

# Deploy Graphiti 0.31 MCP + FalkorDB

Graphiti agent memory MCP server, FalkorDB knowledge graph, token auth

**[Deploy Graphiti 0.31 MCP + FalkorDB on Railway](https://railway.com/template/graphiti-031-mcp-falkordb)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/graphiti-031-mcp-falkordb/manifest.json

- **Creator:** My Projects
- **Category:** AI/ML

## Template content

### Token Proxy https://cdn.jsdelivr.net/gh/selfhst/icons/svg/caddy.svg

- **Image:** caddy:2.11.9-alpine
- **Start command:** `sh -c 'if [ ${#PROXY_TOKEN} -lt 32 ]; then echo "Token Proxy: PROXY_TOKEN must be at least 32 characters" >&2; exit 1; fi; case "$PROXY_TOKEN" in *[!A-Za-z0-9]*) echo "Token Proxy: PROXY_TOKEN must contain letters and digits only" >&2; exit 1;; esac; if [ -z "$UPSTREAM_URL" ]; then echo "Token Proxy: UPSTREAM_URL is empty" >&2; exit 1; fi; printf "%s\n" "$CADDYFILE" > /etc/caddy/Caddyfile && echo "Token Proxy: forwarding to $UPSTREAM_URL" && exec caddy run --config /etc/caddy/Caddyfile --adapter caddyfile'`
- **Health check:** /healthz
- **Public domain:** Yes

### Graphiti https://cdn.jsdelivr.net/gh/getzep/zep@65b52058b7d034ba05623c85a909e82a8d1ac2ef/assets/zep-logo-icon-gradient-rgb.svg

- **Image:** zepai/knowledge-graph-mcp:1.1.3-graphiti-0.31.2
- **Start command:** `/bin/sh -c 'redis-server --loadmodule /var/lib/falkordb/bin/falkordb.so --bind 127.0.0.1 ::1 --port 6379 --dir /var/lib/falkordb/data --appendonly yes --appendfsync everysec --daemonize yes && until redis-cli -p 6379 ping >/dev/null 2>&1; do sleep 1; done && echo "FalkorDB ready (append-only file on the volume)" && cd /app/mcp && exec /root/.local/bin/uv run --no-sync main.py'`
- **Health check:** /health

## Documentation

# Deploy and Host Graphiti 0.31 MCP + FalkorDB on Railway

Graphiti is Zep's open-source temporal knowledge graph for AI agent memory. Agents send it what they learn, an LLM extracts entities and facts, and Graphiti stores them with the time each fact was valid. Claude, Cursor or any MCP client can then search that memory. This template runs the official Graphiti MCP server with FalkorDB inside one container, behind a bearer-token proxy.

## About Hosting Graphiti 0.31 MCP + FalkorDB

Upstream's MCP server has no authentication: Zep calls it a reference implementation and warns not to expose it to an untrusted network. Here the Graphiti service (`zepai/knowledge-graph-mcp:1.1.3-graphiti-0.31.2`, which bundles the FalkorDB graph database) is private. The only public service is a small Caddy proxy that requires `Authorization: Bearer ` on every request. The token is generated at deploy. Responses stream through without buffering (MCP streamable HTTP). The template replaces the image's start script so that FalkorDB listens on localhost only, writes an append-only file to the volume (so a redeploy loses at most about a second of writes), and doesn't start the unauthenticated FalkorDB Browser. Two services, about 0.3 GB of RAM at idle. You only enter your OpenAI (or OpenAI-compatible) API key.

## Common Use Cases

- Long-term memory for Claude Code, Claude Desktop, Cursor or VS Code: preferences, project decisions and procedures that persist across sessions
- Shared memory for a team of agents, with one `group_id` per user or project
- A low-cost temporal knowledge graph for agent frameworks (LangGraph, CrewAI, custom agents)

## Dependencies for Graphiti 0.31 MCP + FalkorDB Hosting

- Graphiti MCP server 1.1.3 with graphiti-core 0.31.2 and FalkorDB (`zepai/knowledge-graph-mcp:1.1.3-graphiti-0.31.2`), private, volume
- Token Proxy (`caddy:2.11.9-alpine`), public, bearer token required
- An API key for OpenAI or an OpenAI-compatible provider whose models support structured output

### Deployment Dependencies

- Graphiti on GitHub: https://github.com/getzep/graphiti
- MCP server documentation: https://github.com/getzep/graphiti/tree/v0.31.2/mcp_server
- FalkorDB: https://github.com/FalkorDB/FalkorDB

### Implementation Details

After deploy, open the **Token Proxy** service's Variables tab and copy `MCP_URL` and `PROXY_TOKEN`.

Claude Code:

```bash
claude mcp add --transport http graphiti https:///mcp \
  --header "Authorization: Bearer "
```

Cursor (`~/.cursor/mcp.json`):

```json
{
  "mcpServers": {
    "graphiti": {
      "url": "https:///mcp",
      "headers": { "Authorization": "Bearer " }
    }
  }
}
```

Claude Desktop's custom connector dialog has no field for custom headers, so use the `mcp-remote` bridge in `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "graphiti": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https:///mcp", "--header", "Authorization:${GRAPHITI_AUTH}"],
      "env": { "GRAPHITI_AUTH": "Bearer " }
    }
  }
}
```

Requests without the token get `401`. The tools are `add_memory`, `search_nodes`, `search_memory_facts`, `get_episodes`, `delete_episode`, `add_triplet`, `build_communities`, `clear_graph` and more. `add_memory` returns at once and extracts in the background.

| Variable (Graphiti service) | Default | Purpose |
|---|---|---|
| `OPENAI_API_KEY` | (you enter it) | LLM extraction and embeddings |
| `OPENAI_API_URL` | `https://api.openai.com/v1` | Any OpenAI-compatible API |
| `MODEL_NAME` | `gpt-5.4-mini` | Extraction model (needs structured output) |
| `EMBEDDER_MODEL` | `text-embedding-3-small` | Keep it fixed after the first memory |
| `GRAPHITI_GROUP_ID` | `main` | Default memory namespace |
| `SEMAPHORE_LIMIT` | `5` | Parallel extractions; lower it on 429 errors |

The token gives full access to every group, so share it only with clients you trust. Text stored as memory comes back to your agent later, so don't store memories from untrusted sources (upstream has no prompt-injection protection). FalkorDB is licensed under SSPL v1. For Neo4j Browser, Cypher and a database you can reach from your own tools, use the **Graphiti 0.31 MCP + Neo4j** template.

## Why Deploy Graphiti 0.31 MCP + FalkorDB on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Graphiti 0.31 MCP + FalkorDB on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius v0.1 Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/graphiti-031-mcp-falkordb
