Drupal is a registered trademark of Dries Buytaert

mcp_client

13 sites Security covered
View on drupal.org
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
2 months ago
Release cadence
251 days
Stability
0% stable

Releases

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