Skip to main content

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

  1. Go to your WHMCS admin panel
  2. Navigate to Addons > MCP Server
  3. Click Generate New Token
  4. 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

  1. Close Cursor completely
  2. Reopen Cursor and open your project
  3. 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

  1. Open VS Code Settings (Cmd+, on macOS, Ctrl+, on Windows)
  2. Search for chat.mcp.enabled
  3. 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

  1. Close and reopen VS Code
  2. Open the Copilot Chat sidebar
  3. 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

  1. Open the AI chat sidebar in your editor (Cursor AI or Copilot Chat)
  2. Type: Get WHMCS system status
  3. The editor should call the MCP tool and return system information from your WHMCS installation
  4. If using Cursor, look for the MCP tool indicator in the chat response
  5. 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 type field is set to streamable-http and the URL ends in mcp.php

MCP tools not showing in VS Code

  • Verify that chat.mcp.enabled is 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 old sse.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.

Next Steps