Quick Start Guide
This guide will help you get up and running with MCP Client in minutes.
Prerequisites
- MCP Client module installed and enabled
- AI module configured with at least one provider
- An MCP server to connect to (or use the example below)
Example: HTTP MCP Server
This example shows how to connect to a hypothetical HTTP-based MCP server.
Step 1: Add the Server
- Navigate to Administration » Configuration » AI » MCP Servers (
/admin/structure/mcp-server) - Click "Add MCP Server"
- Fill in:
- Label: GitHub MCP Server
- Transport Type: HTTP (Streamable HTTP)
- Endpoint URL:
https://example.com/mcp - Timeout: 30 seconds
- Click "Save"
Step 2: Enable Tools
- Edit the "GitHub MCP Server" configuration
- Under "Enabled tools", check the tools you want to use
- Click "Save"
Step 3: Test in API Explorer
- Navigate to Administration » Configuration » AI » API Explorer (
/admin/config/ai/api-explorer) - Select an enabled tool from the function list
- Fill in required parameters
- Click "Execute"
- View the response
Example: Local STDIO Server
This example shows how to run a local MCP server using Node.js.
Step 1: Add the Server
- Navigate to Administration » Configuration » AI » MCP Servers
- Click "Add MCP Server"
- Fill in:
- Label: Local Filesystem MCP
- Transport Type: STDIO (Process)
- Command:
node /usr/local/bin/mcp-filesystem-server/index.js - Working Directory:
/usr/local/bin/mcp-filesystem-server - Click "Save"
Step 2: Add Environment Variables (if needed)
- Edit the server configuration
- Under "Environment Variables", click "Add another item"
- For each variable:
- Name: Variable name (e.g.,
API_KEY) - Type: Key (for sensitive data) or Plain text
- Value/Key: Select a key or enter plain text
- Click "Save"
Step 3: Enable Tools
Same as HTTP example above.
Using MCP Tools in AI Agents
Once configured, MCP tools are automatically available to AI agents:
- Navigate to Administration » Configuration » AI » Agents
- Create or edit an agent
- In the agent configuration, enabled MCP tools appear as available functions
- The AI agent can now call these tools during execution
Common Tasks
Viewing Available Tools
Navigate to the API Explorer to see all available tools from all enabled MCP servers.
Disabling a Server Temporarily
- Edit the MCP server configuration
- Uncheck "Enabled"
- Click "Save"
Updating Server Configuration
- Edit the MCP server configuration
- Modify settings as needed
- Click "Save"
- The connection will be re-established automatically
Example Use Cases
Use Case 1: File Operations
Configure a filesystem MCP server to let AI agents read and write files within controlled directories.
Use Case 2: Database Queries
Set up an MCP server that provides database query tools, allowing AI agents to retrieve information from your database.
Use Case 3: External APIs
Connect to an MCP server that wraps external APIs (weather, news, etc.) to enrich AI agent capabilities.
Troubleshooting
Server Not Connecting
- Verify the endpoint URL or command path is correct
- Check server logs for errors
- Ensure firewall/network settings allow connections (HTTP)
- Test the command manually (STDIO)
Tools Not Appearing
- Verify the server is enabled
- Check that tools are enabled in the server configuration
- Clear Drupal cache:
drush cr
Authentication Errors
- Verify environment variables are set correctly
- For sensitive values, use Key module references
- Check MCP server logs for authentication details