Skip to main content
Glama

hostmybot-mcp

Model Context Protocol (MCP) server for the HostMyBot / Pterodactyl Client API (/api/client). Designed for AI coding agents (Antigravity, Claude Code, Codex, Cursor, and any stdio MCP client) with token-optimized responses and full coverage of server management, file uploads/downloads, backups, cron schedules, startup variables, and subusers.

Features

  • Token-optimized responses: Strips noisy Pterodactyl wrapper objects (object: "list", empty/null fields, verbose egg invocation scripts) and formats byte sizes into human-readable units.

  • Safety guards & MCP annotations: Read-only and destructive tools include standard MCP annotations (readOnlyHint, destructiveHint, idempotentHint). reinstall_server requires confirm: true.

  • Two-step binary/text file upload: upload_file reads a local file from disk, requests a signed Wings upload URL, and uploads via multipart/form-data.

  • Agent-agnostic configuration: Pass credentials via env (HOSTMYBOT_API_KEY, HOSTMYBOT_URL) or CLI flags (--api-key, --url).

Related MCP server: pterodactyl-mcp

Setup

1. Build from source

git clone https://github.com/enderliker/hostmybot-mcp.git
cd hostmybot-mcp
npm install
npm run build

Requires Node.js >= 20 and a Pterodactyl Client API key (ptlc_...) generated from https://client.hostmybot.net/account/api.

2. Configure in your MCP Agent

Antigravity (~/.gemini/config/mcp_config.json)

{
  "mcpServers": {
    "hostmybot": {
      "command": "node",
      "args": ["/path/to/hostmybot-mcp/dist/index.js"],
      "env": {
        "HOSTMYBOT_API_KEY": "ptlc_YOUR_CLIENT_API_KEY",
        "HOSTMYBOT_URL": "https://client.hostmybot.net"
      }
    }
  }
}

Claude Code

Using the CLI:

claude mcp add hostmybot \
  -e HOSTMYBOT_API_KEY=ptlc_YOUR_CLIENT_API_KEY \
  -e HOSTMYBOT_URL=https://client.hostmybot.net \
  -- node /path/to/hostmybot-mcp/dist/index.js

Or in .mcp.json at your project root:

{
  "mcpServers": {
    "hostmybot": {
      "command": "node",
      "args": ["/path/to/hostmybot-mcp/dist/index.js"],
      "env": {
        "HOSTMYBOT_API_KEY": "ptlc_YOUR_CLIENT_API_KEY",
        "HOSTMYBOT_URL": "https://client.hostmybot.net"
      }
    }
  }
}

OpenAI Codex CLI (~/.codex/config.toml)

[mcp_servers.hostmybot]
command = "node"
args = ["/path/to/hostmybot-mcp/dist/index.js"]

[mcp_servers.hostmybot.env]
HOSTMYBOT_API_KEY = "ptlc_YOUR_CLIENT_API_KEY"
HOSTMYBOT_URL = "https://client.hostmybot.net"

CLI Flags (Alternative to Env Vars)

node /path/to/hostmybot-mcp/dist/index.js \
  --api-key ptlc_YOUR_CLIENT_API_KEY \
  --url https://client.hostmybot.net

Available Tools (65)

Servers, Power, Live Console & Activity

  • list_servers — List accessible servers with compact summary (ID, name, node, limits, primary address, SFTP).

  • get_server — Get detailed server configuration (optionally include startup variables).

  • get_server_resources — Live state, CPU %, memory, disk, network RX/TX, and uptime.

  • send_power_signal — Send start, stop, restart, or kill.

  • send_console_command — Execute a console command on a running server.

  • get_websocket_credentials — Get the Wings WebSocket URL and JWT token for live streaming.

  • get_console_logs — Connect briefly to the console WebSocket, read recent lines (ANSI-stripped by default), and disconnect.

  • get_server_activity — View recent server audit activity logs.

Filesystem

  • list_files — List directory entries sorted folders-first with human-readable sizes.

  • read_file_contents — Read text file contents (auto-capped at max_chars, default 50000).

  • write_file — Create or overwrite a text file directly.

  • upload_file — Upload a local file (binary or text) via Wings signed upload URL (multipart/form-data).

  • pull_remote_file — Download a file from a remote HTTP/HTTPS URL directly into a server directory.

  • get_download_url — Generate a signed download URL for a remote file.

  • create_folder — Create a directory.

  • rename_files — Rename or move files/folders.

  • copy_file — Duplicate a file.

  • delete_files — Delete files or directories.

  • compress_files — Create a .tar.gz archive.

  • decompress_file — Extract an archive.

  • chmod_files — Update Unix file permissions.

