pterodactyl-mcp
MCP server for Pterodactyl and Pelican game server panels. 73 tools for server management, power control, file operations, backups, schedules, databases, users, nodes, and eggs.
README
pterodactyl-mcp
The first MCP server for Pterodactyl Panel. Manage your game servers with AI.
An MCP (Model Context Protocol) server that exposes the Pterodactyl Panel API to LLMs. Connect Claude, Cursor, or any MCP-compatible client to your game server infrastructure and manage it through natural language.
Features
- 42 MCP tools covering server management, power control, file management, backups, users, nodes, and more
- Dual API key support - Application API (admin) + Client API (power, files, console)
- Read-only and destructive actions properly annotated so your AI client can warn before dangerous operations
- Rate limiting and retry logic built-in with exponential backoff
- TypeScript, fully typed with strict mode enabled
- Zod validation on all inputs for robust parameter checking
- Structured JSON responses optimized for LLM consumption
- Health check on startup to verify panel connectivity
Quick Start
npx @zefarie/pterodactyl-mcp
Configuration
Set these environment variables:
| Variable | Required | Description |
|---|---|---|
PTERODACTYL_URL |
Yes | Your Pterodactyl Panel URL |
PTERODACTYL_APP_KEY |
Yes | Application API key (starts with ptla_) |
PTERODACTYL_CLIENT_KEY |
No | Client API key (starts with ptlc_) for power/files/console tools |
Usage with Claude Desktop / Claude Code / Cursor
Add to your MCP configuration:
{
"mcpServers": {
"pterodactyl": {
"command": "npx",
"args": ["-y", "@zefarie/pterodactyl-mcp"],
"env": {
"PTERODACTYL_URL": "https://panel.example.com",
"PTERODACTYL_APP_KEY": "ptla_xxxxxxxxxxxxx",
"PTERODACTYL_CLIENT_KEY": "ptlc_xxxxxxxxxxxxx"
}
}
}
}
See docs/SETUP.md for platform-specific config file locations and troubleshooting.
Hosted Mode (Cloudflare Worker)
You can also deploy pterodactyl-mcp as a Cloudflare Worker, giving each user a unique MCP endpoint URL without running anything locally. See the Cloudflare Worker Deployment section in the setup guide.
Available Tools (42)
Server Management (Application API)
| Tool | Description | Type |
|---|---|---|
list_servers |
List all servers with ID, identifier, name, status, and limits | Read-only |
get_server |
Get detailed server config (limits, egg, container, allocations) | Read-only |
create_server |
Create a new server with egg, resources, and allocation | Destructive |
delete_server |
Permanently delete a server and all its data | Destructive |
update_server_details |
Update server name, description, owner, or external ID | Destructive |
update_server_build |
Update resource limits (memory, CPU, disk, swap) | Destructive |
update_server_startup |
Update startup command, Docker image, or egg | Destructive |
suspend_server |
Suspend a server (prevents users from starting it) | Destructive |
unsuspend_server |
Unsuspend a previously suspended server | Destructive |
reinstall_server |
Reinstall server egg (wipes all files) | Destructive |
list_server_databases |
List databases attached to a server (admin view) | Read-only |
Power Control (Client API)
| Tool | Description | Type |
|---|---|---|
start_server |
Start a stopped server | Destructive |
stop_server |
Stop a running server gracefully | Destructive |
restart_server |
Restart a server (works running or stopped) | Destructive |
kill_server |
Forcefully kill a server process (data loss risk) | Destructive |
get_server_resources |
Get real-time CPU, memory, disk, network usage and power state | Read-only |
Console (Client API)
| Tool | Description | Type |
|---|---|---|
send_command |
Send a console command to a running server | Destructive |
File Management (Client API)
| Tool | Description | Type |
|---|---|---|
list_files |
List files and directories in a server's filesystem | Read-only |
read_file |
Read the contents of a text file | Read-only |
write_file |
Write content to a file (create or overwrite) | Destructive |
create_folder |
Create a new directory | Destructive |
delete_files |
Delete one or more files or folders | Destructive |
rename_file |
Rename or move a file/folder | Destructive |
compress_files |
Compress files into a .tar.gz archive | Destructive |
decompress_file |
Extract an archive file | Destructive |
Backups (Client API)
| Tool | Description | Type |
|---|---|---|
list_backups |
List all backups for a server | Read-only |
create_backup |
Create a new server backup | Destructive |
Startup & Config (Client API)
| Tool | Description | Type |
|---|---|---|
get_startup_variables |
Get startup command, env variables, and Docker images | Read-only |
Schedules (Client API)
| Tool | Description | Type |
|---|---|---|
list_schedules |
List all scheduled tasks (cron jobs) for a server | Read-only |
Databases (Client API)
| Tool | Description | Type |
|---|---|---|
list_client_databases |
List databases for a server (client view) | Read-only |
Sub-users (Client API)
| Tool | Description | Type |
|---|---|---|
list_subusers |
List sub-users with permissions for a server | Read-only |
Account (Client API)
| Tool | Description | Type |
|---|---|---|
get_account |
Get the current authenticated user's account info | Read-only |
Users (Application API)
| Tool | Description | Type |
|---|---|---|
list_users |
List all user accounts on the panel | Read-only |
get_user |
Get detailed info for a specific user | Read-only |
create_user |
Create a new user account | Destructive |
update_user |
Update a user's details | Destructive |
Nodes (Application API)
| Tool | Description | Type |
|---|---|---|
list_nodes |
List all infrastructure nodes | Read-only |
get_node |
Get detailed info for a specific node | Read-only |
get_node_config |
Get Wings daemon configuration for a node | Read-only |
Panel Config (Application API)
| Tool | Description | Type |
|---|---|---|
list_eggs |
List all available server templates (eggs) | Read-only |
list_mounts |
List all mount points | Read-only |
list_roles |
List all admin roles | Read-only |
See docs/TOOLS.md for detailed documentation on each tool, including parameters and example responses.
Important: Server ID vs Identifier
Pterodactyl uses two different identifiers for servers:
server_id(number) - Used by Application API (admin) tools. Example:7server_identifier(string) - Used by Client API tools (power, files, console). Example:"a1b2c3d4"
Call list_servers first to get both values. The response includes both id (numeric) and identifier (string) for each server.
Getting API Keys
Application API Key (required, ptla_):
Admin Panel > Application API > Create New
Client API Key (optional, ptlc_):
Account > API Credentials > Create
See docs/SETUP.md for detailed instructions.
Development
pnpm install # Install dependencies
pnpm build # Build the project
pnpm test # Run unit tests
pnpm lint # Run linter and formatter
pnpm typecheck # Type checking
Contributing
Contributions are welcome! Please make sure pnpm lint, pnpm typecheck, and pnpm test all pass before submitting.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。