Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module allows Drupal to connect to Model Context Protocol (MCP) servers, enabling AI modules to access external tools and data. It supports both HTTP and local process connections and integrates with other Drupal AI modules for seamless tool usage.

Built by a human using an AI assistant: 🤖 ➕ 🧠

Note that extensive parts of this module was generating via AI coding agents under human supervision.

INTRODUCTION

The MCP Client module enables Drupal to connect to Model Context Protocol (MCP) servers and expose their tools to AI modules. MCP is a standardized protocol for communication between AI applications and external tools/data sources.

This module integrates with the Drupal AI module to provide seamless access to MCP server capabilities, allowing AI agents to use external tools like file systems, databases, APIs, and more.

REQUIREMENTS

This module requires the following:

INSTALLATION

Install as you would normally install a contributed Drupal module. For further information, see: https://www.drupal.org/docs/extending-drupal/installing-drupal-modules

composer require drupal/mcp_client
drush en mcp_client -y

CONFIGURATION

HTTP Transport (Remote MCP Server)

Use this transport type for MCP servers accessible via HTTP/HTTPS.

  1. Navigate to Administration > Configuration > AI > MCP Servers (/admin/structure/mcp-server)
  2. Click "Add MCP Server"
  3. Fill in the following fields:
    • Label: A descriptive name (e.g., "GitHub MCP Server")
    • Transport Type: Select "HTTP (Streamable HTTP)"
    • Endpoint URL: Your MCP server URL (e.g., https://example.com/mcp)
    • Timeout: Connection timeout in seconds (default: 30)
  4. Click "Save"
  5. Edit the server configuration to enable specific tools
  6. Enabled tools are now available in the AI API Explorer

STDIO Transport (Local Process)

Use this transport type for running MCP servers as local processes (Node.js, Python, etc.).

  1. Navigate to Administration > Configuration > AI > MCP Servers
  2. Click "Add MCP Server"
  3. Fill in the following fields:
    • Label: A descriptive name
    • Transport Type: Select "STDIO (Process)"
    • Command: Full command to execute (e.g., node /path/to/server.js)
    • Working Directory: Optional working directory for the process
    • Environment Variables: Add environment variables as name-value pairs
      • For sensitive values (API keys, tokens), use Key module references
      • For non-sensitive values, use plain text
  4. Click "Save"
  5. Edit the server configuration to enable specific tools

Environment Variables with Key Module

For secure handling of API keys and other sensitive data:

  1. Install and enable the Key module (automatically required by this module)
  2. Create keys at Administration > Configuration > System > Keys
  3. When configuring environment variables in MCP Server settings:
    • Name: The environment variable name (e.g., API_KEY)
    • Type: Select "Key"
    • Key: Choose the key you created
  4. For non-sensitive variables, select "Plain text" and enter the value directly

FEATURES

  • Multiple Transport Types: Supports both HTTP and STDIO (local process) connections
  • No Middleware Required: Direct connection to MCP servers for HTTP transport
  • AI Module Integration: Seamlessly integrates with Drupal AI module's function calling system
  • Tool Management: Easy-to-use UI for enabling/disabling specific tools per server
  • Multiple Servers: Connect to multiple MCP servers simultaneously
  • Secure Credential Management: Integration with Key module for secure storage of API keys and sensitive environment variables
  • Dynamic Plugin System: Tools from MCP servers are automatically discovered and exposed as AI function call plugins

DOCUMENTATION

For more details, look at the 📚 Complete Documentation.

Activity

Total releases
2
First release
Apr 2025
Latest release
7 months ago
Releases (12 mo)
1
Maintenance
Active

Releases

Version Type Release date
1.0.0-alpha1 Pre-release Dec 16, 2025
1.0.x-dev Dev Apr 9, 2025