Databases

  • list_databases — List server databases (passwords hidden unless include_password=true).

  • create_database — Provision a new database.

  • rotate_database_password — Rotate a database password and return the new credential.

  • delete_database — Permanently delete a database.

Startup, Settings & Network Allocations

  • get_startup_variables — View startup command, Docker images, and environment variables.

  • update_startup_variable — Update an editable startup variable (e.g. MAIN_FILE).

  • rename_server — Update server name and description.

  • set_docker_image — Switch Docker runtime image.

  • reinstall_server — Trigger server reinstall (requires confirm: true).

  • list_allocations — List IP/port allocations.

  • create_allocation — Auto-assign a new allocation within server limits.

  • update_allocation_notes — Update allocation notes.

  • set_primary_allocation — Set an allocation as primary/default.

  • delete_allocation — Remove a non-primary allocation.

Backups & Schedules (Cron)

  • list_backups — List existing backups and sizes.

  • get_backup — Get metadata for a single backup.

  • create_backup — Create a new backup.

  • get_backup_download_url — Generate a signed backup download URL.

  • restore_backup — Restore a backup (optional truncate: true).

  • toggle_backup_lock — Lock or unlock a backup against deletion.

  • delete_backup — Delete a backup.

  • list_schedules — List cron schedules and their tasks.

  • get_schedule — Get details and tasks for a single schedule.

  • create_schedule — Create a new cron schedule.

  • update_schedule — Update a cron schedule.

  • delete_schedule — Remove a schedule.

  • execute_schedule — Trigger a schedule immediately.

  • create_schedule_task — Add a command, power, or backup task to a schedule.

  • update_schedule_task — Update an existing schedule task.

  • delete_schedule_task — Delete a task from a schedule.

Account, Permissions, Subusers, API Keys & SSH Keys

  • get_account — Get authenticated account info.

  • get_account_activity — View recent account audit activity logs.

  • list_permissions — List valid Pterodactyl permission nodes (optionally filtered by category).

  • list_subusers — List subusers and their permissions.

  • get_subuser — Get a single subuser's details and permissions.

  • create_subuser — Invite a subuser with specific permissions.

  • update_subuser — Replace a subuser's permission nodes.

  • delete_subuser — Remove a subuser.

  • list_api_keys — List client API keys on the account.

  • create_api_key — Create a new client API key.

  • delete_api_key — Revoke and delete a client API key.

  • list_ssh_keys — List registered SFTP SSH keys.

  • add_ssh_key — Add an SSH public key.

  • remove_ssh_key — Remove an SSH public key by fingerprint.

Development & Testing

npm run typecheck  # Strict TypeScript type checking
npm test           # Run Vitest unit & MCP protocol tests
npm run build      # Compile TypeScript to dist/

See CONTRIBUTING.md, SECURITY.md, CHANGELOG.md, and ADR-0001 for development guidelines and architectural context.

License

MIT © 2026 enderliker

Available Tools

65 tools
add_ssh_keyA

Register a new SSH public key on the account for SFTP access.

Inputs: name (required), public_key (required).

chmod_filesC
Idempotent

Change Unix permissions (mode) on files or folders on the server.

Inputs: files (required), server_id (required), root.

compress_filesC

Compress selected files/folders into a .tar.gz archive on the server.

Inputs: files (required), server_id (required), root.

copy_fileC

Duplicate a file on the server.

Inputs: location (required), server_id (required).

create_allocationA

Auto-assign a new network allocation (IP/port) to a server within its allocation limit.

Inputs: server_id (required).

create_api_keyA

Create a new client API key on the account (returns the secret token once).

Inputs: description (required), allowed_ips.

create_backupB

Create a new backup on the server (subject to server backup limits).

Inputs: server_id (required), name, ignored, is_locked.

create_databaseB

Create a new database on a server (subject to server database limits).

Inputs: database (required), server_id (required), remote.

create_folderC

Create a new directory on the server.

Inputs: name (required), server_id (required), root.

create_scheduleB

Create a recurring cron schedule on a server (add tasks with create_schedule_task).

Inputs: hour (required), name (required), month (required), minute (required), +5 more.

create_schedule_taskA

Add an action task ('command', 'power', or 'backup') to an existing schedule.

Inputs: action (required), payload (required), server_id (required), schedule_id (required), +2 more.

create_subuserB

Invite a subuser to a server with explicit Pterodactyl permission strings.

Inputs: email (required), server_id (required), permissions (required).

decompress_fileC

Extract an archive (.tar.gz, .zip, etc.) on the server.

Inputs: file (required), server_id (required), root.

delete_allocationA
Destructive

DESTRUCTIVE: Unassign and delete a non-primary network allocation from a server.

Inputs: server_id (required), allocation_id (required).

