Integration Guide
Cursor + WHMCS
Query WHMCS data while you code. Setup in under 10 minutes.
Estimated time: 10 minutes · Transport: streamable-http
Quick Reference
- Min Version
- Cursor 0.40+ / VS Code 1.99+ with Copilot
- Transport
- Streamable HTTP (Cursor, VS Code, Windsurf native)
- Public URL
- Not required
- Node.js
- Not required
- Editors Supported
- Cursor, VS Code, Windsurf, Zed
- Config Scope
- Project or Global
- Avg Response Time
- 2-5 seconds for data queries
Prerequisites
- WHMCS 8.0 or higher with admin access
- MCP Server addon installed and activated (installation guide)
- Cursor 0.40+ (download) or VS Code 1.99+ with GitHub Copilot (download). No Node.js required.
Step 1: Generate a Bearer Token
- Go to your WHMCS admin panel
- Navigate to Addons > MCP Server
- Click Generate New Token
- Copy the Bearer token and save it securely. You will need it in the next step.
Important: The Bearer token is shown only once. If you lose it, you will need to generate a new one.
Step 2a: Cursor Setup
Cursor has native Streamable HTTP support. No Node.js or npx required. Create a config file in your project or globally:
Project-level configuration (recommended)
Create .cursor/mcp.json in your project root:
{
"mcpServers": {
"whmcs": {
"type": "streamable-http",
"url": "https://your-whmcs.com/modules/addons/mx_mcp/mcp.php",
"headers": {
"Authorization": "Bearer YOUR_BEARER_TOKEN"
}
}
}
}Global configuration
To make MCP available in all Cursor projects, create the config at:
- macOS/Linux:
~/.cursor/mcp.json - Windows:
%USERPROFILE%\.cursor\mcp.json
The JSON content is the same as above.
Restart Cursor
- Close Cursor completely
- Reopen Cursor and open your project
- The MCP tools will appear automatically in the AI chat sidebar
Step 2b: VS Code Setup
VS Code supports MCP through GitHub Copilot. Follow these steps:
1. Enable MCP in VS Code settings
- Open VS Code Settings (Cmd+, on macOS, Ctrl+, on Windows)
- Search for
chat.mcp.enabled - Check the box to enable MCP support
2. Create the config file
Create .vscode/mcp.json in your project root:
{
"servers": {
"whmcs": {
"type": "streamable-http",
"url": "https://your-whmcs.com/modules/addons/mx_mcp/mcp.php",
"headers": {
"Authorization": "Bearer YOUR_BEARER_TOKEN"
}
}
}
}3. Restart VS Code
- Close and reopen VS Code
- Open the Copilot Chat sidebar
- The WHMCS MCP tools will be available in the chat
Note: VS Code MCP support requires GitHub Copilot to be installed and active. Make sure you have a valid Copilot subscription.
Test the Connection
- Open the AI chat sidebar in your editor (Cursor AI or Copilot Chat)
- Type:
Get WHMCS system status - The editor should call the MCP tool and return system information from your WHMCS installation
- If using Cursor, look for the MCP tool indicator in the chat response
- If using VS Code, Copilot will show tool calls in the chat sidebar
Success! If you see WHMCS system info, the connection is working. Try developer-focused queries like “Show me the schema for a support ticket” or “List all active products with their pricing”.
Troubleshooting
Config file not detected (Cursor)
- Make sure the file is at
.cursor/mcp.json(not.vscode/mcp.json) - Verify the JSON is valid (no trailing commas, proper quotes)
- Restart Cursor completely (not just reload the window)
- Confirm the
typefield is set tostreamable-httpand the URL ends inmcp.php
MCP tools not showing in VS Code
- Verify that
chat.mcp.enabledis set to true in VS Code Settings - Make sure GitHub Copilot is installed and you have an active subscription
- The config file must be at
.vscode/mcp.json(not.cursor/mcp.json) - Restart VS Code after creating or modifying the config file
“Connection refused” or timeout
- Verify your WHMCS URL is correct and accessible from your machine
- Check that the MCP Server addon is activated in WHMCS
- Ensure your Bearer token is valid and has not been revoked
- Confirm the URL in your config points to
mcp.php(not the oldsse.php)
“Permission denied”
- Your Bearer token may not have the required permissions
- Go to Addons > MCP Server in WHMCS and check token permissions
- Ensure the token 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 Cursor now connects via Streamable HTTP natively (no npx or Node.js required). If you are still on v1.1.x, this is how it was configured:
{
"mcpServers": {
"whmcs": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-remote",
"https://your-whmcs.com/modules/addons/mx_mcp/mcp/sse.php"],
"env": { "MCP_API_KEY": "your-api-key-here" }
}
}
}To upgrade: replace the config above with the new streamable-http format shown in Step 2. No Node.js required.