CloudNet MCP Server
The CloudNet MCP Server provides an interface for AI assistants to monitor and manage a CloudNet Minecraft network cluster.
Node Management: List all cluster nodes and retrieve detailed statistics for specific nodes.
Service Management: List all active smart services and execute commands directly on a service's console.
Player Management: Retrieve a paginated, sortable list of online players; look up detailed player profiles by name or UUID; kick players with a custom message; send chat messages; and execute commands on behalf of a player (with optional proxy redirection).
QQ Bot Mode (Optional): Adds specialized tools (
get_services_summary,find_player,get_command_help,execute_safe_command) with permission-based safe command execution (Guest, Admin, Super User), custom command whitelists, and automatic blocking of dangerous commands likeop,deop, andexecute.
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., "@CloudNet MCP Serverlist all online players"
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.
CloudNet MCP Server
This is a Model Context Protocol (MCP) server that provides an interface to the CloudNet Service REST API v3. This allows AI assistants to observe your CloudNet nodes and services safely and accurately.
Features
Get Nodes & Information: List all cluster nodes and fetch detailed statistics.
Manage Services: List active smart services and seamlessly execute commands on server consoles.
Player Management: Retrieve online players, inspect player profiles, kick players, send messages, and execute commands on their behalf.
QQ Bot Mode: Optimized for QQ group server management bots with safe command execution.
Prerequisites
Python 3.12+
uvPackage Manager
Installation
git clone https://github.com/yourusername/cloudnet-mcp.git
cd cloudnet-mcp
uv syncConfiguration
Environment Variables
CLOUDNET_URL: The URL to the REST API (default:http://127.0.0.1:2812/api/v3)CLOUDNET_USER: Basic auth usernameCLOUDNET_PASSWORD: Basic auth password
QQ Bot Mode (Optional)
Copy the example config and customize:
cp config.example.yaml config.yamlEnable QQ mode in config.yaml:
qq_mode:
enabled: true
safe_commands_only: true
chinese_responses: trueRunning
# Basic usage
uv run cloudnet-mcp
# With config file
uv run cloudnet-mcp -c config.yamlCommand Line Options
Option | Description |
| Path to YAML configuration file |
QQ Bot Mode
When QQ mode is enabled, additional tools become available:
Tool | Description |
| Get server status overview |
| Search player across servers |
| List available commands by permission |
| Execute whitelisted commands only |
Safe Command Execution
Commands are organized by permission level:
Guest: Query commands (
list,tps,seed, etc.)Admin: Management commands (
kick,ban,whitelist,gamemode, etc.)Super User: Server commands (
stop,restart,reload, etc.)
Permission inheritance: Admin inherits Guest, Super User inherits all.
Custom Commands
Add custom commands in config.yaml:
safe_commands:
guest:
- command: stats
args: "<player>"
description: "View player statistics"
admin:
- command: money
args: "set <player> <amount>"
description: "Set player balance"Custom commands merge with built-in commands. Override built-in descriptions by using the same command name.
Blocked Commands
These patterns are always blocked:
op- Grant operator statusdeop- Revoke operator statusexecute- Execute as another entity
Using with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"cloudnet": {
"command": "uv",
"args": [
"--directory",
"PATH/TO/YOUR/cloudnet-mcp",
"run",
"cloudnet-mcp",
"-c",
"PATH/TO/YOUR/cloudnet-mcp/config.yaml"
],
"env": {
"CLOUDNET_URL": "http://127.0.0.1:2812/api/v3",
"CLOUDNET_USER": "your_user",
"CLOUDNET_PASSWORD": "your_password"
}
}
}
}CloudNet MCP 服务器
这是一个模型上下文协议 (MCP) 服务器,提供了对 CloudNet Service REST API v3 的接口访问支持。它使得 AI 助手能够安全准确地观测您的 CloudNet 节点和服务。
功能特性
获取节点列表及信息: 查看整个 CloudNet 集群内所有节点的详细统计数据和信息
管理服务: 获取运行中的智能服务列表,支持在服务端控制台远程执行命令
玩家管理: 查询在线玩家、查看玩家详情、踢出玩家、发送消息、代替玩家执行命令
QQ Bot 模式: 针对 QQ 群服务器管理机器人的优化模式,支持安全命令执行
前置要求
Python 3.12 及以上版本
uv包管理器
安装指南
git clone https://github.com/yourusername/cloudnet-mcp.git
cd cloudnet-mcp
uv sync配置
环境变量
CLOUDNET_URL: CloudNet REST API 地址 (默认:http://127.0.0.1:2812/api/v3)CLOUDNET_USER: 基本认证的用户名CLOUDNET_PASSWORD: 基本认证的密码
QQ Bot 模式 (可选)
复制示例配置文件并修改:
cp config.example.yaml config.yaml在 config.yaml 中启用 QQ 模式:
qq_mode:
enabled: true
safe_commands_only: true
chinese_responses: true运行
# 基本用法
uv run cloudnet-mcp
# 使用配置文件
uv run cloudnet-mcp -c config.yaml命令行参数
参数 | 说明 |
| YAML 配置文件路径 |
QQ Bot 模式
启用 QQ 模式后,将提供以下额外工具:
工具 | 说明 |
| 获取服务器状态总览 |
| 跨服搜索玩家 |
| 按权限列出可用命令 |
| 仅执行白名单内的命令 |
安全命令执行
命令按权限级别组织:
Guest (访客): 查询类命令 (
list,tps,seed等)Admin (管理员): 管理类命令 (
kick,ban,whitelist,gamemode等)Super User (超级用户): 服务器管理命令 (
stop,restart,reload等)
权限继承:管理员继承访客权限,超级用户继承所有权限。
内置命令列表
Guest 级别 (11个):
list- 查看在线玩家列表tps- 查看服务器TPSseed- 查看世界种子difficulty- 查看游戏难度whitelist list- 查看白名单列表time query- 查询游戏时间gamerule query- 查询游戏规则scoreboard objectives list- 列出计分板目标scoreboard players list- 列出计分板玩家bossbar list- 列出Boss栏trigger- 触发计分板目标
Admin 级别 (41个):
kick <玩家> [原因]- 踢出玩家ban <玩家> [原因]- 封禁玩家pardon <玩家>- 解封玩家ban-ip <地址|玩家> [原因]- 封禁IPpardon-ip <地址>- 解封IPwhitelist add/remove <玩家>- 白名单管理whitelist on/off/reload- 白名单开关与重载gamemode <模式> [玩家]- 设置游戏模式tp <实体|坐标>- 传送实体give <玩家> <物品> [数量]- 给予物品clear [玩家] [物品] [数量]- 清除物品effect <玩家> give|clear- 给予/清除效果enchant <玩家> <附魔> [等级]- 附魔物品summon <实体> [坐标]- 召唤实体kill [实体]- 杀死实体fill/setblock/clone- 方块操作weather clear|rain|thunder- 设置天气time set <时间>- 设置游戏时间更多...
Super User 级别 (16个):
stop- 停止服务器restart- 重启服务器reload- 重载数据包save-all/save-off/save-on- 保存控制debug start|stop- 调试性能分析gamerule set <规则> <值>- 设置游戏规则defaultgamemode <模式>- 设置默认游戏模式更多...
自定义命令
在 config.yaml 中添加自定义命令:
safe_commands:
guest:
- command: stats
args: "<玩家>"
description: "查看玩家统计"
- command: ping
description: "查看延迟"
admin:
- command: money
args: "set <玩家> <金额>"
description: "设置玩家余额"
- command: heal
args: "[玩家]"
description: "治疗玩家"
super_user:
- command: plugins
description: "查看插件列表"自定义命令会与内置命令合并。使用相同的命令名可覆盖内置命令的描述。
被阻止的命令
以下命令模板始终被阻止:
op- 授予管理员权限deop- 撤销管理员权限execute- 以其他实体身份执行
在 Claude Desktop 中使用
将以下配置添加至您的 claude_desktop_config.json:
{
"mcpServers": {
"cloudnet": {
"command": "uv",
"args": [
"--directory",
"PATH/TO/YOUR/cloudnet-mcp",
"run",
"cloudnet-mcp",
"-c",
"PATH/TO/YOUR/cloudnet-mcp/config.yaml"
],
"env": {
"CLOUDNET_URL": "http://127.0.0.1:2812/api/v3",
"CLOUDNET_USER": "您的用户名",
"CLOUDNET_PASSWORD": "您的密码"
}
}
}
}Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/Ergo042/cloudnet-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server