delete_api_keyB
Destructive

DESTRUCTIVE: Revoke and delete a client API key by its identifier prefix.

Inputs: identifier (required).

delete_backupB
Destructive

Permanently delete a backup from the server.

Inputs: server_id (required), backup_uuid (required).

delete_databaseA
Destructive

DESTRUCTIVE: Permanently delete a database and all of its data.

Inputs: server_id (required), database_id (required).

delete_filesB
Destructive

Permanently delete one or more files or directories on the server.

Inputs: files (required), server_id (required), root.

delete_scheduleC
Destructive

Delete a scheduled cron task from a server.

Inputs: server_id (required), schedule_id (required).

delete_schedule_taskC
Destructive

Delete a specific task from a schedule.

Inputs: task_id (required), server_id (required), schedule_id (required).

delete_subuserC
Destructive

Remove a subuser from a server.

Inputs: server_id (required), user_uuid (required).

execute_scheduleB

Manually trigger a schedule immediately.

Inputs: server_id (required), schedule_id (required).

get_accountB
Read-only

Get the authenticated HostMyBot/Pterodactyl account details.

Inputs: no named parameters.

get_account_activityB
Read-only

Get recent audit activity logs for the authenticated HostMyBot account.

Inputs: page, event, per_page.

get_backupC
Read-only

Get metadata for a single server backup by UUID.

Inputs: server_id (required), backup_uuid (required).

get_backup_download_urlA
Read-only

Generate a temporary download URL for a specific backup.

Inputs: server_id (required), backup_uuid (required).

get_console_logsA
Read-only

Connect briefly to the server WebSocket console, retrieve recent console output lines, and disconnect cleanly.

Inputs: server_id (required), max_lines, strip_ansi, timeout_ms.

get_download_urlB
Read-only

Get a temporary signed download URL for a file on the server.

Inputs: file (required), server_id (required).

get_scheduleB
Read-only

Get details and tasks for a single schedule ID.

Inputs: server_id (required), schedule_id (required).

get_serverB
Read-only

Get detailed configuration, allocations, limits, and SFTP details for a specific server identifier.

Inputs: server_id (required), include_variables.

get_server_activityB
Read-only

Get recent activity audit logs for a specific server.

Inputs: server_id (required), page, event, per_page.

get_server_resourcesA
Read-only

Check live server state (running/offline/starting/stopping) and current CPU, memory, disk, network, and uptime usage.

Inputs: server_id (required).

get_startup_variablesA
Read-only

Get the server's startup command, available Docker images, and environment variables.

Inputs: server_id (required).

get_subuserA
Read-only

Get details and permissions for a single server subuser.

Inputs: server_id (required), user_uuid (required).

get_websocket_credentialsA
Read-only

Get the Wings WebSocket URL and JWT token for live console streaming.

Inputs: server_id (required).

list_allocationsB
Read-only

List IP and port network allocations assigned to a server.

Inputs: server_id (required).

list_api_keysB
Read-only

List client API keys associated with the authenticated account.

Inputs: no named parameters.

list_backupsC
Read-only

List existing backups for a server.

Inputs: server_id (required), page.

list_databasesA
Read-only

List MySQL/MariaDB databases provisioned on a server. Pass include_password=true only when credentials are needed.

Inputs: server_id (required), include_password.

list_filesB
Read-only

List files and directories inside a server directory (defaults to '/').

Inputs: server_id (required), directory.

list_permissionsA
Read-only

List valid Pterodactyl permission nodes (useful before creating/updating subusers). Optionally filter by category.

Inputs: category.

list_schedulesA
Read-only

List scheduled cron tasks configured on a server.

Inputs: server_id (required).

list_serversB
Read-only

List all HostMyBot/Pterodactyl servers accessible by the configured API key, returning compact server summaries and identifiers.

Inputs: page, per_page.

list_ssh_keysB
Read-only

List SFTP SSH public keys registered on the account.

Inputs: no named parameters.

list_subusersB
Read-only

List subusers and their permissions on a server.

Inputs: server_id (required).

pull_remote_fileB

Download a file directly from a remote HTTP/HTTPS URL into a server directory.

Inputs: url (required), server_id (required), filename, directory, +2 more.

read_file_contentsB
Read-only

Read the text contents of a file on the server. Automatically truncates very large files to protect context size unless max_chars is increased.

Inputs: file (required), server_id (required), max_chars.

reinstall_serverA
Destructive

DESTRUCTIVE: Trigger a full server reinstall script. Existing files may be overwritten. Requires confirm=true.

Inputs: confirm (required), server_id (required).

remove_ssh_keyA
Destructive

DESTRUCTIVE: Remove an SSH public key from the account by fingerprint.

