cpanel-workspace-hub
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cpanel-workspace-hubCreate a subdomain and deploy the build folder to it."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
# cPanel Workspace Hub
Model Context Protocol (MCP) server and automated deployment toolchain for cPanel shared hosting environments. Provides programmatic interfaces for LLM coding agents (Claude Code, Cursor, Claude Desktop, Roo Code/Cline) and terminal CLI workflows to manage subdomains, deploy builds via FTPS, provision MySQL databases, handle snapshot backups, and inspect remote files.
Landing Page: https://cpanel-hub.macquan.name.vn/
Navigation
Related MCP server: cPanel MCP Server
English
Architecture
The system consists of three distinct layers:
UAPI & FTP Transport Layer (
scripts/cpanel-api.js,scripts/ftp-deploy.js): Encapsulates cPanel Universal API (DomainInfo::list_domains,SubDomain::addsubdomain,Mysql::*) and TLS-secured FTP file operations with directory normalization and resource cleanup guarantees.Standard CLI Engine (
scripts/cli.js,scripts/setup.js): Interactive configuration wizard and deterministic deployment pipeline supporting static asset detection (dist/,build/).MCP Stdio Server (
scripts/mcp-server.js): Standard JSON-RPC stdio server exposing 17 structured tools with standardized JSON response envelopes.
Core Capabilities
Subdomain Provisioning: Calls cPanel UAPI to register
<name>.<domain>, configure Document Root (public_html/<name>), create DNS zone records, and rely on AutoSSL for HTTPS certificate generation.Smart Directory Deployment: Synchronizes project workspaces to remote Document Roots via FTPS. Automatically detects and prioritizes production bundles (
dist/,build/) or defaults to raw static sources.On-Demand MySQL: Provisions dedicated databases, generates scoped database users with randomized credentials, and grants
ALL PRIVILEGESprogrammatically.Automated Pre-Deploy Snapshots & Rollback: Downloads current remote Document Root contents to
backups/<subdomain>/before file upload. Rollback restores previous snapshots in seconds.Direct Remote File Operations: Remote path traversal, file read, write, upload, and deletion over FTP without requiring cPanel File Manager web access.
Strict Response Contract: All MCP tools emit valid parseable JSON adhering to
{ success, action, message, data, error, timestamp, logs }withisErrorflags on failure.
Installation & Setup
Prerequisites
Node.js >= 20.0.0
Valid cPanel hosting account with API Token access (
Manage API Tokens) and FTP access.
Step 1: Clone and Install
git clone https://github.com/qu4nc0d3r/cpanel-workspace-hub.git
cd cpanel-workspace-hub
npm installStep 2: Configure Environment
Run the interactive setup wizard:
npm run setupThe wizard prompts for credentials, performs live network validation against both cPanel UAPI and FTP endpoints, writes .env, and outputs client configuration JSON.
Manual configuration alternative (.env):
CPANEL_URL=https://yourdomain.com:2083
CPANEL_USER=your_cpanel_username
CPANEL_API_TOKEN=YOUR_CPANEL_API_TOKEN
CPANEL_MAIN_DOMAIN=yourdomain.com
FTP_HOST=yourdomain.com
FTP_USER=your_cpanel_username
FTP_PASS="your_ftp_password"
FTP_PORT=21
FTP_SECURE=falseStep 3: Verify Connectivity
npm run checkMCP Client Configuration
1. Claude Code CLI (Single Command)
claude mcp add cpanel-hub node /absolute/path/to/cpanel-workspace-hub/scripts/mcp-server.js2. Cursor (.cursor/mcp.json)
{
"mcpServers": {
"cpanel-hub": {
"command": "node",
"args": ["/absolute/path/to/cpanel-workspace-hub/scripts/mcp-server.js"]
}
}
}3. Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"cpanel-hub": {
"command": "node",
"args": ["/absolute/path/to/cpanel-workspace-hub/scripts/mcp-server.js"]
}
}
}4. Inline Environment Injection (Multi-Account Setup)
Clients can inject credentials directly through the configuration without a local .env:
{
"mcpServers": {
"cpanel-hub": {
"command": "node",
"args": ["/absolute/path/to/cpanel-workspace-hub/scripts/mcp-server.js"],
"env": {
"CPANEL_URL": "https://yourdomain.com:2083",
"CPANEL_USER": "username",
"CPANEL_API_TOKEN": "token",
"CPANEL_MAIN_DOMAIN": "yourdomain.com",
"FTP_HOST": "yourdomain.com",
"FTP_USER": "username",
"FTP_PASS": "password"
}
}
}
}CLI Reference
Command | Arguments | Description |
| None | Interactive configuration wizard with credential verification |
| None | Test cPanel API and FTP connection health |
|
| Register subdomain, scaffold project directory, and upload template |
|
| Create backup snapshot and deploy latest code to remote Document Root |
|
| Restore website from latest (or specified) local backup |
| None | Query cPanel for all active subdomains and Document Roots |
|
| Create MySQL database, create user, grant privileges, append |
| None | Query all MySQL databases and associated users |
|
| Drop MySQL database and associated project user |
| None | Start Stdio MCP Server |
MCP Toolset
The MCP server exposes 17 tools categorized into 5 operational domains:
Authentication & Configuration
cpanel_configure: Update credentials runtime and persist to.envafter verification.cpanel_check_status: Execute health check across configuration, cPanel UAPI, and FTP.
Subdomain & Project Lifecycle
cpanel_create_project: Provision subdomain on cPanel, scaffold template, and deploy initial build.cpanel_deploy_project: Sync local workspace (projects/<name>) to remote server with automated snapshotting.cpanel_list_projects: List all active subdomains and mapped Document Roots.cpanel_delete_subdomain: Delete subdomain mapping via cPanel API 2.
Snapshot Backups & Rollback
cpanel_backup_project: Download remote Document Root to timestamped directory underbackups/<subdomain>/.cpanel_rollback_project: Restore remote Document Root from specified or latest backup directory.cpanel_list_backups: Inspect existing snapshots for a given project.
Database Management (MySQL)
cpanel_create_database: Provision database, dedicated user, and strong password withALL PRIVILEGES.cpanel_list_databases: Retrieve all MySQL databases, user associations, and byte sizes.cpanel_delete_database: Tear down database and dedicated user for a project.
Direct Remote File Operations
cpanel_list_files: Read directory contents (name, type, byte size, modify timestamp).cpanel_read_file: Fetch raw content of remote text files.cpanel_write_file: Write or overwrite remote file content.cpanel_upload_file: Transfer local file to remote target path.cpanel_delete_file: Delete file or recursively remove directory.
Response Schema Contract
Every tool execution emits structured JSON within MCP's CallToolResult:
interface McpResponse<T = any> {
success: boolean; // Operational status
action: string; // Tool identifier
message: string; // Human-readable summary
data: T | null; // Structured payload
error: string | null; // Technical error details if success === false
timestamp: string; // ISO 8601 execution timestamp
logs?: string[]; // Step-by-step diagnostic log entries
}Example payload (cpanel_create_project):
{
"success": true,
"action": "cpanel_create_project",
"message": "Website project \"shop-mini\" created and deployed successfully",
"data": {
"project": "shop-mini",
"domain": "shop-mini.example.com",
"url": "https://shop-mini.example.com",
"remoteDir": "public_html/shop-mini",
"localDir": "/workspace/projects/shop-mini"
},
"error": null,
"timestamp": "2026-09-07T07:22:54.512Z",
"logs": [
"Registered subdomain: shop-mini.example.com",
"Scaffolded template to local directory",
"Uploaded assets via FTPS"
]
}Tiếng Việt
Kiến Trúc Hệ Thống
Hệ thống được thiết kế theo 3 tầng độc lập:
Tầng Giao Tiếp UAPI & FTP (
scripts/cpanel-api.js,scripts/ftp-deploy.js): Trừu tượng hóa cPanel Universal API và các luồng truyền nhận file FTPS/TLS với cơ chế chuẩn hóa đường dẫn tuyệt đối và giải phóng tài nguyên tự động.Tầng Điều Khiển CLI (
scripts/cli.js,scripts/setup.js): Điều phối quy trình build/deploy, tự động phát hiện thư mục bundle (dist/,build/) và cung cấp trình wizard cấu hình trực quan.Tầng Máy Chủ MCP (
scripts/mcp-server.js): Giao thức chuẩn Model Context Protocol hoạt động qua Stdio JSON-RPC, cung cấp 17 công cụ với schema dữ liệu thống nhất cho AI agent.
Tính Năng Kỹ Thuật
Khởi Tạo Subdomain & AutoSSL: Gọi cPanel UAPI đăng ký subdomain, liên kết Document Root
public_html/<name>, sinh bản ghi DNS nội bộ và kích hoạt AutoSSL.Triển Khai Tự Động Hóa: Đồng bộ mã nguồn lên host qua FTPS. Ưu tiên thư mục build biên dịch (
dist/,build/) hoặc thư mục gốc nếu là mã nguồn tĩnh thuần túy.Quản Trị Cơ Sở Dữ Liệu MySQL: Tự động tạo cơ sở dữ liệu, khởi tạo user tương ứng, sinh mật khẩu an toàn và cấp quyền
ALL PRIVILEGES.Sao Lưu Trước Deploy & Rollback: Tải bản snapshot của Document Root về thư mục
backups/<subdomain>/trước mỗi lần đẩy code mới. Cho phép khôi phục phiên bản cũ khi xảy ra sự cố.Thao Tác File Trực Tiếp: Liệt kê thư mục, đọc, ghi, tải lên và xóa file trên máy chủ thông qua kết nối FTP mà không cần đăng nhập cPanel File Manager.
Chuẩn Hóa Output JSON Schema: Toàn bộ công cụ trả về định dạng JSON có cấu trúc
{ success, action, message, data, error, timestamp, logs }.
Cài Đặt & Cấu Hình
Yêu Cầu Môi Trường
Node.js >= 20.0.0
Tài khoản hosting cPanel có hỗ trợ API Token (
Manage API Tokens) và FTP.
Bước 1: Clone và Cài Đặt Dependencies
git clone https://github.com/qu4nc0d3r/cpanel-workspace-hub.git
cd cpanel-workspace-hub
npm installBước 2: Khởi Chạy Wizard Cấu Hình
npm run setupTrình wizard sẽ yêu cầu nhập thông số hosting, kiểm tra xác thực trực tiếp qua mạng với cả cPanel UAPI và FTP, lưu cấu hình vào .env và in đoạn JSON dành cho MCP Client.
Bước 3: Kiểm Tra Trạng Thái Kết Nối
npm run checkCấu Hình MCP Bằng Lệnh
1. Claude Code CLI (Lệnh Trực Tiếp)
claude mcp add cpanel-hub node /đường/dẫn/tuyệt/đối/scripts/mcp-server.js2. Cursor (.cursor/mcp.json)
{
"mcpServers": {
"cpanel-hub": {
"command": "node",
"args": ["/đường/dẫn/tuyệt/đối/scripts/mcp-server.js"]
}
}
}3. Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"cpanel-hub": {
"command": "node",
"args": ["/đường/dẫn/tuyệt/đối/scripts/mcp-server.js"]
}
}
}Lệnh Điều Khiển CLI
Lệnh | Tham số | Mô tả chức năng |
| Không | Chạy wizard cấu hình tương tác và kiểm tra xác thực hosting |
| Không | Kiểm tra trạng thái kết nối cPanel UAPI và FTP |
|
| Tạo subdomain trên cPanel, tạo thư mục dự án và deploy bản đầu tiên |
|
| Tự động snapshot backup và deploy bản cập nhật mới nhất lên hosting |
|
| Khôi phục website về bản backup đã lưu |
| Không | Lấy danh sách toàn bộ subdomain và Document Root từ cPanel |
|
| Tạo Database MySQL, tạo User riêng, cấp quyền và sinh cấu hình ENV |
| Không | Liệt kê toàn bộ Database MySQL và danh sách User liên kết |
|
| Xóa Database và User MySQL của dự án |
| Không | Khởi động máy chủ Stdio MCP Server |
Bảng Đặc Tả 17 MCP Tools
Phân nhóm | Tên Tool | Mô tả chức năng |
Xác thực |
| Cấu hình hoặc cập nhật thông tin hosting trực tiếp qua cửa sổ chat |
| Kiểm tra tính hợp lệ của cấu hình và trạng thái kết nối hệ thống | |
Dự án & Subdomain |
| Đăng ký subdomain trên cPanel, khởi tạo template và deploy |
| Đồng bộ mã nguồn dự án (hoặc dist/build) lên hosting | |
| Lấy danh sách toàn bộ các subdomain đang chạy trên hosting | |
| Xóa subdomain khỏi cPanel thông qua API 2 | |
Sao Lưu & Rollback |
| Tải bản snapshot thư mục Document Root về thư mục cục bộ |
| Khôi phục website về bản sao lưu chỉ định hoặc mới nhất | |
| Xem danh sách các bản backup cục bộ của một dự án | |
Cơ Sở Dữ Liệu |
| Tạo Database MySQL, tạo user riêng và chuỗi kết nối |
| Liệt kê toàn bộ cơ sở dữ liệu MySQL và user liên kết | |
| Xóa Database MySQL và user liên kết của dự án | |
Thao Tác File |
| Xem danh sách file và thư mục tại một đường dẫn remote |
| Đọc nội dung văn bản của file trên hosting | |
| Ghi hoặc cập nhật nội dung file trực tiếp trên hosting | |
| Tải file cục bộ lên đường dẫn đích trên hosting | |
| Xóa file hoặc thư mục trên hosting |
Testing / Kiểm Thử
Hệ thống được kiểm thử tự động toàn diện qua node:test:
npm test53/53 tests độc lập đạt kết quả 100% PASS:
tests/config.test.js: Kiểm thử phân tích env, chuẩn hóa định dạng và lưu file an toàn.tests/cpanel-api.test.js: Mock UAPI & API 2, định danh subdomain, xử lý MySQL limits.tests/ftp-deploy.test.js: Kiểm thử kết nối FTPS, chuẩn hóa đường dẫn và giải phóng socket trong block finally.tests/cli.test.js: Kiểm thử router, copy đệ quy an toàn và phát hiện bundle dist/build.tests/db-and-backup.test.js: Kiểm thử quy trình snapshot backup và rollback.tests/mcp-server.test.js: Kiểm thử chuẩn hóa phản hồi JSON schema và cờisError.
License & Credits
Author: qu4nc0d3r
Live Landing Page: https://cpanel-hub.macquan.name.vn/
License: MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Agent-first web hosting: deploy sites, apps, databases and domains over MCP.
MCP server for Hostinger API
Create, deploy, and operate MCP servers directly from your GitHub repositories.
MCP Server for agents to onboard, pay, and provision services autonomously with InFlow
Related MCP Servers
- AlicenseAqualityDmaintenanceA complete MCP server enabling AI assistants to manage cPanel hosting through natural language, including file, database, email, subdomain, and system operations.161MIT
- FlicenseBqualityCmaintenanceA comprehensive MCP server for managing cPanel hosting accounts through AI assistants. It supports DNS, email (DKIM/SPF), databases, domains, SSL, PHP, cron jobs, security, Git deployment, and more.10018-
- AlicenseNot gradedqualityFmaintenanceA comprehensive MCP server for managing cPanel web hosting accounts via UAPI, enabling file, database, email, domain, cron, backup, and system monitoring operations.263MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to manage cPanel hosting accounts including DNS, email, databases, SSL, files, security, and more through natural language using cPanel's UAPI and API2.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/qu4nc0d3r/cpanel-workspace-hub'
If you have feedback or need assistance with the MCP directory API, please join our Discord server