The graph, as tools your agent calls.
Graphify's MCP server exposes 10 tools over the knowledge graph built from your repo, so any MCP client — Claude Code, Cursor, Copilot, and the rest — reads the graph natively instead of grepping.
Run the server
The server ships with the CLI and reads the graph.json that /graphify . produced (default graphify-out/graph.json). It speaks stdio by default — the right mode for a single assistant — or Streamable HTTP when several assistants or teammates should share one graph. The HTTP transport can require a key via --api-key (or the GRAPHIFY_API_KEY env var).
# stdio (default) — one assistant, one graph:$ python -m graphify.serve graphify-out/graph.json # shared HTTP — one server, many clients:$ python -m graphify.serve graphify-out/graph.json --transport http --port 8080 # also available as a console script:$ graphify-mcp graphify-out/graph.jsonConnect a client
Most assistants pick this up automatically — graphify install wires the server into the assistants it detects. To register it by hand in Claude Code, add this to .mcp.json in your project root; other MCP clients take the same command in their own config format.
{ "mcpServers": { "graphify": { "command": "python", "args": ["-m", "graphify.serve", "graphify-out/graph.json"] } }}Every tool below also accepts an optional project_path parameter — an absolute path to another project containing graphify-out/graph.json — so one running server can answer for a whole workspace of repos. Omit it and the server answers against the graph it was started with.
Query & traverse
The core four: ask a question, inspect a node, walk its neighbors, or trace the path between two concepts. Results come back as text context with file:line citations, every edge tagged EXTRACTED, INFERRED, or AMBIGUOUS.
query_graph
Search the graph for a natural-language question using BFS or DFS traversal. Returns the relevant nodes and edges as text context — the same output graphify query prints.
- question · required
- Natural-language question or keyword search.
- mode · default bfs
- bfs for broad context, dfs to trace a specific path.
- depth · default 3
- Traversal depth (1–6).
- token_budget · default 2000
- Cap on output tokens.
- context_filter · optional
- Explicit edge-context filter, e.g. ["call", "field"].
get_node
Full details for one node, looked up by label or ID: what it is, where it lives, its community, and its edges.
- label · required
- Node label or ID to look up.
get_neighbors
All direct neighbors of a node, with edge details — one hop out in every direction.
- label · required
- Node label or ID.
- relation_filter · optional
- Only edges of this relation type.
shortest_path
The shortest path between two concepts in the graph — how two pieces of the codebase connect, hop by hop.
- source · required
- Source concept label or keyword.
- target · required
- Target concept label or keyword.
- max_hops · default 8
- Maximum hops to consider.
Structure & overview
For orientation: the graph's communities, its most-connected nodes, and summary statistics — the "show me the shape of this codebase" tools an agent calls first in an unfamiliar repo.
get_community
All nodes in one community (the clusters the graph is organized into), by community ID.
- community_id · required
- Community ID, 0-indexed by size.
god_nodes
The most-connected nodes in the graph — the core abstractions everything else hangs off.
- top_n · default 10
- How many nodes to return.
graph_stats
Summary statistics: node count, edge count, communities, and the EXTRACTED / INFERRED / AMBIGUOUS confidence breakdown.
no parameters
Pull requests
The same graph-impact analysis behind graphify prs, exposed to agents: which open PRs touch what, and in which order to review them.
list_prs
Open GitHub PRs with CI status, review state, and graph impact — which communities each PR touches and its blast radius. Useful before starting work, to check if a PR already covers the area.
- base · optional
- Base branch to filter by (auto-detected if omitted).
- repo · optional
- owner/repo — defaults to the current repository.
get_pr_impact
Detailed graph impact for one PR: the files it changes, the communities affected, and how many nodes are touched — for assessing merge risk or overlap with current work.
- pr_number · required
- The PR number to analyse.
- repo · optional
- owner/repo — defaults to the current repository.
triage_prs
All actionable open PRs (right base branch, not stale) with full graph-impact data, so the agent can reason about review priority, merge order, and conflict risk.
- base · optional
- Base branch to filter by (auto-detected if omitted).
- repo · optional
- owner/repo — defaults to the current repository.
Resources
Alongside the tools, the server publishes MCP resources — read-only documents a client can pull into context: the full GRAPH_REPORT.md, graph stats, god nodes, surprising cross-community connections, the confidence audit, and suggested questions for the codebase.
Not the docs MCP server
This page covers the graph MCP server — the one the CLI runs locally over your own repo. Graphify also hosts a separate docs MCP server with a single tool, search_graphify_docs, for searching this documentation from your editor. Different server, different job.