Cover image
Try Now
2025-04-12

TS based companion MCP server for the Drupal MCP module that works with the STDIO transport.

3 years

Works with Finder

1

Github Watches

2

Github Forks

34

Github Stars

MCP Server for Drupal

image

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.

[!IMPORTANT] Both the Drupal module and this server are in active development. Use them at your own risk.

Installation and Usage

  • Download the binary for your system from the releases page

  • To use it with Claude Desktop you need to add the server config in the claude_desktop_config.json file. The file is located at the following path:

    • On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • On Windows: %APPDATA%/Claude/claude_desktop_config.json
    {
      "mcpServers": {
        "mcp-server-drupal": {
          "command": "__BINARY_PATH__",
          "args": ["--drupal-url", "__DRUPAL_BASE_URL__"],
          "env": {}
        }
      }
    }
    
    • --drupal-url is a required argument
    • Replace __BINARY_PATH__ with the path to the downloaded binary
    • Replace __DRUPAL_BASE_URL__ with the base URL of your Drupal site
  • To check the server and sdk version run the following command:

mcp-server-drupal --version
  • To check the available commands run the following command:
mcp-server-drupal --help

Docker

The server is available as docker image on GHCR.

{
  "mcpServers": {
    "mcp-server-drupal": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/omedia/mcp-server-drupal",
        "--drupal-url=__DRUPAL_BASE_URL_"
      ],
      "env": {}
    }
  }
}

Specific version of the images are also avaiable.

{
  "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": "THEPASSWORD"
      }
    }
  }
}

Development Phase

If you are using the server in development phase and you have ddev, lando or simple docker compose keep in mind to run the server in the same network as the Drupal site using --network or -n flags. You can also achive the same with host.docker.iternal

Alternative usage

The server is also available as a deno module on JSR so you can use via npx


{
  "mcpServers": {
    "mcp-server-drupal": {
      "command": "npx",
      "args": [
        "-y",
        "deno",
        "run",
        "-A",
        "jsr:@omedia/mcp-server-drupal@<VERSION>",
        "--drupal-url",
        "__DRUPAL_BASE_URL__"
      ],
      "env": {}
    }
  }
}

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.

[!NOTE] Make sure to turn the authentication on the Drupal MCP module settings page.

[!NOTE] If both DRUPAL_AUTH_TOKEN and DRUPAL_AUTH_USER/DRUPAL_AUTH_PASSWORD are set, the token will be used over the username and password.

Example usage with token:

{
  "mcpServers": {
    "mcp-server-drupal": {
      "command": "__BINARY_PATH__",
      "args": ["--drupal-url", "__DRUPAL_BASE_URL__"],
      "env": {
        "DRUPAL_AUTH_TOKEN": "<AUTH_TOKEN>"
      }
    }
  }
}

Example usage with username and password:

{
  "mcpServers": {
    "mcp-server-drupal": {
      "command": "__BINARY_PATH__",
      "args": ["--drupal-url", "__DRUPAL_BASE_URL__"],
      "env": {
        "DRUPAL_AUTH_USER": "<BASIC_AUTH_USERNAME>",
        "DRUPAL_AUTH_PASSWORD": "<BASIC_AUTH_PASSWORD>"
      }
    }
  }
}

Docker

If you want to use the auth with docker do not forget to pass them as envriment variables

{
  "mcpServers": {
    "mcp-server-drupal": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "DRUPAL_AUTH_TOKEN",
        "ghcr.io/omedia/mcp-server-drupal",
        "--drupal-url=__DRUPAL_BASE_URL__"
      ],
      "env": {
        "DRUPAL_AUTH_TOKEN": "<AUTH_TOKEN>"
      }
    }
  }
}

MCP

  • All instruments are defined by the Drupal API during the initialization phase

[!NOTE] The server now exposes the following

  • Resources (templates, reads)
  • Tools (calls)

No prompts are exposed by the server for now

Development

This project is built with Deno.

[!NOTE] Use deno version 2.0.0 or above

Install dependencies:

deno install

For development with auto-rebuild:

bun task dev

Build the server:

deno task build --output build/mcp-server-drupal

[!TIP] To build for the specific platform use the --target flag and check the docs

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

drupal_mcp_server binaries 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

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://hubeiqiao.com
  • IT problem solver with clear, step-by-step guidance.

  • Andris Teikmanis
  • Latvian GPT assistant for developing GPT applications

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Navid RezaeiSarchoghaei
  • Professional Flask/SQLAlchemy code guide. Follow: https://x.com/navid_re

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • https://cantaspinar.com
  • Summarizes videos and answers related questions.

  • Khalid kalib
  • Write professional emails

  • https://tovuti.be
  • Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven

  • apappascs
  • Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • OffchainLabs
  • Go implementation of Ethereum proof of stake

  • oatpp
  • Anthropic’s Model Context Protocol implementation for Oat++

  • huahuayu
  • A unified API gateway for integrating multiple etherscan-like blockchain explorer APIs with Model Context Protocol (MCP) support for AI assistants.

  • deemkeen
  • control your mbot2 with a power combo: mqtt+mcp+llm

  • zhaoyunxing92
  • 本项目是一个钉钉MCP(Message Connector Protocol)服务,提供了与钉钉企业应用交互的API接口。项目基于Go语言开发,支持员工信息查询和消息发送等功能。

    Reviews

    4 (1)
    Avatar
    user_SWyeUT5T
    2025-04-16

    As a loyal user of the mcp-server-drupal, I have found it to be an essential tool for my projects. Its seamless integration with Drupal and powerful server functionalities provided by Omedia have significantly boosted my productivity. The comprehensive documentation and active community support make it user-friendly, even for those new to server management and Drupal. Highly recommend it!