pterodactyl-mcp
Provides tools for interacting with the Pterodactyl Panel API, enabling management of game servers, power states, files, backups, and administrative functions like user and node oversight.
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-mcpConfiguration
Set these environment variables:
Variable | Required | Description |
| Yes | Your Pterodactyl Panel URL |
| Yes | Application API key (starts with |
| No | Client API key (starts with |
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 all servers with ID, identifier, name, status, and limits | Read-only |
| Get detailed server config (limits, egg, container, allocations) | Read-only |
| Create a new server with egg, resources, and allocation | Destructive |
| Permanently delete a server and all its data | Destructive |
| Update server name, description, owner, or external ID | Destructive |
| Update resource limits (memory, CPU, disk, swap) | Destructive |
| Update startup command, Docker image, or egg | Destructive |
| Suspend a server (prevents users from starting it) | Destructive |
| Unsuspend a previously suspended server | Destructive |
| Reinstall server egg (wipes all files) | Destructive |
| List databases attached to a server (admin view) | Read-only |
Power Control (Client API)
Tool | Description | Type |
| Start a stopped server | Destructive |
| Stop a running server gracefully | Destructive |
| Restart a server (works running or stopped) | Destructive |
| Forcefully kill a server process (data loss risk) | Destructive |
| Get real-time CPU, memory, disk, network usage and power state | Read-only |
Console (Client API)
Tool | Description | Type |
| Send a console command to a running server | Destructive |
File Management (Client API)
Tool | Description | Type |
| List files and directories in a server's filesystem | Read-only |
| Read the contents of a text file | Read-only |
| Write content to a file (create or overwrite) | Destructive |
| Create a new directory | Destructive |
| Delete one or more files or folders | Destructive |
| Rename or move a file/folder | Destructive |
| Compress files into a .tar.gz archive | Destructive |
| Extract an archive file | Destructive |
Backups (Client API)
Tool | Description | Type |
| List all backups for a server | Read-only |
| Create a new server backup | Destructive |
Startup & Config (Client API)
Tool | Description | Type |
| Get startup command, env variables, and Docker images | Read-only |
Schedules (Client API)
Tool | Description | Type |
| List all scheduled tasks (cron jobs) for a server | Read-only |
Databases (Client API)
Tool | Description | Type |
| List databases for a server (client view) | Read-only |
Sub-users (Client API)
Tool | Description | Type |
| List sub-users with permissions for a server | Read-only |
Account (Client API)
Tool | Description | Type |
| Get the current authenticated user's account info | Read-only |
Users (Application API)
Tool | Description | Type |
| List all user accounts on the panel | Read-only |
| Get detailed info for a specific user | Read-only |
| Create a new user account | Destructive |
| Update a user's details | Destructive |
Nodes (Application API)
Tool | Description | Type |
| List all infrastructure nodes | Read-only |
| Get detailed info for a specific node | Read-only |
| Get Wings daemon configuration for a node | Read-only |
Panel Config (Application API)
Tool | Description | Type |
| List all available server templates (eggs) | Read-only |
| List all mount points | Read-only |
| 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 checkingContributing
Contributions are welcome! Please make sure pnpm lint, pnpm typecheck, and pnpm test all pass before submitting.
License
MIT
Available Tools
34 toolscreate_allocationADestructive
Create new port allocations on a node (admin action). Ports can be individual ('25565') or ranges ('25565-25570'). Use list_nodes to find the node_id first. Requires Application API key.
Inputs: node_id (required), ip (required), ports (required).
create_egg_variableADestructive
Add a new environment variable to an egg (admin action). The 'rules' field uses Laravel validation syntax (e.g., 'required|string|max:20'). Use list_nests and list_eggs to find the nest_id and egg_id. Requires Application API key.
Inputs: nest_id (required), egg_id (required), name (required), description (required), +5 more.
create_serverADestructive
Create a new game server on the panel (admin action). Requires egg ID (from list_eggs), owner user ID (from list_users), allocation ID, and resource limits. Use list_eggs to find available server templates and list_nodes to find nodes with capacity. Requires Application API key.
Inputs: name (required), user (required), egg (required), docker_image (required), +11 more.
create_userADestructive
Create a new user account on the panel (admin action). The user can then be assigned as owner of servers via create_server or update_server_details. SECURITY WARNING: Setting root_admin to true grants FULL panel access. Requires Application API key.
Inputs: username (required), email (required), password (required), root_admin.
delete_allocationADestructive
Delete a port allocation from a node (admin action). Cannot delete allocations that are in use by a server. Use list_allocations to find the allocation_id. Requires Application API key.
Inputs: node_id (required), allocation_id (required).
delete_eggADestructive
Permanently delete an egg/server template from a nest (admin action). WARNING: Servers currently using this egg will NOT be deleted but may not start correctly after the egg is removed. This action cannot be undone. Use get_egg to verify the egg before deleting. Requires Application API key.
Inputs: nest_id (required), egg_id (required).
delete_egg_variableADestructive
Delete an environment variable from an egg (admin action). This is permanent and cannot be undone. Use list_egg_variables to find the variable_id. Requires Application API key.
Inputs: nest_id (required), egg_id (required), variable_id (required).
delete_serverADestructive
Permanently delete a server and ALL its data including files, databases, and backups (admin action). WARNING: This action cannot be undone. The server will be removed from the panel entirely. Consider create_backup before proceeding. Requires Application API key.
Inputs: server_id (required).
export_eggARead-only
Export an egg as JSON that can be imported into another Pterodactyl panel (admin action). Returns the complete egg configuration including variables, install script, and Docker settings in the standard Pterodactyl egg export format. Use list_nests and list_eggs to find the nest_id and egg_id. Requires Application API key.
Inputs: nest_id (required), egg_id (required).
get_eggARead-only
Get full details of a specific egg/server template (admin action). Returns name, Docker image, startup command, install script, configuration, and all environment variables with their default values and validation rules. Use list_nests to find the nest_id and list_eggs to find the egg_id. Requires Application API key.
Inputs: nest_id (required), egg_id (required).
get_nestARead-only
Get details of a specific nest (egg category) by ID (admin action). Returns name, description, author, and metadata. Use list_nests to find the nest_id. Requires Application API key.
Inputs: nest_id (required).
get_nodeARead-only
Get detailed information about a specific infrastructure node (admin action). Returns name, FQDN, resource limits, allocated resources, scheme, and maintenance status. Use list_nodes to find the node ID first. Requires Application API key.
Inputs: node_id (required).
get_node_configARead-only
Get the Wings daemon configuration for a node (admin action). Returns the config.yml content needed to configure the Wings daemon. Sensitive fields (tokens, keys) are redacted. Use when setting up or troubleshooting a node. Requires Application API key.
Inputs: node_id (required).
get_serverARead-only
Get detailed static configuration for a server: name, description, resource limits, container config (egg, Docker image, startup command), allocations, and timestamps. Use for server config inspection. For live resource usage (CPU/RAM/disk), use get_server_resources instead. Sensitive environment variables are masked. Requires Application API key.
Inputs: server_id (required).
get_userARead-only
Get detailed information for a specific user account by numeric ID (admin action). Returns username, email, language, admin status, and timestamps. Use list_users to find the user ID first. Requires Application API key.
Inputs: user_id (required).
import_eggADestructive
Import or create a new egg (server template) in a nest (admin action). Eggs define the Docker image, startup command, and configuration for a type of game server. Use list_nests to find the nest_id first. The egg will be available for creating new servers via create_server. Requires Application API key.
Inputs: nest_id (required), name (required), docker_image (required), startup (required), +9 more.
list_allocationsARead-only
List all port allocations for a node (admin action). Shows IP, port, alias, and which server is using each allocation. Use list_nodes to find the node_id first. Requires Application API key.
Inputs: node_id (required), page, per_page.
list_eggsARead-only
List all available eggs/server templates on the panel (admin action). Returns egg ID, name, description, Docker images, and startup command. Use to find the egg ID needed for create_server. Common eggs: Minecraft, Rust, Terraria, etc. Requires Application API key.
Inputs: no named parameters.
list_egg_variablesARead-only
List all environment variables defined for an egg (admin action). Shows name, env_variable key, default value, validation rules, and user editability. On Pelican panels, use nest_id=0. Requires Application API key.
Inputs: nest_id (required), egg_id (required).
list_mountsARead-only
List all mount points configured on the panel (admin action). Returns mount name, source path, target path, and read-only status. Mounts allow sharing host directories with server containers. Requires Application API key.
Inputs: no named parameters.
list_nestsARead-only
List all nests (egg categories) on the panel (admin action). Nests group related eggs together (e.g. 'Minecraft', 'Voice Servers', 'Rust'). Returns nest ID, name, author, and description. Use the nest ID with list_eggs or get_egg to find specific server templates. Requires Application API key.
Inputs: no named parameters.
list_nodesARead-only
List all infrastructure nodes in the panel (admin action). Returns node ID, name, FQDN, total/allocated resources (memory, disk, CPU), and maintenance mode status. Use to check available capacity before creating servers. Supports pagination. Requires Application API key.
Inputs: page, per_page.
list_rolesARead-only
List all admin roles defined on the panel (admin action). Returns role ID, name, and timestamps. Roles control admin panel access permissions. Requires Application API key.
Inputs: no named parameters.
list_server_databasesARead-only
List databases attached to a server from the admin perspective (admin action). Returns database host, name, and connection details. For client-level database access, use list_client_databases instead. Requires Application API key.
Inputs: server_id (required).
list_serversARead-only
List all game servers on the Pterodactyl panel with name, status, and resource limits. Call this first to discover server IDs and identifiers. Returns numeric 'id' (for admin tools like suspend_server, delete_server, update_server_build) and short 'identifier' (for client tools like start_server, send_command, list_files). Supports pagination. Requires Application API key.
Inputs: page, per_page.
list_usersARead-only
List all user accounts registered on the panel (admin action). Returns user ID, username, email, language, and admin status. Use to find user IDs needed for create_server (owner) or update_server_details. Supports pagination. Requires Application API key.
Inputs: page, per_page.
reinstall_serverADestructive
Reinstall a server's egg/template (admin action). WARNING: This wipes ALL server files and reinstalls from scratch. All player data, configs, and world files will be permanently deleted. Consider create_backup before proceeding. Requires Application API key.
Inputs: server_id (required).
suspend_serverADestructiveIdempotent
Suspend a server (admin action). Suspended servers are forcefully stopped and users cannot start them until unsuspended. Use to disable a server for policy violations or billing issues. Use unsuspend_server to re-enable. Requires Application API key.
Inputs: server_id (required).
unsuspend_serverADestructiveIdempotent
Unsuspend a previously suspended server (admin action). Re-enables the server so users can start and use it again. Idempotent: calling on a non-suspended server has no effect. Requires Application API key.
Inputs: server_id (required).
update_egg_variableADestructive
Update an existing environment variable on an egg (admin action). All fields are optional - only provided fields will be changed. Use list_egg_variables to find the variable_id. Requires Application API key.
Inputs: nest_id (required), egg_id (required), variable_id (required), name, +6 more.
update_server_buildADestructive
Update a server's resource limits: memory, CPU, disk, swap, IO weight, CPU pinning, and feature limits like max databases/backups (admin action). Only specify the fields you want to change - current values are preserved for unspecified fields. Changes take effect after server restart. For server metadata (name, owner), use update_server_details. Requires Application API key.
Inputs: server_id (required), memory, swap, disk, +7 more.
update_server_detailsADestructive
Update a server's metadata: name, description, owner, or external ID (admin action). Only specify the fields you want to change - current values are preserved for unspecified fields. For resource limits, use update_server_build. Requires Application API key.
Inputs: server_id (required), name, description, user, +1 more.
update_server_startupADestructive
Update a server's startup configuration: startup command, Docker image, or egg template (admin action). Only specify the fields you want to change - current values are preserved for unspecified fields. Changes take effect after server restart. Requires Application API key.
Inputs: server_id (required), startup, image, egg.
update_userADestructive
Update an existing user account's details: username, email, password, or admin status (admin action). Use list_users or get_user to find the user ID first. Requires Application API key.
Inputs: user_id (required), username, email, password, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 34 tools
Tools are mostly distinct by resource (server, egg, user, node, allocation), with clear admin vs client separation in descriptions. Minor overlap exists between list_server_databases and list_client_databases (though one is referenced but not present), and between get_server and get_server_resources (but descriptions clarify purpose).
All tool names follow a strict verb_noun_concrete pattern (e.g., list_servers, get_server, update_server_build, delete_egg_variable). Variants like update_server_build and update_server_details are consistent and descriptive. No camelCase or inconsistent verbs.
34 tools is on the heavy side but appropriate for a full Pterodactyl panel admin API covering servers, users, eggs, nests, nodes, allocations, and mounts. Each tool maps to a concrete endpoint, and the count is justified by the breadth of the domain, though slightly above the ideal 3-15 range.
Core lifecycle operations are present for servers (create, delete, update details/build/startup, suspend/unsuspend/reinstall), users (create, get, list, update), eggs (list, get, create, update variable, delete, import/export). However, missing operations like get_allocation, get_mount, list_role_permissions, and client-level tools (start/stop, file management) create notable gaps for a fully rounded panel management surface.
Related MCP Connectors
MCP-ready hosting provider for Minecraft, BungeeCord, TeamSpeak, VPS and many other game servers.
Manage game servers, configurations, players, and groups through the GameServerApp MCP server.
MCP registry & directory: search, find & install 31k+ MCP servers & tools. Catalog and marketplace.
Official xCloud MCP: manage servers, sites, WordPress, SSL, backups and deploys from any MCP client.