> ## Documentation Index
> Fetch the complete documentation index at: https://docs.graphify.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The PyPI package is graphifyy, with two y's. The command is graphify.
> /graphify . is typed in an assistant chat, not in a shell.
> Use only commands, flags, and endpoints shown on these pages. Do not invent one.
> Choose the surface before you open a page. Local (Graphify Local) is the graphifyy package on the machine: the skill, the CLI, and the ten-tool MCP. Its pages are the Open Source tab (/open-source/) and the Graphify Local tab on each Integrations page. Graphify is the hosted workspace and https://api.graphify.com/mcp (Streamable HTTP, OAuth, no API key). Its pages are the Graphify tab (/platform/, /concepts/) and the Graphify (hosted) tab on each Integrations page. Prefer Graphify unless the user asks for a local or offline setup. Cookbooks (/cookbooks/) and /mcp/docs-search apply to both. Each page's source frontmatter records this as surface: local, cloud, or both. Buildkite is the CI integration.
> In llms.txt, tell the surface from the page path. Graphify: /platform/ and /concepts/. Local: /open-source/. Most /integrations/ pages cover both, with a Graphify (hosted) tab and a Graphify Local tab. Everything else applies to both.
> graphifyy release notes are published at https://github.com/Graphify-Labs/graphify/releases and https://graphify.com/changelog. The current package version is on PyPI (https://pypi.org/project/graphifyy/).
> The official site is https://graphify.com. These docs are https://docs.graphify.com.
> The local MCP server is the ten tools in the MCP tool reference and reads a graph on the machine. The hosted server is https://api.graphify.com/mcp (Streamable HTTP, OAuth, no API key). The JetBrains, ChatGPT, Codex, and Dots, and Vercel pages use the hosted server, not the ten-tool list. On pages with tabs, the Graphify (hosted) tab uses the hosted server and the Graphify Local tab uses the local skill or the ten-tool server.
> Read https://docs.graphify.com/llms.txt, then open one page's .md link. Use https://docs.graphify.com/llms-full.txt only when one page is not enough.

# Self-host the Graphify MCP server with Docker

> Build the Graphify Local Docker image from source and run graphify-mcp over streamable HTTP so your whole team queries one graph.

The Graphify Local repository ships a `Dockerfile` that runs `graphify-mcp` over streamable HTTP. Mount a `graphify-out/` folder into the container and every agent on your network can query the same graph.

> [!NOTE]
>
> **Self-host when** your team wants one shared graph but the code must stay on your own infrastructure. If you don't want to run a server, [Graphify](https://docs.graphify.com/integrations/other-agents.md) hosts the MCP endpoint for you.

## How the image works

The image is built from [`Dockerfile`](https://github.com/Graphify-Labs/graphify/blob/HEAD/Dockerfile) in the repository root:

```dockerfile theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
FROM python:3.12-slim
WORKDIR /app
COPY . /app
RUN pip install --no-cache-dir ".[mcp]"
RUN useradd --create-home --uid 10001 graphify
USER graphify
EXPOSE 8080
ENTRYPOINT ["python", "-m", "graphify.serve"]
CMD ["/data/graph.json", "--transport", "http", "--host", "0.0.0.0", "--port", "8080"]
```

* It installs only the `mcp` extra, so the image serves graphs but doesn't build them.
* It runs as a non-root user (UID `10001`).
* The default command reads `/data/graph.json`, so you mount your `graphify-out/` folder at `/data`.

Graphify doesn't publish a prebuilt image, so you build it yourself.

## Run it

**1. Build a graph**

On a machine with Graphify Local installed:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify extract . --code-only
```

**2. Build the image**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
git clone https://github.com/Graphify-Labs/graphify.git
cd graphify
docker build -t graphify .
```

**3. Start the server with a key**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
export GRAPHIFY_API_KEY="$(openssl rand -hex 32)"

docker run -d --name graphify-mcp -p 127.0.0.1:8080:8080 \
  -v "/path/to/repo/graphify-out:/data:ro" \
  graphify /data/graph.json --transport http --host 0.0.0.0 --api-key "$GRAPHIFY_API_KEY"
```

Arguments after the image name replace the default command, so repeat the graph path and transport flags when you add `--api-key`.

**4. Point clients at it**

For clients that take a URL and headers, such as Cursor:

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "mcpServers": {
    "graphify": {
      "url": "http://your-host:8080/mcp",
      "headers": { "Authorization": "Bearer <your key>" }
    }
  }
}
```

Clients can also send the key as an `X-API-Key` header.

> [!WARNING]
>
> Always set `--api-key` when you bind `0.0.0.0`. Without one, anyone who can reach the port can read your graph, and the server logs a warning at start-up. Put the server behind TLS (a reverse proxy or load balancer) before exposing it beyond a private network.

## Configure

| Flag | Default | When to change it |
| - | - | - |
| `--api-key` | `GRAPHIFY_API_KEY` env | Always, for any shared server |
| `--port` | `8080` | Another service already uses 8080 |
| `--path` | `/mcp` | Your proxy routes a different path |
| `--stateless` | off | You run several replicas behind a load balancer |
| `--json-response` | off | Your client can't read server-sent events |
| `--session-timeout` | `3600` | Long-idle agents lose their session; `0` disables the timeout |

## Keep the graph fresh

The server reloads `graph.json` whenever the file changes, so you don't restart the container. Rebuild the graph on the host and the mounted file updates in place:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify update /path/to/repo
```

To automate this, run `graphify hook install` in the repository on the host that owns the mount, or run `graphify update` from a scheduled CI job that writes to the same volume.

## Verify and troubleshoot

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
docker logs graphify-mcp
```

Look for `graphify MCP server (streamable-http) on http://0.0.0.0:8080/mcp - api-key required`. Then send an `initialize` request with your key, as shown in the [MCP server quickstart](https://docs.graphify.com/open-source/mcp-server.md#verify-the-connection). A `200` means it works; `401` means the key is missing or wrong.

> **The container exits straight away**
>
> The graph path doesn't exist inside the container. Check that the mount points at a folder containing `graph.json` and that UID `10001` can read it.

> **Can the container build graphs too?**
>
> Not as shipped. It installs only the `mcp` extra. Build graphs on the host or in CI, and use the container to serve them.

> **Can I serve several repositories?**
>
> Run one container per graph, or merge repositories into one graph first with `graphify merge-graphs`.

## What's next

> **[MCP server quickstart](https://docs.graphify.com/open-source/mcp-server.md)**
>
> Every tool and flag the server exposes.

> **[Vibe coding with Graphify Local](https://docs.graphify.com/open-source/vibe-coding.md)**
>
> Make agents reach for the graph first.

> **[Try it in Graphify](https://docs.graphify.com/platform/quickstart.md)**
>
> We build and host the graph for you. Start with a 14-day Pro trial, then keep up to 3 repositories on Free. No card required.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.