Inputs: fingerprint (required).

rename_filesC

Rename or move one or more files/folders within a server directory.

Inputs: files (required), server_id (required), root.

rename_serverB
Idempotent

Rename a server and optionally update its description.

Inputs: name (required), server_id (required), description.

restore_backupA
Destructive

Restore a server backup. Setting truncate=true wipes all existing server files before restoring and requires confirm=true.

Inputs: server_id (required), backup_uuid (required), confirm, truncate.

rotate_database_passwordA

Rotate the password for an existing server database and return the new password.

Inputs: server_id (required), database_id (required).

send_console_commandC

Send a console command to a running server.

Inputs: command (required), server_id (required).

send_power_signalA
Destructive

Send a power signal ('start', 'stop', 'restart', or 'kill') to a server. Note: 'kill' forcefully terminates the process.

Inputs: signal (required), server_id (required).

set_docker_imageA
Idempotent

Change the server's Docker runtime image (must be one allowed by the egg).

Inputs: server_id (required), docker_image (required).

set_primary_allocationC
Idempotent

Set a network allocation as the primary/default server address.

Inputs: server_id (required), allocation_id (required).

toggle_backup_lockB

Toggle the lock status of a backup (locked backups cannot be deleted until unlocked).

Inputs: server_id (required), backup_uuid (required).

update_allocation_notesC
Idempotent

Update the notes label on a server network allocation.

Inputs: notes (required), server_id (required), allocation_id (required).

update_scheduleA
Idempotent

Update an existing cron schedule's name, cron expression, or activation flags (preserves omitted flags).

Inputs: hour (required), name (required), month (required), minute (required), +6 more.

update_schedule_taskA
Idempotent

Update an existing action task inside a schedule (preserves omitted flags).

Inputs: action (required), payload (required), task_id (required), server_id (required), +3 more.

update_startup_variableB
Idempotent

Update an editable startup environment variable (e.g. MAIN_FILE, NODE_PACKAGES).

Inputs: key (required), value (required), server_id (required).

update_subuserA
Idempotent

Replace the permission nodes assigned to an existing server subuser.

Inputs: server_id (required), user_uuid (required), permissions (required).

upload_fileA

Upload a local file (binary or text) from disk to a server directory using Pterodactyl's two-step signed upload URL.

Inputs: server_id (required), local_path (required), directory, remote_filename.

write_fileB
Idempotent

Create or overwrite a text file directly on the server.

Inputs: file (required), content (required), server_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 65 tools

    Disambiguation4/5

    Most tools target a distinct resource+action (files, allocations, backups, schedules, databases, subusers, account), and potentially confusable pairs like write_file/upload_file/pull_remote_file have descriptions that clearly differentiate local-vs-remote and binary-vs-text paths. A few rough edges remain: delete_schedule is described as deleting 'a scheduled cron task' when delete_schedule_task exists, and the get_download_url / get_backup_download_url / get_websocket_credentials trio requires reading descriptions to place correctly.

    Naming Consistency4/5

    Nearly everything follows a predictable verb_noun snake_case pattern (list_servers, create_backup, update_schedule_task, delete_subuser), including a clean resource-prefixed grouping. Minor deviations: singular/plural mismatch across analogous single-item operations (copy_file vs rename_files vs delete_files), and a couple of noun-heavy forms like get_websocket_credentials and toggle_backup_lock break the strict list/get/create/update/delete verb set.

    Tool Count2/5

    65 tools is very heavy for a single MCP server and exceeds the point where an agent can reliably scan the surface; discovery burden is real even though each tool maps to a real Pterodactyl endpoint. The breadth (servers, files, backups, schedules, databases, subusers, account/API keys) is segmented better as sub-resources than as one flat list of 65.

    Completeness4/5

    Coverage is unusually thorough: full CRUD on files, backups, schedules and schedule tasks, databases, subusers, allocations, API keys and SSH keys, plus power/console and live resource monitoring. The main gap is server lifecycle: there is no create_server or delete_server (only rename/reinstall), so provisioning and teardown must happen outside this server — acceptable if it mirrors the client API surface, but a dead end for the 'hostmybot' domain name.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to manage, configure, and operate game servers hosted on Pterodactyl panels, including power actions, console commands, file operations, plugin installation, and backups. It also supports Cloudflare challenge bypass and automatic request pacing for reliable panel automation.
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to drive a Pterodactyl game panel over both its client and application API trees, covering servers, files, backups, schedules, databases, subusers, nodes, nests, and an eight-tool wings websocket console suite. Exposes 105 typed tools with a default-deny gate that blocks deletes, reinstalls, suspensions, and kill actions until explicitly allowlisted.
      MIT