obambu-cpanel-mcp

obambu-cpanel-mcp

MCP server for managing cPanel hosting accounts via UAPI. Enables domains, DNS, email, MySQL, file management, and arbitrary UAPI calls through natural language.

Category
访问服务器

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):

{
  "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

git clone https://github.com/RodrigueDev13/obambu-cpanel-mcp.git
cd obambu-cpanel-mcp
npm install
cp .env.example .env

Edit .env with your cPanel details, then:

npm run build
npm start

For local development without building first:

npm run dev

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

{
  "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

Tool Description
get_account_summary Disk/bandwidth quota usage and general stats
list_domains Domains, subdomains, addon domains and parked domains
list_dns_records Read a domain's DNS zone
add_dns_record Add a DNS record
edit_dns_record Edit an existing DNS record
remove_dns_record Remove a DNS record
list_emails List email accounts
create_email Create an email account
delete_email Delete an email account
list_files List files/directories under the account home directory
list_databases List MySQL databases
list_database_users List MySQL database users
create_database Create a MySQL database
create_database_user Create a MySQL database user
grant_database_privileges Grant a user privileges on a database
cpanel_uapi_call Call 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 contact@example.com" → 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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选