MCP Hub
Back to servers

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.

glama
Forks
1
Updated
Mar 14, 2026

pterodactyl-mcp

npm version License: MIT Node.js

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:

VariableRequiredDescription
PTERODACTYL_URLYesYour Pterodactyl Panel URL
PTERODACTYL_APP_KEYYesApplication API key (starts with ptla_)
PTERODACTYL_CLIENT_KEYNoClient 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)

ToolDescriptionType
list_serversList all servers with ID, identifier, name, status, and limitsRead-only
get_serverGet detailed server config (limits, egg, container, allocations)Read-only
create_serverCreate a new server with egg, resources, and allocationDestructive
delete_serverPermanently delete a server and all its dataDestructive
update_server_detailsUpdate server name, description, owner, or external IDDestructive
update_server_buildUpdate resource limits (memory, CPU, disk, swap)Destructive
update_server_startupUpdate startup command, Docker image, or eggDestructive
suspend_serverSuspend a server (prevents users from starting it)Destructive
unsuspend_serverUnsuspend a previously suspended serverDestructive
reinstall_serverReinstall server egg (wipes all files)Destructive
list_server_databasesList databases attached to a server (admin view)Read-only

Power Control (Client API)

ToolDescriptionType
start_serverStart a stopped serverDestructive
stop_serverStop a running server gracefullyDestructive
restart_serverRestart a server (works running or stopped)Destructive
kill_serverForcefully kill a server process (data loss risk)Destructive
get_server_resourcesGet real-time CPU, memory, disk, network usage and power stateRead-only

Console (Client API)

ToolDescriptionType
send_commandSend a console command to a running serverDestructive

File Management (Client API)

ToolDescriptionType
list_filesList files and directories in a server's filesystemRead-only
read_fileRead the contents of a text fileRead-only
write_fileWrite content to a file (create or overwrite)Destructive
create_folderCreate a new directoryDestructive
delete_filesDelete one or more files or foldersDestructive
rename_fileRename or move a file/folderDestructive
compress_filesCompress files into a .tar.gz archiveDestructive
decompress_fileExtract an archive fileDestructive

Backups (Client API)

ToolDescriptionType
list_backupsList all backups for a serverRead-only
create_backupCreate a new server backupDestructive

Startup & Config (Client API)

ToolDescriptionType
get_startup_variablesGet startup command, env variables, and Docker imagesRead-only

Schedules (Client API)

ToolDescriptionType
list_schedulesList all scheduled tasks (cron jobs) for a serverRead-only

Databases (Client API)

ToolDescriptionType
list_client_databasesList databases for a server (client view)Read-only

Sub-users (Client API)

ToolDescriptionType
list_subusersList sub-users with permissions for a serverRead-only

Account (Client API)

ToolDescriptionType
get_accountGet the current authenticated user's account infoRead-only

Users (Application API)

ToolDescriptionType
list_usersList all user accounts on the panelRead-only
get_userGet detailed info for a specific userRead-only
create_userCreate a new user accountDestructive
update_userUpdate a user's detailsDestructive

Nodes (Application API)

ToolDescriptionType
list_nodesList all infrastructure nodesRead-only
get_nodeGet detailed info for a specific nodeRead-only
get_node_configGet Wings daemon configuration for a nodeRead-only

Panel Config (Application API)

ToolDescriptionType
list_eggsList all available server templates (eggs)Read-only
list_mountsList all mount pointsRead-only
list_rolesList all admin rolesRead-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: 7
  • server_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

Reviews

No reviews yet

Sign in to write a review