Turn Your Drupal Site Into an MCP Server

Post Date: 2026-02-01Author: George Bonnici
Turn Your Drupal Site Into an MCP Server

Turn Your Drupal Site Into an MCP Server

AI is changing how people interact with websites - search, content creation, page interactions are increasingly happening without touching an interface. One of the more interesting solutions emerging from this shift is MCP.

Model Context Protocol (MCP), introduced by Anthropic in late 2024, lets AI tools connect directly to external systems. Instead of scraping pages or pasting content into an AI tool, the tool can query and operate on your Drupal site directly.

At that point, Drupal stops being just the place you manage content. It becomes something AI tools can work with.

The CMS (and Drupal in this case) becomes the front door to how you and AI interact with your business. MCP exposes your CMS as a system that can be queried and acted on through plain language: content, configuration, even developer workflows.

"Create a new Article content type with title, body, and a taxonomy reference field called 'Category'."

That's no longer a ticket for your dev backlog. It's a request an AI assistant can carry out directly against your Drupal site - fields created, displays configured, no admin UI clicks required.

I've written before about Canvas for page building, AI Context, and practical AI quick wins. Those bring new capabilities into Drupal.

MCP does the opposite. It exposes Drupal's capabilities to the tools your team already uses.

With a handful of modules and about half an hour, you can do this on any Drupal 10 or 11 site. Here's what's actually going on, and why it's useful.


What MCP Actually Is

MCP solves a basic problem: AI tools don't know your data. They can't see your nodes, your taxonomies, your config, or your business rules. So every interaction turns into copy-paste, screenshots, or vague descriptions.

MCP defines a standard way for AI applications to talk to real systems. There are three moving parts:

  • Host - the AI application (Claude Desktop, Cursor, Claude Code)
  • Client - the MCP implementation inside the host
  • Server - your Drupal site

Once connected, the server can expose four kinds of things:

  • Resources - data the tool can read (nodes, terms, users, config)
  • Tools - actions it can perform (create content, update fields, run tasks)
  • Prompts - reusable instructions for common jobs
  • Sampling - tool-to-tool communication (still emerging)

The protocol itself isn't complicated. What matters is the result: the assistant stops guessing and starts working with live data.


What This Means in Practice

For different roles, MCP unlocks different things:

For content teams: Direct access to your content library through tools you already use. Ask questions, get answers from live data. No admin training, no ticket queues, no waiting for someone to run a report.

For developers: Configuration and content operations without context-switching. Create content types, add fields, clear caches - all from your editor.

For the organisation: Your content investment becomes more accessible. The structured data you've built in Drupal is now queryable by any MCP-compatible tool. As AI tooling matures, that value compounds.

A content manager using Claude Desktop can ask:

"What have we published about accessibility in the last three months?"

And get an answer pulled straight from Drupal.

A developer in Cursor can say:

"Add a meta description field to the Case Study content type."

And watch the config change land.

Drupal becomes a backend the tools can reason about and operate on.


Why Drupal Works Well Here

Some systems don't translate cleanly to MCP. Drupal does, largely because of how it's built.

Drupal's actually well-positioned here. Since Drupal 8, the platform leaned hard into structured data. What felt painful at the time now pays off - that structure is exactly what AI needs to work effectively.

Structured content - Drupal's entity and field system already enforces structure. Fields have types, validation, and relationships. When a tool asks for "products over $500", that's a real query against a real field - not a text scrape.

Permissions you already trust - Roles and permissions carry straight through. You can give read-only access, content editing access, or limited config access using the same permission model you already rely on.

Plugins everywhere - The MCP module uses Drupal's plugin system. Adding a new tool is usually a single PHP class. If you have custom business logic, you can expose it deliberately instead of hacking around APIs.

API foundations - JSON:API is in core. The MCP module builds on existing serialisation and access patterns rather than reinventing them.

An ecosystem that's actually moving - The MCP module (from Omedia) is security-covered and actively maintained. It's already running on hundreds of sites. This isn't a proof-of-concept - it's being used.

If you've been following Drupal's recent work around Canvas and AI Context, MCP is the missing external layer. The same structure that makes those tools useful inside Drupal is what makes your site usable from the outside.


