Back to MCP directory
publicPublicdnsLocal runtime

mcp-beget

MCP服务器用于通过Claude Code管理Beget托管服务,支持管理网站、域名、数据库、FTP、Cron任务、DNS、备份和邮件等功能。

article

README

🚀 MCP Beget

MCP Server 可通过 Claude Code 管理 Beget 主机服务。它能让你直接在 Claude Code 中管理网站、域名、MySQL 数据库、FTP 账户、Cron 任务、DNS、备份和邮件等。

✨ 主要特性

| 类别 | 命令 | | ---- | ---- | | 网站 | 列表、创建、删除、绑定/解绑域名 | | 域名 | 列表、添加、删除、子域名、PHP 版本 | | MySQL | 数据库列表、创建、删除、更改密码 | | FTP | 账户列表、创建、删除、更改密码 | | Cron | 任务列表、添加、删除 | | DNS | 获取记录、设置记录 | | 备份 | 备份列表(文件/MySQL)、恢复 | | 邮件 | 邮箱列表、创建 | | 统计信息 | 网站负载、账户信息 |

📦 安装指南

1. 克隆仓库

git clone https://github.com/yasg1988/mcp-beget.git
cd mcp-beget

2. 安装依赖

pip install -e .

3. 配置 Claude Code

在 Claude Code 的配置文件 (~/.claude/settings.json) 中添加以下内容:

{
  "mcpServers": {
    "beget": {
      "command": "python",
      "args": ["PATH_TO/mcp-beget/server.py"],
      "env": {
        "BEGET_LOGIN": "你的登录名",
        "BEGET_PASSWORD": "你的密码"
      }
    }
  }
}

🔧 技术细节

环境变量

| 变量 | 描述 | 是否必需 | | ---- | ---- | ---- | | BEGET_LOGIN | Beget 面板的登录名 | 是 | | BEGET_PASSWORD | Beget 面板的密码 | 是 |

⚠️ 重要提示

切勿将登录名和密码存储在代码中!

可用工具

  • beget_site_listbeget_site_addbeget_site_delete
  • beget_domain_listbeget_domain_addbeget_domain_php_version
  • beget_mysql_listbeget_mysql_addbeget_mysql_delete
  • beget_ftp_listbeget_ftp_addbeget_cron_listbeget_cron_add
  • beget_dns_getbeget_dns_set
  • beget_backup_files_listbeget_backup_mysql_list
  • beget_mail_listbeget_mail_create
  • beget_stat_loadbeget_account_info

📚 详细文档

相关链接

📄 许可证

本项目采用 MIT 许可证。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client