Connect Drupal to Model Context Protocol
TypeScript MCP server that connects AI clients to Drupal CMS via STDIO transport, exposing Drupal-defined resources and tools dynamically during initialization.
Maintainer of this project? Claim this page to edit the listing.
1.0.0Add to Favorites
Why it matters
Integrate Drupal content and functionality with the Model Context Protocol (MCP). This asset allows AI models to access Drupal resources, tools, and prompts, enabling sophisticated content generation and data interaction.
Outcomes
What it gets done
Expose Drupal resources, tools, and prompts via the MCP.
Enable AI models to query and utilize Drupal data.
Facilitate dynamic content generation powered by Drupal.
Bridge the gap between Drupal's CMS capabilities and AI applications.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-drupal | bash Overview
Drupal MCP Server
MCP server enabling AI-Drupal integration via STDIO transport with dynamic resource and tool exposure When you need to connect MCP clients to Drupal CMS instances with authenticated access to Drupal-defined resources and tools
What it does
Big Job: Enable AI assistants to interact with Drupal content management systems through the Model Context Protocol.
Small Job: Connect your MCP client to a Drupal instance and expose Drupal API resources (templates, reads) and tools (calls) as defined by the Drupal API during initialization.
The server works with STDIO transport and supports multiple distribution channels (Docker, compiled binary, JSR package). Configure it in your MCP client:
{
"mcpServers": {
"mcp-server-drupal": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/omedia/mcp-server-drupal",
"--drupal-url=__DRUPAL_BASE_URL_"
],
"env": {}
}
}
}
Authentication supports both token-based and username/password methods via environment variables (DRUPAL_AUTH_TOKEN, DRUPAL_AUTH_USER, DRUPAL_AUTH_PASSWORD). All instruments are defined by the Drupal API during initialization. Built with Deno 2.0+, binaries and images are signed with cosign for verification.
Source README
MCP Server for Drupal
This is a typescript based companion Model Context Protocol(MCP) server for the Drupal MCP module that works with the STDIO transport. In order to use SSE transport this server is not required.
Installation
The STDIO Binary is available through multiple distribution channels to accommodate various environments:
Here is a quick example of how to use the server with docker:
{
"mcpServers": {
"mcp-server-drupal": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/omedia/mcp-server-drupal",
"--drupal-url=__DRUPAL_BASE_URL_"
],
"env": {}
}
}
}
๐ For more details check the Installation section in the docs
Authentication
The server supports both authentication via environment variables. You can use either a auth token or a basic auth with username and password combination . The following environment variables are supported:
DRUPAL_AUTH_TOKEN: The authentication token.DRUPAL_AUTH_USER: The username for authentication.DRUPAL_AUTH_PASSWORD: The password for authentication.
๐ Check the Authentication section in the docs for more details
MCP
- All instruments are defined by the Drupal API during the initialization phase
Development
This project is built with Deno.
Install dependencies:
deno install
For development with auto-rebuild:
bun task dev
Build the server:
deno task build --output build/mcp-server-drupal
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We
recommend using the
MCP Inspector, which is
available as a deno task:
deno task inspector --drupal-url [DRUPAL_BASE_URL]
Verifying the binaries and images
drupal_mcp_server binaries and container images are signed by cosign using identity-based signing.
You can verify your binary by downloading the signatures.tar.gz file from the release page, extracting the signature and running the following command:
cosign verify-blob ${YOUR_BINARY_NAME} \
--bundle signatures/${YOUR_BINARY_NAME}.bundle \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
--certificate-identity-regexp https://github.com/Omedia/mcp-server-drupal/.github/workflows/release.yml@refs/tags/v \
--certificate-github-workflow-repository Omedia/mcp-server-drupal
On the container side you can verify the image by running the following command:
cosign verify ghcr.io/omedia/mcp-server-drupal:latest \
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
--certificate-identity-regexp "https://github.com/Omedia/mcp-server-drupal/.github/workflows/release.yml@refs/tags/v"
FAQ
Common questions
Discussion
Questions & comments ยท 0
Sign In Sign in to leave a comment.