Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]¶
[0.3.8] - 2026-10-21¶
Security¶
- Pin
certifi>=2026.10.19for the eMudhra / emSign CA incident (GHSA-6q48-6c7w-9gw2): this server's outbound TLS — Drupal sites, OAuth token and JWKS endpoints — verifies against certifi's bundle via httpx, and a pre-incident bundle still trusts the roots the eight compromised intermediates chain through. Fresh installs already resolve the patched bundle; the floor makespip install -U drupal-mcp-serverfix existing environments too.
[0.3.7] - 2026-10-20¶
Added¶
- Drupal-side identity for networked deployments:
DRUPAL_OAUTH_DELEGATE=1serves ADR 0005's proxy delegation. MCP clients keep the standard flow against this server (discovery, dynamic registration, PKCE) while authorize/token requests are forwarded to Drupal's simple_oauth server, and every presented token is validated per request — locally via JWKS (no per-request hop, endpoint derived fromDRUPAL_OAUTH_TOKEN_URLby the/oauth/tokenconvention) or by RFC 7662 introspection whenDRUPAL_OAUTH_INTROSPECTION_URLis set (hop per cold token, cached). A token URL that does not follow the convention, or missing upstream credentials, refuses to start with the override settings named. Optional:DRUPAL_OAUTH_AUTH_ENDPOINT,DRUPAL_OAUTH_JWKS_URI,DRUPAL_OAUTH_AUDIENCE,DRUPAL_OAUTH_REQUIRED_SCOPES(empty accepts any valid token) andMCP_BASE_URLfor public redirects. The default posture is unchanged: the in-process authorization server, which needs no Drupal reachable. Pinned offline against generated keys and a stub upstream; the live simple_oauth round trip is not yet exercised (recorded gap, like the outbound client-credentials leg).
[0.3.6] - 2026-10-20¶
Added¶
MCP_READ_ONLY=1exposes only read-only tools: a registrar drops every writing tool at decoration time, so it never enters the registry —tools/listcannot advertise it and a call by name fails as an unknown tool, not a refused call. The classifier is a naming contract (query prefixes/suffixes plus a vetted extras list), fail-closed so a future tool stays hidden until its name reads as a query, pinned by a census test at 185 of 414 tools. One deliberate exception: thesearch_prefix heads thesearch_api_*mutation family, so those eight names (create/reindex/clear/enable/disable) are denied explicitly while the family's readers pass on their own suffixes.MCP_RATE_LIMIT=Nputs a token bucket of N requests/minute per client on every HTTP route — MCP endpoints, custom routes, and the OAuth token endpoint alike — answering429withRetry-Afterpast the budget and reportingX-RateLimit-Limit/X-RateLimit-Remainingon the way through. Keyed by bearer token when the request carries one (a credential being guessed burns its own budget, not the shared address of every client behind it), else by client IP.0— the default — disables it. The default surface is unchanged: 414 tools without either flag.
[0.3.5] - 2026-10-20¶
Fixed¶
- Every scaffold writer now emits files Drupal can actually load. The live sweep only proves a tool answers; offline tests over each writer found and pinned the defects it never could:
module_createnamed its controller with a literal{machine_name.capitalize()}(missing f) and reported the config schema at the module root though it writesconfig/schema/;module_service_createpasted$this->x = $xat class scope — a PHP ParseError whenever arguments were passed — and kept dots from service ids in variable names ($entity_type.manager);test_scaffold_phpunitandmodule_test_createwrote shell-style\$thisescapes into raw PHP and pluralized the namespace (KernelTests/UnitTests), so the namespace never matched the directory the test landed in and PSR-4 discovery never loaded it;module_plugin_createnever closed the plugin docblock, gave formatters the widget'sformElementinstead of the abstractviewElements(fatal on load), skipped imports its signatures name, and joined the PHP namespace fragment into the OS path — one directory literally namedPlugin\Blockon POSIX, so no plugin file was ever in the PSR-4 tree;- the form, controller and event-subscriber writers reported file
paths with no module root;
EntityFormscaffolding is now refused with the reason (entity forms route via_entity_formand need a type this tool does not take), instead of shipping a form base class that cannot route; module_event_subscriber_createsubscribed methods it never generated — one handler stub per subscribed event now ships;module_hook_implementofferedhook_config_import_create, a hook Drupal has never invoked; replaced withhook_config_presave;module_info_generateandmodule_dependencies_analyze"detected" dependencies that are not modules (form, entity, container, config) via dead string checks — both now infer real module names fromDrupal\<module>\class usage;theme_createdumped library definitions into info.yml'slibrarieskey, which takes a list of names to attach: withlibrariespassed the theme's info.yml was uninstallable;generate_module_migrationwrote a class its filename disagreed with on case (PSR-4 never autoloads it on a case-sensitive filesystem), never imported theMigrateSourcePluginannotation it documents, and dropped migrations/, info.yml and .module insidesrc/Plugin/while reporting them at the module root.theme_settings_formgenerated a class that cannot load on any core:ConfigFactoryInterfaceandContainerInterfaceused unimported, and a constructor override that dropped D11's requiredTypedConfigManagerInterfacewhile its services.yml entry passed only@config.factory— the container could not build the form.theme_debug_enableran threeconfig:set twig.config …calls (one malformed argument string, against a config object that does not exist, results discarded) and reportedtwig_debug: Trueregardless — on every site it ever ran against, nothing changed. It now refuses honestly with the settings.php recipe and runs nothing.theme_template_overridesilently created a half-theme for a theme that does not exist, raised an uncaught FileNotFoundError for nested names likeviews/views-view-table.html.twig, and let an absolutetemplate_namewrite anywhere;theme_breakpoint_createhad no theme-exists guard at all.theme_asset_optimizereportedsuccess: Trueregardless of what drush answered.migrate_taxonomy's create paths were dead code: the client raises (LookupError) for a missing resource instead of returning an error dict, so a vocabulary or term absent from the target site was reported as an error and never created, on every call. Vocabulary updates also forwarded the caller'stermslist as an attribute (a 400 on any real update), term payloads sent the read-onlytid, and the inertsource_jsonapiparameter was accepted, checked twice and never used — it is gone.generate_migration_yamlaccepteddestinationand ignored it (the plugin was hardcoded toentity:node), hand-rolled its YAML so any value containing": "produced an unparseable document, and interpolated an unvalidated migration id into config Drupal's migrate storage must load.sync_media_filesreturned a silentsynced: 0for a source path that does not exist, raised SameFileError when a directory was synced onto itself, and abandoned the whole run on the first unreadable file.
Testing¶
- 91 offline tests across four batches (now 675): every scaffold writer and every migration tool is pinned — guards, generated YAML/PHP content, PSR-4 namespace↔directory agreement, verbatim delegation of the plan-service wrappers, and that every path a report claims exists on disk. Red run first, each failure fixed in the same commit.
- The two intentional sweep-verdict changes are pre-recorded in both
baselines:
theme_debug_enableOK→REJECTED (the honest refusal) andsync_media_filesOK→BLOCKED (a fresh runner has no synthesized source directory; it now says so). The other 26 tools in those two modules hold their verdicts, predicted offline with the harness's own synthesize/classify.
Documentation¶
- The tool-docs status column labels offline coverage honestly
(
🧪 unitvs❔ no offline tests); all 414 tools' rows regenerated — module, theme and migration writers now carry the unit badge.
[0.3.4] - 2026-10-20¶
Added¶
- Dynamic client registration (
POST /register, advertised asregistration_endpoint): an MCP client can now complete the whole flow over a live socket — discovery → registration → PKCE authorization → token exchange → authenticated call. Before this, the client registry could never be populated and/tokenrejected every client asinvalid_client, so no wire client could obtain a token at all. - Authorization codes expire ten minutes after issue (RFC 6749 §10.5), enforced by the token endpoint.
Fixed¶
load_authorization_code()andload_refresh_token()returned the raw dicts the tokens were stored in; the token handler reads.client_id,.expires_at,.redirect_uriand.code_challengeoff the result, so every over-the-wire exchange died onAttributeErrorand answered 500. Both loaders now return the models the SDK validates — the same failure shape as 0.3.2'sload_access_tokendict fix, the third in the family.- Both token exchanges only accepted raw strings (
str()on a pydantic model yields its repr), which worked for the unit tests and broke on the models the SDK hands over the wire; each now accepts either.
Documentation¶
- ADR 0005 records where MCP OAuth tokens are validated: the served authorization server is in-process, the credentials split between the guard's intent switch and the outbound client-credentials leg, and introspection / proxy delegation / JWT verification are the recorded options for Drupal-side identity.
- The README, configuration guide and migration guide now say what the
guard actually checks (
DRUPAL_OAUTH_CLIENT_ID), that MCP tokens are issued in-process rather than delegated to Drupal, and that self-service registration proves client-ness, not user identity.
Testing¶
- A real-socket test drives the installed console script through discovery, dynamic registration, PKCE authorize, exchange, an authenticated call, code replay and refresh; unit tests pin scope enforcement, the outbound client-credentials grant, and the model-not-dict loaders.
[0.3.3] - 2026-10-19¶
Security¶
- Refuse to start an
http,sseorstreamable-httptransport unless an OAuth client (DRUPAL_OAUTH_CLIENT_ID) is set. The tool surface executes drush, composer and shell commands, so an unauthenticated listener was remote code execution for anyone who could reach the bind address;MCP_ALLOW_INSECURE_HTTP=1opts back in deliberately. MCP_HOSTnow defaults to127.0.0.1instead of0.0.0.0: serving to the network should be a decision, not a default.
Added¶
DRUPAL_HTTP_RETRIES(default 2): idempotent GET requests retry transient failures — timeouts, connection resets, and 502/503/504 — with a short backoff, so one dropped read under host load no longer fails the tool outright. Mutations are never retried: a timed-out POST may already have landed, and re-issuing it could duplicate a node or double a deletion.DRUPAL_HTTP_TIMEOUT(60) andDRUSH_TIMEOUT(120) make the previously hardcoded request budgets configurable.
Testing¶
- A weekly and on-demand CI job (
.github/workflows/live-sweep.yml) provisions a fresh DDEV site, bootstraps it through the MCP tools, sweeps all 414 tools and gates the result withtests/live/compare_sweeps.py: DEAD or a baseline-OK tool turning REJECTED/UPSTREAM fails the run, while timing-only slips warn. The committed ddev baseline is now produced by that job on a pristine site, so the gate compares like with like. The job's first runs surfaced and fixed eight setup defects — swallowed ddev returncodes, an install gate that trusted the public URL and could re-runsite:installon a live site, a nested.ddev/config.yaml, a PSR-4 case bug, a missingcommerce_shippingrequire, and missing layout/paragraph fixtures among them. - CI matrix extended to Python 3.13 and 3.14, and all GitHub Actions bumped off the deprecated Node 20 runtime.
Documentation¶
docs/agents.mdand both READMEs referencedcontent_list, a tool that does not exist in the package — the documented spot check failed with "no such tool". Examples now uselist_vocabulariesandinventory_content_types, both verified against a live site.- Document the retry/timeout settings and the HTTP transport security posture ("Serving over HTTP" in the configuration guide).
[0.3.2] - 2026-10-18¶
Fixed¶
ddev_start,ddev_stop,ddev_exec,lando_start,lando_stopandlando_execacceptedproject_nameand then dropped it, so every call ran in the MCP server's own working directory —ddev_startagainst another site started the wrong project or failed. The parameter is now forwarded as the subprocess working directory, the directory semantics are documented, and a path that does not exist returns a clean error._path_map()cached an empty mapping when/jsonapiwas unreachable (JSON:API not enabled yet, or the server restarting), permanently degrading every bare-type lookup onto the shorthand path that core does not serve. Failures are now left uncached, so the next call recovers as soon as the resource index answers.lando_setupwrote a top-levelwebroot:key, which Lando 3 drops silently — the generated site then 404'd on every request. The docroot is now nested underconfig:, where Lando reads it.
Documentation¶
- Add a generated catalog of all 414 tools (
docs/tools/all.md): one page of per-module tables with each tool's description, drafted use case, example call, and per-environment live-verification badges (DDEV and Lando sweeps) plus unit-test coverage.scripts/generate_tool_docs.pybuilds it from the tool source, the hand-maintaineddocs/tools/_tool_overrides.yamland the sweep results, and CI fails when the page drifts from the code.
[0.3.1] - 2026-10-17¶
Fixed¶
- Make
uvx drupal-mcp-serveractually run the server. The package shipped only adrupal-mcpexecutable, and current uv refuses to guess when the tool name differs from the package name ("Useuvx --from drupal-mcp-server drupal-mcpinstead"), so the documented no-install command — including the PATH fallback the installer writes into client configs — failed to start. Adrupal-mcp-serverconsole-script alias now runs the same entry point, and the installer's fallback, help text, README and AI-agents guide name the unambiguousuvx --from drupal-mcp-server drupal-mcpform, which works on every uv version.
[0.3.0] - 2026-10-17¶
Added¶
- Wave 5 of the drupal-scout-mcp port — 2 local security tools
(414 total, 41 modules):
code_security_scanruns scout's zero-dependency pattern engine (XSS, SQL injection, command injection, path traversal, hardcoded secrets, access control, CSRF, deprecated API — 8 families, category/severity filters, per-finding file/line/ snippet/fix recommendation) with its Drupal-aware false-positive table (EntityQuery conditions, stream wrappers, escapeshellarg, example secrets, comment lines), so a site without PHPStan gets concrete findings; counts stay complete whenmax_findingstruncates the list.route_access_auditis the routing half of scout's anonymous-exploit scan done properly per route: every*.routing.ymlroute classified as anonymous / permission / role / entity / custom / a named underscore requirement / an alias (whose definition may live in a PHP route provider this YAML pass cannot read) / denied / missing, with its controller mapped to the declaring file. Targets confine to DRUPAL_ROOT and prune vendor, tests, and contrib from the default scan; symlinks are skipped. Two accuracy corrections over scout's registry:t(is a live D8+ function (scout flagged every translation call as a Drupal 7 leftover) and scout's CSRF$requestpattern was escaped so it could never match PHP. Scout'sverify_vulnerabilitywas not ported — it returns static advice rather than site-specific data — and the optional tree-sitter AST layer is skipped: the pattern pass carries the signal. Live testing on D11.4.10's core node module (115 files) caught five accuracy bugs before release: JS template literals matched the PHP backtick-shell pattern, Drupal's{table}/->...Table()placeholder concatenation read as SQL injection, unrecognized underscore requirements and alias-only entries were both reported as missing access (node went from five "missing" routes to zero real ones), and a zero-file scan read as a clean bill of health. - Wave 4 of the drupal-scout-mcp port — 8 read-only theme analysis tools
(412 total, 41 modules):
theme_active(default/admin/enabled themes fromsystem.theme+pm:list),theme_info(pm:list metadata merged with a safe YAML parse of the theme's info.yml — regions in declaration order, libraries, dependencies, and the base-theme chain followed upward),theme_regions(regions with their block placements and counts, empty regions visible, placements in regions the theme no longer defines flagged),theme_blocks(everyblock.block.*placement with theme/region/search filters — search matches labels and plugins, folding scout's separatesearch_blocksinto one tool),theme_templates(pruned*.html.twigwalk with sizes),theme_template_overrides(one docroot-wide index splits templates that shadow same-named core/module files from theme originals),template_suggestions(the Twig suggestion chain per entity type, each marked with whether the default theme already ships that file), andview_template_info(the chain for a view display, looked up in the JSON:API view collection by its machine id — Views config names differ between Drupal generations,view.*on older sites andviews.view.*on Drupal 11.4+, so the entity collection is the stable source — with an unknown display_id erroring with the display list and an unknown view listing the ones the site has). Every file path resolves inside DRUPAL_ROOT before a read — symlinks and..segments that leave the docroot are rejected — and no caller input reaches a shell; theme blocks come from JSON:API rather than scout's interpolateddrush ev - The shared JSON:API helpers (
jsonapi_collect,jsonapi_attrs,jsonapi_bundle,jsonapi_rel_ids),flag_label, and the export path/write helpers moved from the exports module into_utilsso both waves page collections and confine destinations the same way - Wave 3 of the drupal-scout-mcp port — 4 export tools (404 total, 40
modules):
export_nodes,export_users,export_media,export_taxonomywrite CSV (UTF-8 with BOM) or Excel files (openpyxl, new runtime dependency) and return only the path, row/column counts, size, and a three-row preview. Destination paths are confined to the Drupal root, the system temp directory, or the home directory; data is paged per bundle over JSON:API (never through the shared merged offset, which skips rows), and taxonomy usage counts come from one validatedGROUP BYquery per field storage targeting taxonomy terms, with unreadable tables reported in a note instead of failing the export (and asafe_to_deleteverdict withheld entirely whenever the counts are incomplete). Entries with no internal id — Drupal's uid-0 anonymous user serves only a display_name — are skipped and counted asskipped_without_id, and an unreadable status stays empty in the CSV rather than being presented as "blocked" sql_output/sql_rowsmoved from the analysis module into_utilsso the export tools parsedrush sql:querytext the same way- Wave 2 of the drupal-scout-mcp port — 8 tools (400 total, 39 modules):
- Status section (4):
status_report(drush core:requirements, severity filter),database_updates(read-only pending DB updates),available_updates(composer outdated with dev filtering and a security-only mode intersected with composer audit),health_check(Drush, database, JSON:API, and module probes with a fix per failure) - Analysis:
find_entity_references(bundles whose reference fields target an entity type, via JSON:API field config),search_entities(escaped LIKE search across six entity tables),find_entity_by_path(route or path-alias resolution to an entity) - Config:
config_status(read-only active vs sync comparison) run_composergained atailargument so tools that parse full JSON documents (composer outdated) are not truncated
[0.2.0] - 2026-10-16¶
Security¶
- Fix command injection vulnerabilities in code audit and security audit tools
- Fix SQL injection in database query tools
- Fix path traversal in media upload tool
- Add input validation for URLs, queue names, and file paths
- Add authentication check to /mcp/tools/list endpoint
Added¶
- Add
drupal-mcp install, a self-installer that registers the server with local MCP clients (Claude Code, Claude Desktop, Cursor, Codex CLI, OpenCode, Windsurf, Pi, Hermes Agent, OpenClaw), with--print/--jsonfor scripted setup and an AI Coding Agents guide - Add
module_issues_search,module_popular, andmodule_recommendation(client-side issue-queue relevance scoring, usage-ranked module lists by category, local-index + drupal.org recommendations), plus theDRUPAL_ROOTandDRUPAL_MODULES_PATHsettings for local codebase analysis - Add a local codebase index with 12
codebase_*tools: functionality search, module inventory/descriptions, unused and redundant module detection, hook implementation lookup, and safe module file/tree/function reading (all reads confined toDRUPAL_ROOT) - Add
moderation_transition_delete, givingmoderation_transition_createthe counterpart it never had. The tool count is now 367 - Add Lando support to SiteManager
- Add subprocess timeout to DrushClient
- Add OAuth token fetching to AuthManager
- Create shared tools/_utils.py with ensure_dict, validate_pagination, build_pagination_params
- Add pagination validation to list tools
- Add input validation to accessibility and performance tools
- Add LICENSE, CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md
- Add GitHub issue and PR templates
Changed¶
- Correct what the sweep asks for, not just how it reads the answer. Every
parameter ending in
idhad been answered with the fixture node's id, soview_id,menu_id,webform_idand eighty-odd others were all sent one node number and answered a lookup miss: 84 of 174 refusals in the run before this were the harness asking the wrong question, not tools refusing, and a miss says nothing about whether a tool works. Of 367 tools, 192 declare no id-shaped parameter, 93 read-only ones now get a real id for their own resource — with the tool's own name deciding where one parameter covers several, sinceconfig_idis a field config, a metatag config or a search index depending on who is asking — and 82 mutating ones deliberately keep junk ids, becauseviews_updatewith a real view id would save the view back with the harness's synthesised arguments and every laterviews_executewould then run against a view this run broke. The remaining 8 read-only tools keep junk because the site has no such entity to name. The fixture node also re-checks and re-provisions itself:delete_noderuns mid-sweep and took the node with it, which alone 404'drevision_list,revision_get,revision_revert,revision_diff,translation_status,translation_add,moderation_transition_execute,layout_builder_override_removeandaccessibility_aria_validate - Keep
feeds_log_listan explicit refusal rather than implement it. Feeds 3.x has no log table, nofeeds*service and no log entity to read, so there is nothing behind it to query; the tool namesimports_import_status, which does answer, instead of returning an empty list that would read as "no log entries" -
Definitive full re-sweep (OK 195 / REJECTED 156 / BLOCKED 7 / UPSTREAM 4 / DEAD 0 / SKIPPED 5, 367 total); no tool that used to work regressed and nothing is dead. Harness follow-up fixes (
entity_idand revision-id handling) pushed six more tools past their lookup so they reach their own logic, where they report honestly. -
Re-sweep all 366 tools against the provisioned site. BLOCKED fell from 71 to 5, OK rose from 156 to 181, and nothing is dead. 25 tools that could not be reached at all now run; 41 reach Drupal and are turned away with a reason instead of stopping at a 404. The five still BLOCKED are two
feeds_feedtools needing a feed type with afeeds_itemfield, twomoderation_statetools for a resource Drupal never exposes, andsplit_configneeding a./config/syncdirectory. The one UPSTREAM isrevision_delete, since JSON:API has no revision collection endpoint - Correct the sweep's own accounting. Six tools —
translation_add,translation_update, the threeinterface_translation_*tools andconfig_translation_add— were reported OK on every run while never being called once. When arguments fail FastMCP's validation the answer is prose rather than JSON, and nothing in the classifier matched it, so the fall-through said pass; the server loggedmissing_argumentfor each and the report showed a green result. A refused call now counts as refused, through the SDK's ownisErrorsignal rather than a guess at wording. The sweep also stopped fillinglangcodewith a junk value (JSON:API write-protects that field on a multilingual site whatever it says, socreate_termanswered 403 about a permission instead of running), started givingddev_execa command the container has, gavedrush_watchdogthe enum and the number drush wants, and names a queue that exists - Provision the live test site with the modules the tools assume are there: media, comment, contact, language, config_translation, workflows, content_moderation and commerce plus its submodules from core and contrib, and token, pathauto, redirect, metatag, paragraphs, search_api, facets, webform, feeds and graphql from drupal.org, with phpstan, drupal-check, phpcodesniffer and coder for the code-quality tools. Drupal's entity types went from 26 to 78 and the JSON:API index from 27 resources to 76, which turned most of the sweep's BLOCKED bucket into a real verdict. The site is also multilingual now -- English and French -- because a single-language site cannot exercise translation behaviour, and that is what surfaced the langcode bug below
-
Add three live suites.
tests/live/install_modules.pyprovisions the modules the sweep needs using the server's owncomposer_requireanddrush_commandtools, so bootstrapping the site is also a test of them;resource_check.pyasks Drupal for the entity types it knows and flags any resource name our tools ask for that cannot exist, which is how theviews_viewandmoderation_statebugs were found;mcp_call.pyis a one-call driver for operating the site through the server instead of a shell -
Gate CI coverage on the code testable offline (non-tool core ≥70%) instead of the total: 86% of statements live in the tool modules, which only a live sweep can exercise, so a single total threshold is unreachable by construction.
coverage.xmlis now actually generated, which the Codecov step already required withfail_ci_if_error: true - Extend
layout_builder_override_removewith an optionalentity_id, since an override belongs to an entity and the old signature could never name one - Document what live testing found, and how a failure arrives, in
tests/live/README.mdand the README's Development section - Extract _ensure_dict from 35+ tool modules into shared utility
- Remove duplicate service implementations (ai.py, migration.py, site.py)
- Clean up unused imports across all tool modules
- Update ARTIFACT.md to reflect actual project state
Fixed¶
- Make an issued OAuth token worth issuing. HTTP transport with OAuth enabled
refused everyone:
load_access_tokenreturned the dict the token was stored in where the declared type is FastMCP'sAccessToken, so the first thing the bearer middleware did with a good token --auth_info.expires_at-- raisedAttributeError: 'dict' object has no attribute 'expires_at'and the request was refused exactly as a forged one would be. That made the defect invisible by construction, because the fail-closed path and the fail-for-everyone path are the same 401: the only OAuth behaviour anyone had ever observed was the reassuring one, and the 401 that read as security working was also masking an unusable transport.expires_atwas stored as a float fromtime.time()whileAccessToken.expires_atis an int, so pydantic would have refused it regardless. Verified three ways -- unit tests over authorize/exchange/load, an ASGI test against FastMCP's real HTTP app (401 unauthenticated, 200 for the issued token, 401 for a forged one), and a replay of the old implementation that reproduces the AttributeError - Implement twelve tools that refused or had never been written. The five
moderation_transition_*tools all read$wf->get("transitions"), a key the workflow entity has never had — transitions live onWorkflow::getTypePlugin()->getTransitions()— solistansweredcount: 0against a five-transition workflow, which reads as a pass because an empty list is not an error,getreported "No transition with id 7" for a transition present by name, andexecute,createand the newdeletewere unreachable behind the same mistake. The fourinterface_translation_*tools readTranslationString::getLanguage()andgetTranslation(), methods that class does not have; they now go throughlocale.storage, and a live round trip verified the list (13666 French rows, with search and context filters), add, update and delete, including a source string carrying a non-ASCII character and a$. Writing a translation also dispatchesLocaleEvents::SAVE_TRANSLATIONthrough_locale_refresh_translations(), which invalidates thelocalecache tag everyLocaleLookuprow depends on —invalidateByPrefixandcache_clear_alldo not exist in Drupal 11. The threewebform_handler_*tools answeredabsent_entitybecause they had never been written; they now useplugin.manager.webform.handlerwithWebform::addWebformHandler/updateWebformHandler/deleteWebformHandler, takewebform_idto disambiguate a handler id that is unique per webform rather than site-wide, replace configuration keys whole so omitted ones keep their current values, and locate handlers throughgetHandlers()->getInstanceIds()instead ofWebform::getHandler(), which throwsPluginNotFoundExceptionfor an unseen id rather than returning NULL. Acontactform started this with two handlers and ended with two after a full create/update/delete — the point of a round trip - Hand structured values to
php:evalas base64 rather than as JSON, which is not PHP: it emits\uXXXXand PHP has no such escape, so non-ASCII mangles silently;$interpolates into the code; and{"k":1}is a parse error._utils.php_text()andphp_json()carry a string asbase64_decode(...)and an array asjson_decode(base64_decode(...), TRUE) - Stop chasing the login redirect to a URL the site invented. Drupal answers a
good login with 303 to the account page, built from the scheme and host it
saw the request arrive on, so when the site reported itself as plain
httpwhile the client was on HTTPS the redirect was fetched as HTTP against a TLS port, nginx answered 400, and the session cookie that same response had just issued was discarded — leaving only a startup warning. Every write then fell back to basic auth, which Drupal's mutating endpoints reject, on any site whose self-issued URL disagrees with the client's behind a proxy or a misconfigured base_url. The POST is no longer followed, because only its status and its cookie were ever wanted; bad credentials still fail, since Drupal refuses them with 200 and no cookie - Make the sweep follow the site's links on the origin it was given. Drupal
answers
http://when reached through a port-mapped HTTPS endpoint, and the harness followed those verbatim — plain HTTP to a TLS listener, which nginx refuses with 400 — so a whole run died before calling a single tool.filter_check.pyhardcoded its base URL while every other live script honoursDRUPAL_BASE_URL, so it could not be pointed at all - Ask whether a node exists in a way JSON:API can answer. The check built the
resource name into the path (
/jsonapi/node--article/7, where the resource lives at/jsonapi/node/article) and asked for an internal id where rows are addressed by uuid, so it 404'd for nodes that exist and reported every fixture as gone — which would have had the harness re-provisioning on every check instead of only whendelete_noderemoved one - Make three tools answer with the reason instead of a bare error.
views_executecould never have run: it asked for aviews.viewsservice that does not exist (the executable is built from the view's config entity byviews.executable), read the row's entity through a magic property thatisset()always reports as absent, and took no care over the display. It now loads the view, checks the display against the ones the view actually has -- reporting the rest when the caller's is wrong -- and reads_entity.graphql_queryandgraphql_schema_getreturned a raw 404 whenever the site had no GraphQL server, which is the state a plain install leaves it in, since the module ships no default; they now say that, and name the config entity and the permission that fix it.paragraphs_item_listreturned a bare 404 for a bundle that does not exist, which reads as "paragraphs are missing" rather than "that type is not configured here"; it now lists the types the site does have - Fix eleven hard-coded JSON:API filters that Drupal rejected outright, each
returning an empty result on every call on every site.
commerce_product,commerce_promotionandcommerce_shipping_methodfiltered onstorewhere the field is the pluralstores, andcommerce_orderonstorewhere it is thestore_idreference; all four needed the.idspecifier that entity references require.webform_submissionfiltered onwebformwhere the field iswebform_id, also a reference.paragraphs_item_listfiltered onparagraphs_type, which is not a field at all -- a paragraph's type is its bundle, so it now addressesparagraph--{type}.pathauto_pattern_listfiltered onentity_typeandbundle, which live in a pattern's id as{entity_type}--{bundle}, so it now filters onidwhen it has both.comments_thread_listfiltered onpidfor top-level comments, butpidis a reference to the parent comment, so it 400'd -- andpid.id = 0would have returned nothing, since no comment has id 0; the whole thread is returned now, with each row'spidavailable for building the tree.facets_facet_listfiltered onindex, but a facet attaches to a facet source rather than to an index, so it lists facets and reports theirfacet_source_id - Stop sending
langcode: "en"in create payloads. Four tools did this. It is harmless on a single-language site, but once a second language exists the field is writable only with translation permission, so every create failed 403 "the current user is not allowed to POST the selected field (langcode)" -- including an ordinary authenticated user creating a term in the site's own language. The field is now sent only when the caller asks for a language - Fix
drush_commandoption rendering, which made every confirmation-answering call fail. Boolean options were emitted as--key=value, but drush flags take no value, sooptions={"yes": True}-- the documented way to install a module -- was rejected with "The --yes option does not accept a value" and nothing was installed while the tool reported success. AFalsewas worse: it emitted the bare flag, so asking not to confirm silently suppressed confirmation on destructive commands. Zero-valued options were also mangled,--count=0becoming a bare--count. Booleans are now bare flags,Falseomits the option, and everything else keeps its value - Return an
errorfromdrush_commandwhen Drush exits non-zero. It handed back the raw result with noerrorkey, so the generic escape hatch -- the tool an agent reaches for first -- still presented a failed command as an empty success, even thoughensure_dictalready fixed this for the 224 specialised call sites - Split several packages in
composer_require. They arrived as one argv token, so composer readdrupal/pathautoas a version constraint ondrupal/tokenand refused the whole request with "Could not parse version constraint" - Ask for
view, notviews_view: the entity type has beenviewsince Drupal 8, so all six views tools 404'd on a site with Views installed and healthy, and read as "module not installed" - Ask for
content_moderation_state, notmoderation_state, in the moderation tools. The node field is still calledmoderation_stateand is unchanged - Ask for
facets_facet, notsearch_api_facet, in the facet tools - Rewrite
config_translation_listandconfig_translation_add, which targeted three mechanisms that do not exist between them: aconfig_translationJSON:API resource, aconfig:translation:addDrush command (Drush has no translation command category at all), and$entity->addTranslation()on a config entity, which implements noTranslatableInterface. The list reports the mappers this site has. The add resolves{entity_type}/{entity_id}through the config translation mapper to the config object the entity is stored as --node_typeandarticlebecomenode.type.article-- and writes a language config override for the target language, which is where Drupal keeps config translations. Verified live: the Frenchnameanddescriptionland on the override while the base config keeps its own -
Drop a dead
get_resource("jsonapi")call fromnextjs_helpers_generate. It requested/jsonapi/jsonapi, a path that does not exist, and the 404 aborted the whole tool for a value the generator never used -
Implement the six
layout_builder_*tools against the real API; they asked JSON:API for a resource that has never existed and returned an opaque 404 on every call, so reading, writing and reverting layouts now go through Drush toentity_view_displayandOverridesSectionStorage - Fix
DrushClient._flattenshlex-splitting list arguments, which madedb_tables,db_query,db_count,drush_php_evaland everyevtool fail with "Too many arguments" - Report a failed Drush run as an
error:ensure_dictpassed{returncode: 1, data: {}, stderr}through untouched, byte for byte an empty success, so 224 call sites presented broken commands as empty results - Return real tool schemas from
/mcp/tools/list, which reportedinput_schema: {}for all 366 tools - Fix
cron_list(called Drupal 7'sdrupal_get_cron_jobs(), removed in Drupal 8),queue_create(a shell escape in PHP that never passes through a shell, so PHP died with a ParseError) andqueue_delete(a second argument on all three paths whenqueue:deleteaccepts exactly one) - Route
queue_createandqueue_deletearounddrush queue:delete, which resolves only registered queue services and answered "Queue not found" for a queue this server had just created - Fix
permission_auditandmenu_link_listfiltering on fields Drupal does not expose (filter[name]onuser_role,filter[menu]onmenu_link_content), a 400 on every call on every site - Validate whole statements in
db_query; aSELECT 1; DROP TABLE xpassed thestartswith("SELECT")guard and dropped the table - Stop stacking log handlers on repeated
setup_loggingcalls
Removed¶
- Remove dead register_all_tools function from tools/init.py
- Remove duplicate _find_tool_path definition in security_audit.py
[0.1.0] - 2026-10-13¶
Added¶
- Initial release with 35+ MCP tools across all major Drupal categories
- FastMCP server with stdio and HTTP transports
- JSON:API and GraphQL clients with authentication
- Drush command execution via subprocess
- Multi-provider AI support (Ollama, OpenAI, Anthropic, NVIDIA NIM)
- Content management, user management, taxonomy, views, paragraphs tools
- DevOps tools for DDEV/Lando, Composer, database queries
- Migration tools for D7 to D10 upgrades
- Security audit and code quality tools