MCP Client
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.
What is MCP?
Model Context Protocol (MCP) is an open protocol that standardizes how AI applications communicate with external data sources and tools. It enables:
- Standardized tool integration
- Secure context sharing
- Multi-modal data exchange
- Provider-agnostic connectivity
Key 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
Requirements
This module requires the following:
- PHP 8.2 or higher (required by SwisNL MCP Client library)
- Drupal core 10.3+ or 11+
- AI module 1.2.x or higher
- AI Agents module 1.2.x or higher
- Key module 1.18 or higher
- SWIS MCP Client library (swisnl/mcp-client automatically installed via Composer)
Quick Links
Getting Started
- Install the module using Composer
- Enable the module
- Configure at least one MCP server
- Enable desired tools
- Start using MCP tools in your AI agents
For detailed instructions, see the Installation Guide.
Documentation
This documentation is generated using MkDocs from the source files located in
the docs/ directory. To build the docs locally:
- Install MkDocs:
pip install mkdocs mkdocs-material - Run
mkdocs servein the project root - Open
http://localhost:8000in your browser
Support
For bug reports and feature requests, please use the issue queue.
Maintainers
- Marcus Johansson (marcus_johansson)
- Roberto Peruzzo (robertoperuzzo)
- James Abrahams (yautja_cetanu)
- Giorgi Jibladze (jibla)
- Michael Lander (michaellander)
- Rob Loach (robloach)