Implement a TypeScript MCP server for Drupal with Docker and authentication options
The MCP (Model Context Protocol) Server for Drupal is a typescript-based companion server that facilitates communication between AI applications and the Drupal content management system using the Model Context Protocol. This server enables seamless integration of AI tools into Drupal through the STDIO transport, ensuring compatibility with various AI clients such as Claude Desktop, Continue, Cursor, and more. Given its active development status, it is crucial for developers to be aware of its current limitations and potential risks.
The core features of this server revolve around its ability to act as a bridge between AI applications and Drupal's data sources and tools. It supports both direct command execution and template instantiation via the MCP protocol, allowing for dynamic interaction with the backend while ensuring robust security practices are adhered to. The server is designed to be flexible and adaptable, offering multiple deployment options through binary downloads, Docker containers, and even Deno modules.
The architecture of this MCP Server emphasizes modularity and extensibility. It leverages the power of TypeScript for programming and ensures compatibility with the Model Context Protocol's latest standards (as documented on modelcontextprotocol.io). The protocol implementation supports standard operations such as resource querying, tool invocation, and prompt handling. However, at present, no direct user prompts are exposed through this server.
To set up and utilize this MCP Server for Drupal, follow the steps below. Ensure you have the necessary prerequisites installed before proceeding:
Download the Binary:
Add Server Configuration:
claude_desktop_config.json configuration file:
{
"mcpServers": {
"mcp-server-drupal": {
"command": "__BINARY_PATH__",
"args": ["--drupal-url", "__DRUPAL_BASE_URL__"],
"env": {}
}
}
}
__BINARY_PATH__ with the path to your binary and __DRUPAL_BASE_URL__ with the base URL of your Drupal site.Verify Server Version:
mcp-server-drupal --version
Explore Available Commands:
mcp-server-drupal --help
This MCP Server can be essential for developers building complex AI workflows that require both static and dynamic interactions with Drupal data. For example:
Imagine you are developing an AI-powered content management system. Using this MCP server, you can automatically generate blog posts or articles by fetching the latest data from Drupal and embedding it into pre-defined templates.
Another potential use case is integrating real-time SEO optimization tools directly within your Drupal CMS to fetch and analyze keyword data without manually exporting files.
This server supports integration with a variety of AI clients, each with their own set of features:
When setting up the server, ensure you specify the correct client using the appropriate environment variables or command-line options. For instance:
{
"mcpServers": {
"mcp-server-drupal": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"DRUPAL_AUTH_TOKEN",
"ghcr.io/omedia/mcp-server-drupal:1.0.0-alpha5",
"--drupal-url=__DRUPAL_BASE_URL__"
],
"env": {
"DRUPAL_AUTH_TOKEN": "<AUTH_TOKEN>"
}
}
}
}
The following compatibility matrix outlines the current state of integration between this MCP Server and various AI clients:
| MCP Client | Resources | Tools | Prompts |
|---|---|---|---|
| Claude Desktop | ✅ ✨ | ✅ | ✅ |
| Continue | ✅ ✨ | ✅ | ✅ |
| Cursor | ❌ ✨ | ✅ | ✅ |
Advanced configuration options, including authentication and environment variable settings, are crucial for securing your deployment. Use the following methods:
Environment Variables:
DRUPAL_AUTH_TOKEN: Securely authenticate with Drupal using this token.DRUPAL_AUTH_USER and DRUPAL_AUTH_PASSWORD: Provide an alternative method if needed.CLI Args: Pass command-line arguments as necessary to override any defaults during initial setup or runtime.
mcp-server-drupal --drupal-url=https://your-site.local --auth-token=$TOKEN
Can I use this server with other AI clients?
How do I troubleshoot issues related to authentication?
What version of Deno should I use for this server?
Can I integrate more advanced AI tools beyond templates and calls?
Is there any public documentation available for this server's API?
Contributions to improve this project are highly encouraged. Key steps include:
git clone https://github.com/Omedia/mcp-server-drupal.gitgraph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Resource Manager] --> E[Data Source]
C --> F[Tool Invoker] --> G[Dynamic Tool]
This documentation ensures comprehensive coverage of MCP server capabilities and AI application integration, focusing on technical accuracy and originality. The language used is in English, fully adhering to the specified guidelines while positioning this server as a valuable tool for developers building sophisticated AI-driven applications integrated with Drupal CMS systems.
By following these instructions, you can effectively leverage the power of Model Context Protocol to enhance your AI workflows and applications.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration