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 connects Drupal to AI assistants (Claude, Cursor, Windsurf) via the Model Context Protocol. Describe what you want in plain English — the AI handles the Drupal work.
Example
You: "Create a blog with articles, categories, tags, and an editor role"
AI: Creates the content type, taxonomies, fields, role, and permissionsQuick Start
- Install:
composer require drupal/mcp_tools
drush en mcp_tools -y - Configure: Visit
/admin/config/services/mcp-toolsand 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
- Connect your AI tool: See transport options below
Option A: STDIO Transport (Recommended for Local)
Enable the STDIO module:
drush en mcp_tools_stdio -y
Generate config automatically:
drush mcp-tools:client-config > .mcp.json
Detects DDEV/Lando environments and outputs ready-to-use config. Use --scope=read for read-only.
Claude Code (run from your Drupal directory):
cd /path/to/drupal
claude mcp add --scope project drupal -- drush mcp-tools:serve --quiet --uid=1 --scope=read,writeOr add .mcp.json to your Drupal project root:
{
"mcpServers": {
"drupal": {
"command": "drush",
"args": ["mcp-tools:serve", "--quiet", "--uid=1", "--scope=read,write"]
}
}
}Option B: HTTP Transport (Remote/Docker)
Enable the remote module:
drush en mcp_tools_remote -y
Configure execution user: Visit /admin/config/services/mcp-tools/remote
- Quick setup: Check "Use site admin (uid 1)" — simple for development
- Production: Click "Create MCP Executor Account" for a dedicated service account
Generate an API key:
drush mcp-tools:remote-key-create --label="Claude" --scopes=read,write
Copy the key shown (it's only displayed once).
Claude Code one-liner:
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 via drush mcp-tools:remote-key-list.
What's Included
222 tools across 35 optional submodules:
- Site Building: Content types, fields, taxonomies, roles, permissions, menus
- Content: Create/edit/publish nodes, media, bulk operations
- Views & Layout: Views, blocks, Layout Builder, image styles
- Admin: Cache, cron, config management, security audits
Security
- Scoped access (read/write/admin per connection)
- Read-only and config-only modes
- Rate limiting and audit logging
- Route-level access control on the remote endpoint
- Designed for local development — remote access is optional
Requirements
- Drupal 10.3+, 11, or 12
- Tool API module
- PHP 8.3+