Repository navigation
drupal index
Paulo Maia Carvalho edited this page Oct 2, 2026
·
1 revision
Builds a code intelligence index of your Drupal project with GitNexus and registers it as an MCP server. Once active, the agent can answer questions such as "what calls this service?" or "what breaks if I change this class?" with one query instead of several grep/find calls.
/drupal-index
To force a full rebuild (after a large refactor, or if results look stale), ask for it explicitly: "re-index with --force".
- Checks that
npxis available and that a Drupal project exists at/workspace/drupal - Runs
npx -y gitnexus@latest analyze /workspace/drupal. The first run can take several minutes and the progress streams into the chat - Adds a
gitnexusentry to/workspace/.pi/mcp.json, merging with whatever is already configured (it never overwrites the file blindly) - Reminds you to activate the server
Send /restart in the chat to load the new MCP server. If the tools are not available yet, the agent falls back to the GitNexus command line, which works the same way.
The skill only ever indexes /workspace/drupal. It never indexes /workspace as a whole, /config or any other path.
- You are exploring an unfamiliar codebase and want an overview of relationships between classes and services
- Before a refactor, to see what depends on the code you are about to change
- After large changes, to refresh the index
- MCP Servers — how MCP servers are configured
- drupal-analyze — static analysis with PHPStan and PHPCS