Drupal Code Query MCP

An MCP server over the Drupal core change-record and symbol catalog, backed by a nightly scan of 12,500+ contrib projects.

It answers what changed between two core versions and which projects still call a symbol. Per project, it reports upgrade readiness, install history and dependencies. Regex code search covers contrib and core, and query_dataset runs SQL over the same bundle. Read-only.

Upgrading a site is three calls. scan_composer ranks every installed package for the target core from composer.lock. check_patches says whether each composer patch still applies to the installed release, or is already in it. reroll_patch returns the re-rolled diff for the ones that no longer apply.

Connect

Add the connector URL to any MCP client:

https://mcp.tresbien.tech/mcp

Claude Code:

claude mcp add --transport http drupal-code-query https://mcp.tresbien.tech/mcp

Listed in the official MCP registry as tech.tresbien/drupal-code-query.

Tools

ToolWhat it answers
search_codeSearch the source of every indexed contrib project, plus core, for a code pattern: which files, or with by_repo which projects
check_patchesDoes each composer patch still apply to the release the site installed, and is its fix already in that release?
reroll_patchRe-roll one composer patch that check_patches reported conflicts: a 3-way merge of the patch onto the installed release, returned as a new diff
scan_composerWhich of a site's drupal/* packages need a new release for a target core, and which have none? Send composer.lock and composer.json once; do not query one package at a time
get_change_recordReturn one core change record in full: title, flavour, target version, machine-checkable tracks, linked issues, linked core symbols, and contrib adoption counts
what_changedAnswer "what changed in the core API between two core versions": symbols added, deprecated and removed, as ranked groups with counts
list_change_recordsList the core change records (the human write-ups) that target a range of core versions, tagged by flavour and ranked, with counts
lookup_core_symbolAnswer "is this core symbol safe to use, and who still uses it" for one symbol
project_upgrade_reportAnswer "is this contrib project ready for a target core version, and what work is left"
project_profileAnswer "what is this contrib project, how big is it, which core versions does it support, what moves with it" for one drupal.org project
list_projectsList drupal.org projects after filters, largest install base first, paged
subsystem_couplingAnswer "what else tends to fail when a merge request touches this core subsystem" from CI history over about 9,000 core merge requests
list_class_relationsList the contrib classes that extend, implement or use a core class, interface or trait, one row per edge with file and line, paged
list_symbol_usersList every contrib project using one core symbol, or any symbol in a class of symbols, one row per project, paged, with the matched symbols
describe_datasetLearn the dataset before writing SQL for query_dataset
query_datasetRun read-only DuckDB SELECTs over the dataset behind the other tools, for a question none of them asks

Related