> ## 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.

# MCP server quickstart: serve your graph to any agent

> Run graphify-mcp over stdio for one agent or over streamable HTTP for a team, then call query_graph and nine other graph tools from any MCP client.

`graphify-mcp` reads `graphify-out/graph.json` and exposes it as MCP tools. Your agent can then ask for a subgraph, a node, a path, or the pull requests a change affects, instead of reading files to find out.

> [!NOTE]
>
> **Use the MCP server when** your client supports MCP but not skills, or when several people or agents should read one graph. For a graph hosted and refreshed for you, use the [hosted MCP server](https://docs.graphify.com/integrations/other-agents.md).

## Before you start

Build a graph first with the [CLI quickstart](https://docs.graphify.com/open-source/cli-quickstart.md), then install the MCP extra:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
uv tool install "graphifyy[mcp]"
```

## Connect one agent over stdio

Use an absolute path. GUI clients often start in a different folder from your terminal.

**Claude Code**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
claude mcp add --transport stdio graphify -- graphify-mcp /absolute/path/to/repo/graphify-out/graph.json
```

**Cursor and JSON clients**

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "mcpServers": {
    "graphify": {
      "command": "graphify-mcp",
      "args": ["/absolute/path/to/repo/graphify-out/graph.json"]
    }
  }
}
```

**Codex**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
codex mcp add graphify -- graphify-mcp /absolute/path/to/repo/graphify-out/graph.json
```

## Serve a team over HTTP

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify-mcp graphify-out/graph.json --transport http --port 8099 --api-key "$GRAPHIFY_API_KEY"
```

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify MCP server (streamable-http) on http://127.0.0.1:8099/mcp - api-key required
```

Clients send the key as `Authorization: Bearer <key>` or `X-API-Key: <key>`. A request without it gets `401`. The server binds to `127.0.0.1` by default and warns if you bind `0.0.0.0` without a key.

| Flag | Default | Purpose |
| - | - | - |
| `--transport` | `stdio` | `stdio` or `http` (streamable HTTP) |
| `--host` | `127.0.0.1` | Interface to bind |
| `--port` | `8080` | HTTP port |
| `--path` | `/mcp` | Endpoint path |
| `--api-key` | `GRAPHIFY_API_KEY` | Required key for HTTP requests |
| `--stateless` | off | No session state, for load-balanced replicas |
| `--json-response` | off | Plain JSON responses instead of SSE |
| `--session-timeout` | `3600` | Seconds before an idle session closes; `0` disables |

## Tools your agent gets

| Tool | Use it to |
| - | - |
| `query_graph` | Get a token-budgeted subgraph for a question (`mode`: `bfs` or `dfs`, `depth` 1–6, `token_budget` default 2000) |
| `get_node` | Read one node by label or ID |
| `get_neighbors` | List a node's connections, optionally by relation |
| `get_community` | Read every node in one community |
| `god_nodes` | List the most connected nodes |
| `graph_stats` | Count nodes, edges, communities, and confidence labels |
| `shortest_path` | Find the path between two nodes (`max_hops` default 8) |
| `list_prs`, `get_pr_impact`, `triage_prs` | See which open pull requests touch which parts of the graph |

The server also publishes resources such as `graphify://report` (the `GRAPH_REPORT.md` text) and `graphify://god-nodes`.

## Verify the connection

Reload MCP servers in your client and ask it to call `graph_stats`. Then try:

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{"question": "cluster leiden", "token_budget": 1500}
```

For HTTP, check the endpoint from a terminal:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
curl -s -o /dev/null -w "%{http_code}\n" -X POST http://127.0.0.1:8099/mcp \
  -H "Authorization: Bearer $GRAPHIFY_API_KEY" \
  -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"curl","version":"0"}}}'
```

A `200` means the server is up and your key works.

> **graphify-mcp: command not found**
>
> The MCP extra isn't installed in the environment on your `PATH`. Run `uv tool install --reinstall "graphifyy[mcp]"`, or use `python -m graphify.serve` from the virtual environment where Graphify is installed.

> **Does the server see graph updates?**
>
> Yes. It reloads `graph.json` when the file changes, so `graphify update .` or a git hook keeps answers current.

## What's next

> **[Self-host with Docker](https://docs.graphify.com/open-source/self-host.md)**
>
> Run the HTTP server in a container.

> **[Vibe coding with Graphify Local](https://docs.graphify.com/open-source/vibe-coding.md)**
>
> Make your agent use the graph by default.

> **[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.