Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

MCP Tools

No security coverage Under active development 467 sites

Part of the MCP ecosystem · 13 projects

MCP Tools connects Drupal to AI assistants like Claude, allowing you to describe desired changes in plain English. The AI then automatically creates content types, fields, roles, and other Drupal configurations based on your requests. It offers different security modes for development, staging, and production environments.

MCP Tools lets an AI assistant work on your Drupal site. It can read the site, build content types, fields and views, and edit content.

It speaks the Model Context Protocol (MCP), an open standard. So it is not tied to one assistant or one model: any MCP client can connect, with a model in the cloud or one on your own machine.

Example

You: "Create a blog with articles, categories, tags, and an editor role"
AI:  Creates the content type, taxonomies, fields, role, and permissions

What you get

  • 245 tools for site building and content, in the base module and 33 optional submodules. They are Tool API plugins.
  • Its own MCP server. STDIO through Drush for local work, and HTTP with API keys for a remote site. On Drupal 10, 11 and 12, with no other server module.
  • Any client, any model. We tried it with Claude Code, Codex CLI, fast-agent, Goose and OpenCode, and with models that run on one graphics card. See "Clients and models we tried" below.
  • Safety rules around every call. You decide what a connection may do. See "Safety" below.
  • Small on tokens. Big lists say each thing once, and the model can ask for just a slice. On a site with 87 modules the permissions list is 31,713 characters, down from 43,302, and 1,181 for a search. A search result gives each tool's first sentence and the sentences that name its inputs or other tools: with gpt-oss:20b that used 13 to 18% fewer prompt tokens on our 12 plain tasks, with the same tasks done, and on 12 harder tasks the difference stayed within the runs' own spread. In gateway or grow mode the model sees a few tools, not every one.

Pick your path

You do not need all of it. Enable only what you use: no other submodule turns on with it. (mcp_tools itself needs Tool API, Database Logging and Update Manager.)

  • MCP Tools' own MCP server, with tools (Drupal 10, 11 and 12): mcp_tools, mcp_tools_stdio (or mcp_tools_remote for HTTP), and the tool submodules you need. See Quick Start below.
  • A third-party integration: MCP Server 2.x takes the connections, with our rules on its endpoint: mcp_tools and mcp_tools_policy. Pick the tools in the bridge's settings.
  • Tools for Drupal AI agents: mcp_tools and mcp_tools_ai.
  • The tools in ECA or your own code: mcp_tools and the tool submodules. No server needed.

MCP Tools' own server runs on Drupal 10, 11 and 12. It needs no other server module. On Drupal 12 it needs the Tool API patch of the Drupal 12 section below until Tool API allows Drupal 12. STDIO and HTTP passed there with the official JavaScript and Python clients.

mcp_tools_policy is a third-party integration: when MCP Server takes the connections, it puts our rules in front of that server's endpoint. It runs wherever MCP Server and its bridge run. The server submodules (STDIO, HTTP, OAuth, policy, Drupal AI) are marked experimental in Drupal for now.

Quick Start

  1. Install:

    composer require drupal/mcp_tools

    drush en mcp_tools -y
  2. Configure: Visit /admin/config/services/mcp-tools and choose a preset:
    • Development: Full access, no rate limiting
    • Staging: Config-only mode, rate limited, audit logging
    • Production: Read-only mode, strict limits, full audit trail
  3. Enable the submodules you need, for example:

    drush en mcp_tools_content mcp_tools_structure mcp_tools_views -y
  4. Connect your AI tool: see the two options below.

Option A: STDIO (for local work)

Enable the STDIO module:

drush en mcp_tools_stdio -y

Generate the client config:

drush mcp-tools:client-config > .mcp.json

It detects DDEV and Lando. Use --scope=read for a read-only connection.

Most clients read .mcp.json in your Drupal project root:

{
  "mcpServers": {
    "drupal": {
      "command": "drush",
      "args": ["mcp-tools:serve", "--quiet", "--uid=1", "--scope=read,write"]
    }
  }
}

Claude Code (run from your Drupal directory):

claude mcp add --scope project drupal -- drush mcp-tools:serve --quiet --uid=1 --scope=read,write

Codex CLI:

