Integration Guide
n8n + WHMCS
Automate WHMCS workflows with n8n in under 15 minutes
Estimated time: 15 minutes · Transport: SSE + HTTP Streaming
Quick Reference
- Min Version
- n8n v1.88+
- Transport
- SSE (Server-Sent Events)
- Public URL
- Not required
- Node.js
- Required
- Self-Hostable
- Yes (Docker, npm, Cloud)
- Concurrent Tools
- Unlimited (workflow-based)
- Avg Response Time
- 1-3 seconds per MCP tool call within a workflow
Prerequisites
- WHMCS 8.0 or higher with admin access
- MCP Server addon installed and activated (installation guide)
- n8n v1.88 or higher (download here)
- An AI provider API key (OpenAI, Anthropic, or similar) for the AI Agent node
Version requirement: n8n v1.88+ is required for native MCP Client Tool support. Older versions do not include the MCP Client Tool node. Check your version under Settings > About.
Step 1: Generate an API Key
- Go to your WHMCS admin panel
- Navigate to Addons > MCP Server
- Click Generate New API Key
- Copy the API key and save it securely. You will need it in the next step.
Important: The API key is shown only once. If you lose it, you will need to generate a new one.
Step 2: Add the MCP Client Tool Node
In your n8n workflow editor, set up the MCP Client Tool node to connect to your WHMCS:
- Open the n8n workflow editor and create a new workflow (or open an existing one)
- Click the + button to add a new node
- Search for MCP Client Tool and add it to the canvas
- In the node settings, set Connection Type to SSE
- Enter your WHMCS MCP Server URL and API key
Use the following configuration values:
// n8n MCP Client Tool Node Configuration
// 1. Add "MCP Client Tool" node to your workflow
// 2. Set Connection Type: SSE
// 3. Enter your MCP Server URL and Bearer token
URL: https://your-whmcs.com/modules/addons/mx_mcp/mcp.php
Authorization: Bearer YOUR_BEARER_TOKEN
// Then connect to any AI node (OpenAI, Anthropic, etc.)
// The AI agent will use MCP tools automatically.Step 3: Wire to an AI Agent Node
The MCP Client Tool node provides WHMCS tools to an AI agent. Connect it to any AI provider:
- Add an AI Agent node to your workflow
- Connect an AI model node (OpenAI, Anthropic, or other provider) to the AI Agent as the model
- Connect the MCP Client Tool node to the AI Agent as a tool
- Add a trigger node to start the workflow (Manual Trigger for testing, Cron for scheduled runs, Webhook for event-driven)
- In the AI Agent node, set a system prompt like: “You are a WHMCS assistant. Use the available tools to query WHMCS data and answer questions.”
Tip: You can also call MCP tools directly without an AI agent using the HTTP Request node. Point it to the SSE endpoint and pass tool calls manually. This is useful for simple, predictable automations.
Step 4: Test the Workflow
- Click Test Workflow in the n8n editor
- If using a Manual Trigger, click Execute Node on the trigger
- In the AI Agent input, enter:
Get WHMCS system status - Check the output of each node to verify data flows correctly
- The AI Agent should return system information from your WHMCS installation
Success! If you see WHMCS system info in the AI Agent output, the connection is working. Try automating tasks like “Get all overdue invoices” or “List open support tickets”. Schedule the workflow with a Cron trigger for recurring reports.
Troubleshooting
“MCP Client Tool node not found”
- The MCP Client Tool node requires n8n v1.88 or higher
- Check your version under Settings > About in your n8n instance
- If self-hosting, update to the latest version:
docker pull n8nio/n8n:latest - If using n8n Cloud, it should auto-update. Contact n8n support if the node is missing.
“SSE connection failed” or timeout
- Verify the URL is correct:
https://your-whmcs.com/modules/addons/mx_mcp/mcp.php - Ensure your WHMCS is accessible from the machine running n8n
- Check that HTTPS is properly configured on your WHMCS installation
- If n8n and WHMCS are on the same server, you can use the internal IP or localhost
“No tools available” in AI Agent
- Make sure the MCP Client Tool node is connected to the AI Agent as a tool (not as the model or input)
- Verify the MCP Server addon is activated in WHMCS
- Check that the API key has not been revoked and has the required permissions
- Test the endpoint directly in a browser to confirm it responds
“Permission denied”
- Your API key may not have the required permissions
- Go to Addons > MCP Server in WHMCS and check API key permissions
- Ensure the API key has access to the tools you are trying to use
Upgrading from v1.1.x?
If you set up the MCP Server before v1.3.0, the authentication method changed. Here is what is different and how to update your config.
Previous method (v1.1.x)
Still works. In v1.3.0, authentication changed from API Keys to Bearer tokens, and the endpoint changed from sse.php to mcp.php. If you are still on v1.1.x, the old server URL and auth header were:
// Old server URL (v1.1.x): https://your-whmcs.com/modules/addons/mx_mcp/mcp/sse.php // Old authentication header: MCP_API_KEY: your-api-key-here
To upgrade: update the server URL to use mcp.php and replace the MCP_API_KEY header with Authorization: Bearer YOUR_TOKEN.