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
| Tool | What it answers |
|---|---|
search_code | Search the source of every indexed contrib project, plus core, for a code pattern: which files, or with by_repo which projects |
check_patches | Does each composer patch still apply to the release the site installed, and is its fix already in that release? |
reroll_patch | Re-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_composer | Which 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_record | Return one core change record in full: title, flavour, target version, machine-checkable tracks, linked issues, linked core symbols, and contrib adoption counts |
what_changed | Answer "what changed in the core API between two core versions": symbols added, deprecated and removed, as ranked groups with counts |
list_change_records | List the core change records (the human write-ups) that target a range of core versions, tagged by flavour and ranked, with counts |
lookup_core_symbol | Answer "is this core symbol safe to use, and who still uses it" for one symbol |
project_upgrade_report | Answer "is this contrib project ready for a target core version, and what work is left" |
project_profile | Answer "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_projects | List drupal.org projects after filters, largest install base first, paged |
subsystem_coupling | Answer "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_relations | List 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_users | List 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_dataset | Learn the dataset before writing SQL for query_dataset |
query_dataset | Run read-only DuckDB SELECTs over the dataset behind the other tools, for a question none of them asks |
Related
- api.tresbien.tech — the same dataset as a REST API and parquet bundle
- dci — Drupal contrib insights, the human-readable reports
- server card and tool catalog for crawlers