codex mcp add drupal -- /path/to/drupal/vendor/bin/drush --root=/path/to/drupal mcp-tools:serve --quiet --uid=1 --scope=read,write

Option B: HTTP (for a remote site or Docker)

Enable the remote module:

drush en mcp_tools_remote -y

Choose the user the tools run as: visit /admin/config/services/mcp-tools/remote

  • Local: check "Use site admin (uid 1)"
  • Anywhere else: click "Create MCP Executor Account" for a user of its own

Create an API key: on the same page, under "Make a key". The page shows the key once, with the Claude Code command and the .mcp.json entry to copy. Or with drush:

drush mcp-tools:remote-key-create --label="Claude" --scopes=read,write

Copy the key. It is shown once.

Claude Code:

claude mcp add drupal http://localhost:8080/_mcp_tools --transport http -H "Authorization: Bearer YOUR_API_KEY"

Or add to .mcp.json:

{
  "mcpServers": {
    "drupal": {
      "type": "http",
      "url": "http://localhost:8080/_mcp_tools",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Manage keys at /admin/config/services/mcp-tools/remote or with drush mcp-tools:remote-key-list.

Clients and models we tried

The server does not know or care which model is on the other end. This is what we ran ourselves:

  • Clients: Claude Code, Codex CLI, fast-agent, Goose and OpenCode. The official MCP clients for JavaScript and Python run before each release.
  • Models on your own machine: with 1.0.0-beta22, seven models that fit one graphics card, four runs each of twelve site tasks. qwen3.8:27b, qwen3.6:27b and gemma4:31b did all twelve in every run. mimo-v2.6:9b did 11 or 12, flint:40b 10 to 12, muse-glimmer:30b 8 to 12, and nemotron-3.5-lightning:30b 8 or 9. gpt-oss:20b did 119 of 120 in ten runs (Ollama 0.40.17, an RTX 5090, our small test client).
  • Inside the site: through Drupal AI and the mcp_tools_ai submodule (experimental).

For a local model, start the server in gateway mode: add --gateway to drush mcp-tools:serve. The model then sees three tools (find, describe, run) and not the whole list, which fits a small context. The size of the model matters: a smaller one, qwen3:8b, did five or six of the twelve when we tried it with 1.0.0-beta19. The client docs have the numbers per model and per client.

Other ways to use the tools

The tools are plain Tool API plugins, so you do not need our server to use them. Two other paths are tested before each release:

What the tools cover

  • Site building: content types, fields, taxonomies, roles, permissions, menus
  • Content: create, edit and publish content and media, also in bulk
  • Translations: read translatable content in order, create linked translations, update one language. Paragraphs are included.
  • Views and layout: views, blocks, Layout Builder, image styles
  • Admin: cache, cron, configuration, site status and security updates
  • Import: content, terms and redirects on Drupal Migrate. Run an import again and it updates, with no copies. Plan it first, run big ones in parts, and undo one import. A whole term tree goes in one call.

Safety

  • Scopes: each connection is read, write or admin. A new site gives a connection read, and allows read and write at most.
  • An honest tool list: a connection is only shown the tools it may call.
  • Read-only mode and config-only mode for the whole site
  • Write limits per minute and per hour. A batch or an import counts each item.
  • An audit log of writes, with secrets taken out
  • Checked input: arguments a tool does not know are refused, not dropped. A list or an object a tool cannot use is refused with what it takes. A redirect or a menu link to a path where nothing is comes with a warning.
  • You are asked first, in clients that can ask: before a destructive tool, before a permission for trusted roles only is granted, and before a recipe that an agent wrote is applied. Where nobody can be asked, a new site refuses such a call.
  • Protected: user 1, administrators and administrator roles, system menus and core views
  • No raising itself: a connection cannot grant the permissions of MCP Tools, and cannot give its own user more permissions.
  • On every way in: our tools refuse a strong call nobody said yes to when the caller is not a person, also when they are called through MCP Server or another module's agent.
  • Tools of other modules too: with "all tools" on, the server holds any module's Tool API tools to the same scopes, modes, limits and audit log. You pick which modules on the settings page.

Outside local development, give the tools a user of their own, not user 1.

If you serve tools through MCP Server, the optional mcp_tools_policy submodule (experimental) puts the same rules in front of its HTTP endpoint.

State

Beta. Before each release every tool is called on a test site. The release is tested on Drupal 10.6, 11.4 and 11.5 beta, PHP 8.3 to 8.5, with SQLite, MySQL, MariaDB and PostgreSQL, and with the official MCP clients for JavaScript and Python. On Drupal 12.0.0-rc1, with the patch below, our unit and kernel tests pass before each release, and our server passed its end-to-end checks with the official JavaScript and Python clients. Not yet: every tool on Drupal 12, and the submodules whose module has no Drupal 12 release (below).

Where it is going

More Drupal modules now ship their own Tool API tools. So MCP Tools is growing from a set of tools into a runtime: the place that runs any module's tools safely for an AI assistant, with the same rules whatever the way in. We keep supporting our own MCP server, and the tools keep working through MCP Server.

Requirements

  • Drupal 10.5+, 11 or 12. Drupal 12 needs a patch of Tool API for now (below).
  • Tool API module
  • PHP 8.3+
  • Install with Composer: it brings the MCP PHP SDK.
  • For the import (MCP Tools - Migration) only: Migrate Plus.

Drupal 12

MCP Tools and its own server run on Drupal 12. Some submodules are third-party integrations with a module that does not allow Drupal 12 yet (checked 2026-11-28). They can be enabled there once it does: mcp_tools_paragraphs (Paragraphs), mcp_tools_metatag (Metatag), mcp_tools_webform (Webform), mcp_tools_redirect (Redirect), mcp_tools_scheduler (Scheduler), mcp_tools_sitemap (Simple XML Sitemap), mcp_tools_ultimate_cron (Ultimate Cron), mcp_tools_entity_clone (Entity Clone), mcp_tools_oauth (Simple OAuth), mcp_tools_mcp_server and mcp_tools_policy (MCP Server).

Tool API 1.0.0-beta12 does not allow Drupal 12 yet. Until a Tool API release does, two Composer plugins and a small patch make it install. The patch is the code part of Tool API's own Drupal 12 merge request (!260, issue #3582946), fitted to beta12. We made it and test it; Tool API did not.

composer config allow-plugins.mglaman/composer-drupal-lenient true
composer config allow-plugins.cweagans/composer-patches true
composer require mglaman/composer-drupal-lenient cweagans/composer-patches
composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/tool"]'
mkdir -p patches
curl -fL -o patches/tool-drupal-12.patch https://raw.githubusercontent.com/code-wheel/mcp-tools/1.0.0-beta33/docs/patches/tool-1.0.0-beta12-drupal-12.patch
composer config --merge --json extra.patches '{"drupal/tool": {"Drupal 12": "patches/tool-drupal-12.patch"}}'
composer patches-relock
composer require drupal/tool:1.0.0-beta12 drupal/mcp_tools

Without patches-relock, composer-patches 2 installs Tool API unpatched. The patch fits beta12 only. When a Tool API release allows Drupal 12, remove the patch, the lenient entry and the pin.

For the Drupal AI submodule on Drupal 12: Drupal AI 1.6 or later, and its dependency field_validation let in the same way:

composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/field_validation"]'
composer require drupal/ai:^1.6@beta

Links

GitHub ·
Client Integrations ·
Tool Examples ·
Issue Queue

Ask your assistant about MCP Tools

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
44
Tracked since
Jan 2026
Latest release
6 hours ago
Releases (12 mo)
44 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.0-beta1 Pre-release 10–11 Jan 10, 2026
1.0.0-alpha26 Pre-release 10–11 Jan 9, 2026
1.0.0-alpha24 Pre-release 10–11 Jan 8, 2026
1.0.0-alpha23 Pre-release 10–11 Jan 8, 2026
1.0.0-alpha21 Pre-release 10–11 Jan 7, 2026
1.0.0-alpha20 Pre-release 10–11 Jan 4, 2026
1.0.0-alpha18 Pre-release 10–11 Jan 4, 2026
1.0.0-alpha17 Pre-release 10–11 Jan 4, 2026
1.0.0-alpha16 Pre-release 10–11 Jan 4, 2026
1.0.0-alpha15 Pre-release 10–11 Jan 4, 2026