Obambu cPanel MCP

io.github.RodrigueDev13由 GitHub 帳號 RodrigueDev13 發布v0.1.2更新於 Oct 24, 2026

MCP server exposing cPanel UAPI (domains, DNS, email, MySQL, files) as tools for AI assistants.

概覽

AI 產生的概覽

本機 MCP 伺服器,讓 AI 助理透過 cPanel UAPI 管理 cPanel 主機帳號:網域、DNS、電子郵件、MySQL 與檔案。

可以做什麼
檢視帳號:配額與頻寬用量、網域與子網域、DNS 區域記錄、電子郵件帳號、MySQL 資料庫與使用者、家目錄下的檔案。管理 DNS 記錄:新增、編輯與刪除網域區域中的記錄。管理電子郵件帳號:建立與刪除信箱。管理 MySQL:建立資料庫與使用者、授予權限。透過通用呼叫入口呼叫其他任意 cPanel UAPI 模組或函式,包括讀取與儲存個別檔案。
適用情境
適合用自然語言讓助理處理 cPanel 主機日常事務:網域切換前檢查網域與 DNS、新增 DNS 記錄、建立信箱、為新應用程式配置資料庫,或在移轉時稽核帳號。
執行需求
透過 npx 在本機執行,需要 Node.js 18 或更新版本。需要可存取 API 權杖的 cPanel 帳號,並設定四個環境變數:CPANEL_HOST、CPANEL_USERNAME、CPANEL_API_TOKEN,以及選用的 CPANEL_PORT。需要能連線到 cPanel 伺服器的網路。
安裝前請注意
CPANEL_API_TOKEN 中的權杖可存取該主機帳號的 API,應依服務商允許的範圍盡量縮小權限,並避免提交到版本庫。多個工具會寫入或刪除:DNS 記錄、電子郵件帳號、資料庫與使用者;通用 UAPI 呼叫可執行帳號可用的任意函式,包括寫入檔案。大量檔案操作建議改用 cPanel 檔案管理員。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Obambu cPanel MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

obambu-cpanel-mcp

A Model Context Protocol (MCP) server that lets an AI assistant (Claude, etc.) manage a cPanel hosting account through the cPanel UAPI.

It exposes tools for domains, DNS zones, email accounts, MySQL databases, and file listing, plus a generic escape hatch to call any other UAPI module/function.

Requirements

  • Node.js 18+
  • A cPanel account with API token access (Security → Manage API Tokens in cPanel)

Getting your cPanel credentials (Obambu example)

The four env vars below can come from any cPanel host, but here's how to find them on Obambu:

  • CPANEL_HOST — your server hostname, e.g. cp4.obambu.com (or your own domain if cPanel is reachable at https://yourdomain.com:2083). Find it in your Obambu welcome email, or in your domain's DNS zone: look for an A record named cpanel (e.g. cpanel.yourdomain.com) — that same server also answers at its cpX.obambu.com hostname.
  • CPANEL_PORT — 00000 (cPanel's default HTTPS port). Leave it unless your host says otherwise.
  • CPANEL_USERNAME — your cPanel account username, shown top-right when logged into cPanel, or in the welcome email Obambu sent when the hosting account was created.
  • CPANEL_API_TOKEN — generate one yourself, it is not your cPanel password:
    1. Log into cPanel at https://<CPANEL_HOST>:00000
    2. Go to Security → Manage API Tokens
    3. Click Create, give it a name (e.g. mcp-server), optionally restrict it to specific ACLs, then Create
    4. Copy the token immediately — cPanel only shows it once

Using it with an MCP client (npx, recommended)

Published on npm as obambu-cpanel-mcp — no clone or build needed. Add it to your MCP client config (e.g. Claude Desktop / Claude Code):

json
{  "mcpServers": {    "obambu-cpanel": {      "command": "npx",      "args": ["-y", "obambu-cpanel-mcp"],      "env": {        "CPANEL_HOST": "your-server-hostname-or-ip",        "CPANEL_PORT": "00000",        "CPANEL_USERNAME": "your-cpanel-username",        "CPANEL_API_TOKEN": "your-api-token"      }    }  }}

Running from source

bash
git clone https://github.com/RodrigueDev13/obambu-cpanel-mcp.gitcd obambu-cpanel-mcpnpm installcp .env.example .env

Edit .env with your cPanel details, then:

bash
npm run buildnpm start

For local development without building first:

bash
npm run dev

When running from source, point your MCP client at the built entrypoint instead of npx:

json
{  "mcpServers": {    "obambu-cpanel": {      "command": "node",      "args": ["/absolute/path/to/obambu-cpanel-mcp/dist/index.js"],      "env": {        "CPANEL_HOST": "your-server-hostname-or-ip",        "CPANEL_PORT": "00000",        "CPANEL_USERNAME": "your-cpanel-username",        "CPANEL_API_TOKEN": "your-api-token"      }    }  }}

Available tools

ToolDescription
get_account_summaryDisk/bandwidth quota usage and general stats
list_domainsDomains, subdomains, addon domains and parked domains
list_dns_recordsRead a domain's DNS zone
add_dns_recordAdd a DNS record
edit_dns_recordEdit an existing DNS record
remove_dns_recordRemove a DNS record
list_emailsList email accounts
create_emailCreate an email account
delete_emailDelete an email account
list_filesList files/directories under the account home directory
list_databasesList MySQL databases
list_database_usersList MySQL database users
create_databaseCreate a MySQL database
create_database_userCreate a MySQL database user
grant_database_privilegesGrant a user privileges on a database
cpanel_uapi_callCall any UAPI module/function directly for anything not covered above

Usage examples

Once connected, just talk to your assistant in plain language — it picks the right tool:

  • "Test the connection to my cPanel account" → get_account_summary
  • "What domains and subdomains are on this hosting account?" → list_domains
  • "Show me the DNS records for example.com" → list_dns_records
  • "Add an A record for shop.example.com pointing to 1.2.3.4" → add_dns_record
  • "Create a mailbox [email protected]" → create_email
  • "Create a MySQL database and user for my new app, then grant privileges" → create_database + create_database_user + grant_database_privileges
  • "List the files in public_html" → list_files
  • "Read config/filesystems.php and fix this path" → cpanel_uapi_call with module: "Fileman", function: "get_file_content" / save_file_content

Because tool calls map directly to UAPI modules, this is also useful for real migration/deployment workflows — e.g. moving a site to a new cPanel account, provisioning a database for a fresh app, or auditing DNS before a domain cutover.

Notes on Fileman

Only list_files (backed by Fileman::list_files) and, through the cpanel_uapi_call escape hatch, get_file_content / save_file_content are known to work reliably for reading and writing individual files. Bulk filesystem operations (extract_files, rename, mkdir, fileop, delete_files, ...) are not guaranteed to be available depending on your cPanel version/provider — test before relying on them, and prefer cPanel's File Manager UI for bulk moves, extraction, and deletion.

Security

  • Never commit your .env file (it's git-ignored by default).
  • Scope your cPanel API token as narrowly as your provider allows.
  • The cpanel_uapi_call tool can call any UAPI function available to your account — treat it with the same care as direct API/token access.

License

MIT

來源:README.md,提交 84d3b3c

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分