The Graph Indexer plugin for Claude Code installs in two commands, /plugin marketplace add MaquinaTech/graph-indexer and /plugin install graph-indexer@graph-indexer. It bundles the Graph Indexer MCP server, three hooks and a read-only code-structure sub-agent, so Claude Code gets exact references, call graphs and change impact from a local index with no model and no network.
How do I install the Graph Indexer plugin in Claude Code?
Run these two commands inside Claude Code:
/plugin marketplace add MaquinaTech/graph-indexer
/plugin install graph-indexer@graph-indexer
The first command registers the graph-indexer marketplace from the GitHub repository. The second installs the plugin of the same name from it. You need Node.js 22.5 or newer, the same requirement as the npx install.
What does the plugin bundle?
The Graph Indexer plugin (MIT license, published by MaquinaTech) contains three things:
| Component | What it does |
|---|---|
| MCP server | Runs npx -y graph-indexer@3.0.0 serve and exposes the eight read-only tools: read_code, search_text, search_code, find_references, call_graph, change_impact, check_changes and outline |
| Hooks | PostToolUse (on Edit, Write, MultiEdit, Grep, Bash and Read), SessionStart and SubagentStart |
code-structure sub-agent | A read-only helper on the small haiku model that answers call-site, caller, subclass and change-impact questions and cannot edit files |
The server indexes the git repository that contains the directory Claude Code runs in, so no --repo argument is needed.
What do the hooks do?
The Graph Indexer hooks put the index into Claude Code’s normal loop and stay silent unless they have something useful to add. After an edit, PostToolUse runs the edit checker on the edited file: syntax errors introduced, calls that no longer fit a changed signature and removed names still in use. Once the agent has been searching and reading for a while without editing, it also says where the names in the lines it read are defined, and which definition is which after a grep for a shared name. SessionStart adds one line saying the index exists, and builds it in the background if missing. SubagentStart gives the same line and the lookup rules to sub-agents. The plugin’s hook command is a small client that talks to the local resident process kept by the MCP server, which answers in tens of milliseconds, and it fails open: on any error it prints nothing.
What does the code-structure sub-agent do?
The code-structure sub-agent answers structural questions exactly and briefly from the index, on a small model: every call site of a method (told apart from same-name methods of other classes), callers of callers, classes that extend or implement a type, and what a change would affect with the tests that cover it. It replies with path:line lines and says whether the list is complete. Claude Code can delegate these lookups to it instead of grepping and reading files. Its measurements are on the benchmarks page.
What is the difference between the plugin and npx graph-indexer init?
Both give Claude Code the same MCP server, hooks and sub-agent. They differ in where the configuration lives.
| Claude Code plugin | npx graph-indexer init --hooks | |
|---|---|---|
| Installed through | /plugin commands | A command in your terminal |
| Configuration lives in | Claude Code’s plugin store | Project files: .mcp.json, .claude/settings.json, .claude/agents/code-structure.md |
| Shared with your team | Each person installs the plugin | Commit the files and everyone gets them |
Writes CLAUDE.md block | No | Yes (unless --no-instructions) |
| Other agents (Cursor, Codex, …) | No, Claude Code only | Yes, with --agents or --all |
Choose the plugin for a quick setup on your own machine. Choose init when you want the setup committed to the repository or you use other agents as well.
How do I verify the plugin works?
Run /mcp in Claude Code. The graph-indexer server should be listed as connected, with its tools. Then ask Claude Code a structural question, such as which methods call UserService.find, and check that it uses find_references or the code-structure sub-agent rather than grepping for the name. More on the setup is on the Claude Code agent page.
Does the plugin make network calls?
No. Graph Indexer itself makes no network calls and sends no telemetry. The agent still sends what it reads to its model provider. Fetching the package through npx and installing the plugin from GitHub are done by Node.js and Claude Code, not by Graph Indexer at runtime. See the security policy.
Frequently asked questions
Do I need the plugin and npx graph-indexer init?
No, they are alternatives for Claude Code. The plugin installs the MCP server, hooks and sub-agent through Claude Code's plugin system. The init command writes the same pieces as project files you can commit and share with your team.
Does the plugin send my code anywhere?
Graph Indexer itself makes no network calls and sends no telemetry. The index is a local file. Claude Code still sends what it reads to its model provider, exactly as it does without the plugin.