Skip to content
New · v0.9.35 is out
Integrations

Give Claude Code a knowledge graph of your codebase

Setup guide · /graphify skill · hooks · MCP

Claude Code is the assistant Graphify is wired into most deeply: the bare graphify install command targets Claude Code by design. One install sets up three things at once: the /graphify skill, a CLAUDE.md registration, and PreToolUse hooks that steer Claude Code toward the knowledge graph before it reaches for grep. The result is an agent that asks the graph how your codebase connects, with a confidence tag on every edge, instead of reading files and inferring the rest.

What graphify install writes for Claude Code

  • The skill: ~/.claude/skills/graphify/SKILL.md, plus a references/ sidecar the skill loads on demand. This is what /graphify triggers.
  • A CLAUDE.md registration: a small section in ~/.claude/CLAUDE.md that maps /graphify to the skill. The rest of your file is left alone.
  • PreToolUse hook-guards in .claude/settings.json: one fires before Bash and Grep tool calls (graphify hook-guard search), one before Read and Glob (graphify hook-guard read). By default they nudge Claude Code to run graphify query first rather than blocking anything.
~/.claude/CLAUDE.md (section added by graphify install)
# graphify- **graphify** (`~/.claude/skills/graphify/SKILL.md`) - any input to knowledge graph. Trigger: `/graphify`When the user types `/graphify`, use the installed graphify skill or instructions before doing anything else.

Set it up

  1. Install the CLI. If graphify is not found afterwards, run uv tool update-shell and open a new terminal.
  2. Register with Claude Code: graphify install. Prefer a repo-local setup your team can commit? graphify install --project writes under .claude/ in the repo and prints a git add hint.
  3. Build the graph: type /graphify . in a Claude Code session. It writes graphify-out/ with graph.html (interactive), GRAPH_REPORT.md (highlights, suggested questions), and graph.json (the queryable graph).
  4. Ask something structural and watch it answer from the graph.
terminal
$ uv tool install graphifyy$ graphify install
in Claude Code
/graphify .

How Claude Code queries the graph during a session

The skill defines the workflow, and the hooks keep it honest: before Claude Code greps or opens files one by one, the hook-guard reminds it to try graphify query "<question>" (a scoped subgraph), graphify path "<A>" "<B>" (the dependency path between two symbols), or graphify explain "<concept>" (everything connected to a node). Results come back with file:line citations and every edge tagged EXTRACTED, INFERRED, or AMBIGUOUS, so the agent knows what was found versus guessed.

Want more than a nudge? graphify install --project --strict blocks the first raw source read of a session and redirects it to the graph, then reverts to the soft nudge. Toggle at runtime with GRAPHIFY_HOOK_STRICT=1 or 0, no reinstall needed.

After Claude Code edits files, graphify update . re-extracts only what changed (AST-only, no API cost), and graphify hook install makes git do that automatically on commit and checkout.

Wire the MCP server into Claude Code

The skill and CLI need no MCP at all. If you want the graph exposed as native tools instead (ten of them: query_graph, shortest_path, god_nodes, graph_stats, the PR-triage set, and more; see the MCP tools reference), add the server to .mcp.json in your project root:

.mcp.json
{  "mcpServers": {    "graphify": {      "command": "python",      "args": ["-m", "graphify.serve", "graphify-out/graph.json"]    }  }}

The stdio server ships as an extra: uv tool install "graphifyy[mcp]". For several clients sharing one graph, run it once with --transport http instead.

Troubleshooting

  • graphify: command not found: the uv or pipx tool bin dir (~/.local/bin) is not on your PATH yet. Run uv tool update-shell (or pipx ensurepath) and open a new terminal.
  • /graphify does nothing: check that ~/.claude/skills/graphify/SKILL.md exists and that the graphify section is in CLAUDE.md, then start a new Claude Code session so both are picked up.
  • ModuleNotFoundError: No module named 'graphify': usually a plain pip install on Mac or Windows. The skill resolves Python from graphify-out/.graphify_python, which can point at a different environment than pip used. Install with uv or pipx instead; both isolate the package.
  • Hooks stopped firing after an upgrade: hook commands embed the absolute executable path at install time. Re-run graphify install, and graphify hook install for the git hooks.
  • PowerShell: type graphify ., not /graphify .; the leading slash parses as a path separator there.

Claude Code FAQ

Does graphify install overwrite my existing CLAUDE.md?

No. The installer replaces or appends only its own graphify section and leaves the rest of the file alone. graphify uninstall removes exactly that section again (and deletes the file only if graphify created it).

Does my code leave my machine when Claude Code uses Graphify?

Source code is parsed locally with tree-sitter (36 language grammars); building code edges never requires an API call. Non-code files such as docs and PDFs are read by the model you already use in Claude Code. Nothing is sent to Graphify: there is no telemetry and no account.

Do I need the MCP server, or is the skill enough?

The skill plus the CLI is the complete default setup. The MCP server is optional: add it when you want the graph exposed as native tools, or when several assistants or teammates should share one graph over HTTP.

Can my whole team get this from the repo?

Yes. graphify install --project writes the skill, the CLAUDE.md registration, and the hook settings under the repo (.claude/skills/graphify/SKILL.md and .claude/settings.json) and prints a git add hint. Teammates only need the graphifyy CLI installed.

How does the graph stay current while Claude Code edits code?

Run graphify update . to re-extract only changed files (AST-only, no API cost). graphify hook install adds post-commit and post-checkout git hooks that do this automatically; re-run it after upgrading graphify so the embedded interpreter path stays fresh.

How do I remove it?

graphify claude uninstall removes the Claude Code pieces; graphify uninstall removes every platform at once. Add --purge to also delete the graphify-out/ directory.

Next steps

The quickstart covers the full CLI, and the MCP tools reference documents every tool the server exposes. Using Cursor as well? The same graph plugs into it through one always-on rule: see Graphify + Cursor, or browse all 17 assistants on the integrations page.

We use privacy-friendly analytics to improve Graphify. Cookies only load if you accept. Privacy policy