loading…
Search for a command to run...
loading…
Enables AI assistants to manage WHM hosting accounts and server administration tasks including account management, server stats, updates, SSL, backups, and emai
Enables AI assistants to manage WHM hosting accounts and server administration tasks including account management, server stats, updates, SSL, backups, and email through a secure API.
A Node.js server application that connects to a WHM (Web Host Manager) server for account administration and server management. This application implements the Model Context Protocol (MCP) to allow AI assistants like Claude to interact with WHM APIs.
npm install
.env file with your WHM server details:# WHM Server Configuration
WHM_SERVER=your-server-domain.com
WHM_PORT=2087
WHM_USERNAME=root
WHM_API_TOKEN=your-api-token-here
# MCP Server Configuration
PORT=3000
NODE_ENV=development
LOG_LEVEL=info
# API Authentication
API_KEY=your-secret-api-key-here
npm start
For development:
npm run dev
To use this MCP server with AI assistants like Claude in Cursor, you need to add the following configuration to your mcp.json file:
{
"mcpServers": {
"whm": {
"url": "http://your-server-address:3000/sse"
}
}
}
This server implements the Model Context Protocol using HTTP Server-Sent Events (SSE) as the transport mechanism. The implementation follows the standard JSON-RPC 2.0 format for all messages and includes:
/sse endpoint for establishing persistent connections/messages endpoint for receiving and responding to client requestsconnection/ready and tools/ready notificationsThe MCP architecture allows AI assistants to safely interact with WHM functionality through clearly defined tools with specific parameter schemas, creating a secure bridge between language models and server management functions.
The MCP server exposes the following WHM functionality via tools:
whm_list_accounts - List all WHM accountswhm_create_account - Create a new cPanel accountwhm_account_summary - Get account detailswhm_suspend_account - Suspend a cPanel accountwhm_unsuspend_account - Unsuspend a cPanel accountwhm_terminate_account - Permanently delete an accountwhm_server_status - Get server status and system statswhm_server_load - Get server load statistics whm_service_status - Get status of server serviceswhm_restart_service - Restart a specific server servicewhm_check_updates - Check for available updateswhm_start_update - Start server update processwhm_list_domains - List domains for an accountwhm_add_domain - Add a domain to an accountwhm_delete_domain - Remove a domain from an accountThe API endpoints are organized by resource type:
/api/accounts - Account management operations/api/server - Server information and operations/api/domains - Domain management/api/ssl - SSL certificate management/api/backups - Backup management operations/api/email - Email account managementFor detailed API documentation, see the /docs endpoint after starting the server.
This application requires WHM API credentials. Never share your .env file or expose your API tokens.
When using this MCP server for WHM administration, follow these security recommendations:
Be aware of the distinction between site and root compromises:
You can test the MCP server using the included example client:
npm run example
This will run a simple test client that connects to the MCP server, requests the available tools, and executes a sample command.
ISC
Выполни в терминале:
claude mcp add whm-mcp-server -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.