Configure Drupal MCP with Claude Desktop

The Drupal MCP module allows Claude Desktop to interact directly with your Drupal site. With MCP enabled, Claude Desktop can perform actions such as creating content, managing configuration, interacting with fields, using selected Drush commands, and running custom MCP plugins. This guide shows how to install MCP, enable plugins, set up a secure MCP user, and connect Claude Desktop through the STDIO transport.

Install and Enable the MCP Module

Run the following in your existing Drupal project:

composer require drupal/mcp
drush en mcp -y

MCP uses plugins to define available features. The core module provides the protocol. Plugins expose actions and tools that Claude Desktop can use.

Optional submodules

  • mcp_extra integrates with the Drupal AI module
  • mcp_dev_tools exposes selected Drush commands

Enable as needed:

drush en mcp_extra -y
drush en mcp_dev_tools -y

If you enable mcp_extra, install and enable the Drupal AI module.

Configure the MCP Server

  • Open the MCP settings page: /admin/config/mcp

You can enable authentication, select which plugins will be active, choose content types to expose, and configure permissions.

Create a dedicated MCP user

For security, create a new Drupal user for Claude Desktop. For example, mcp_admin.

Grant only:

  • Use MCP server

Use this account for all MCP authentication.

Connecting Drupal MCP to Claude Desktop

Claude Desktop communicates with Drupal MCP using the STDIO transport. This requires running the official MCP companion server inside a Docker container.

You will need Docker Desktop, Colima, or any Docker-compatible runtime. Claude Desktop will launch the container each time it connects.

Below is the recommended configuration block for Claude Desktop. It goes into the file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json

For this example, if the URL to your Drupal site http://drupal-mcp.ddev.site.

Claude Desktop MCP configuration:

{
  "mcpServers": {
    "mcp-server-drupal": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "DRUPAL_AUTH_USER={{MCP_USER}}",
        "-e", "DRUPAL_AUTH_PASSWORD={{PASSWORD}}",
        "--network=host", "ghcr.io/omedia/mcp-server-drupal:latest",
        "--drupal-url=http://drupal-mcp.ddev.site",
        "--unsafe-net"
      ],
      "env": {
        "DRUPAL_AUTH_USER": "{{MCP_USER}}",
        "DRUPAL_AUTH_PASSWORD": "{{PASSWORD}}"
      }
    }
  }
}

Save the file, then quit and reopen Claude Desktop. Your Drupal MCP server will appear in the list of connected servers if the configuration is correct.

What You Can Do With Claude Desktop and Drupal MCP

After connecting, Claude Desktop can interact with your site in powerful ways, such as:

  • Creating and updating content
  • Managing fields and content types
  • Configuring blocks and view displays
  • Exporting and importing configuration
  • Running controlled Drush commands when mcp_dev_tools is enabled
  • Using your own MCP plugins for custom workflows

This provides a streamlined, AI-assisted workflow that can handle repeatable tasks and complex Drupal operations.