Setting Up Drupal as an MCP Server

Prerequisites

  • Drupal 10 or 11
  • Composer
  • An MCP-compatible client (Claude Desktop, Claude Code, or Cursor)
  • DDEV recommended for local work

Step 1: Install the Module

composer require drupal/mcp
drush en mcp -y

This gives you the protocol layer. By default, it's read-only - nothing destructive is enabled out of the box.

Step 2: Enable Optional Submodules

drush en mcp_extra -y
drush en mcp_dev_tools -y
  • mcp_extra exposes function calls from the Drupal AI module.
  • mcp_dev_tools allows controlled Drush access.

The second one is powerful and should be treated like production shell access. Use it carefully.

Step 3: Lock Down Access

At /admin/config/mcp, you can control:

  • Authentication (token-based via the Key module)
  • Which content types are exposed
  • Who can use the MCP server

Create a dedicated user and role. Don't default to admin. Nothing is exposed unless you opt in.

Step 4: Connect a Client

For local development, STDIO via Docker is the easiest path.

Claude Desktop (DDEV example):

Add this to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on Mac):

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

The --network=host flag lets the Docker container reach your DDEV site. The --unsafe-net flag is required for local HTTPS certificates. In production, use proper certificates and remove this flag.

Claude Code:

claude mcp add --scope project mcp-server-drupal docker \
  -e DRUPAL_AUTH_USER=admin \
  -e DRUPAL_AUTH_PASSWORD=your_password \
  -- run -i --rm \
  -e DRUPAL_AUTH_USER \
  -e DRUPAL_AUTH_PASSWORD \
  --network=host \
  ghcr.io/omedia/mcp-server-drupal:latest \
  --drupal-url=https://mysite.ddev.site \
  --unsafe-net

This scopes the MCP server to your project directory, keeping credentials out of global config.

Restart the client and your Drupal site should appear as an available connection.


What This Lets You Do

Once connected, interaction becomes very direct.

Content Work

"Show me all Articles published this week."

"Create a Page titled 'About Us' with this body content..."

"Find products where the price field is empty."

This all runs through Drupal's entity API and permission system. Nothing magical - just faster.

Site Building

"Create a Case Study content type with fields for client, industry, challenge, solution, and outcome."

"Add a Services taxonomy with these terms..."

This is where it saves real time. Things that normally involve ten screens and careful clicking collapse into a single instruction.

Developer Tasks

With mcp_dev_tools enabled:

"Clear caches."

"List enabled modules."

"Export config."

If you're already living in an editor like Cursor or Claude Code, this keeps you there.

AI-Augmented Content

With mcp_extra and the AI module:

"Generate SEO meta descriptions for all Articles missing one."

"Summarise the last 10 blog posts into a newsletter intro."

The external AI tool orchestrates, your Drupal site's AI capabilities execute.


How to Start Safely

If you're curious but cautious:

  • Start on a local or dev site
  • Begin with read-only access
  • Be explicit about which content types and tools you expose

Treat MCP like any other integration. Least privilege applies.


Final Thoughts

This isn't about replacing Drupal workflows. It's about removing friction between people and the systems they already rely on.

Canvas improves how pages are built. AI Context improves how content is understood. MCP changes who can work with your site, and how.

If your organisation has invested in Drupal content, this is a clean way to let modern tools operate against that investment - without scraping, copying, or duct tape.


We Can Help

We work with Drupal teams on content automation, search, Canvas builds, and MCP setups. If you're exploring this and want a second set of eyes, get in touch.


Related posts:


Quick Reference

Module: drupal/mcp

Documentation: https://drupalmcp.io

STDIO Binary: https://github.com/omedia/mcp-server-drupal

Drupal.org: https://www.drupal.org/project/mcp

Compatibility: Drupal 10.x, 11.x

Status: Security-covered, stable release


DrupalMCPAIClaudeAPIIntegrationCursorClaude Code
Bonnici

George Bonnici

Bonnici - Drupal Experts

Paper plane

Ready to start your next
Drupal project?

Let's build something reliable, scalable, and made to last.