Skip to main content
Glama
pebblehost-mcp
by numycode

pebblehost-mcp

An MCP server that lets Claude run a Minecraft server hosted on PebbleHost: power, status, console, files, backups, startup settings and server versions, players, and schedules. It was built for a Paper server with plugins such as LuckPerms, EaglercraftXServer, and ViaVersion, but works with any PebbleHost game server.

By default every tool acts only on the one server set in PEBBLEHOST_SERVER_ID.

Tools

Tools marked destructive start their description with DESTRUCTIVE: and say what can be lost, so Claude and MCP clients that ask for approval treat them with care.

Power and status

Tool

What it does

get_server_status

Online state (offline, starting, running, stopping), uptime, CPU, RAM, disk, and network usage against the plan's limits.

set_power

start, stop, or restart. Stop and restart shut down cleanly, saving the world.

kill_server

Destructive. Ends the process without saving. Only for when stop hangs.

list_servers

Lists the servers the tools may act on (only the configured one unless all servers are allowed).

Console and players

Tool

What it does

read_console

The most recent console lines, up to a lines limit (the node keeps about the last 150), plus anything printed while listening.

send_command

Runs a console command, such as lp user Steve parent set admin, and returns the output printed over the next few seconds.

list_players

Online players, by running list and reading its output.

For older output, or when the server is offline, use read_file on logs/latest.log with tail_lines.

Files

Tool

What it does

list_files

Lists a directory with sizes and modification times.

read_file

Returns a text file (configs, logs); tail_lines reads the end of long logs. Output is cut at 100,000 characters.

write_file

Destructive (replaces the whole file). Creates or overwrites a text file.

edit_file

Replaces exact text in a file. Writes nothing if the text is missing, or appears more than once without replace_all.

upload_file_from_url

Has the server download a URL into a folder, such as a plugin jar into plugins/.

upload_local_file

Uploads a file from the computer running this MCP server.

get_file_download_link

One-time browser download link for a file.

create_folder

Creates a directory.

move_file

Renames or moves a file or folder.

delete_files

Destructive. Moves files to PebbleHost's trash (restorable for 24 hours), or deletes permanently with permanent.

restore_files

Restores files deleted to the trash.

compress_files

Zips files or folders from one folder into an archive in that folder.

extract_archive

Destructive (overwrites files with the same names). Unzips an archive into its folder.

File paths are relative to the server root, such as server.properties or plugins/LuckPerms/config.yml. Binary files (jars, worlds) can be uploaded, moved, archived, and deleted, but not read or written as text.

Backups

Tool

What it does

list_backups

Backups with size, export state, and restore fee, plus operations in progress.

create_backup

Starts a backup.

get_backup_download_link

Download link for a backup. PebbleHost only serves exported backups, so the first call on an unexported backup starts the export; call again once it finishes.

restore_backup

Destructive. Replaces the current files with the backup. If PebbleHost lists a restore fee, it refuses unless accept_restore_fee is set.

delete_backup

Destructive. Permanently deletes a backup.

Server settings and version

Tool

What it does

get_startup_settings

Startup variables with current values, allowed options, and rules: on Minecraft servers these include the server jar and, where PebbleHost exposes them, version and Java settings.

set_startup_variable

Destructive. Changes one startup variable (such as the jar file or Java version). Takes effect on restart.

list_server_versions

Server software PebbleHost can install (such as Paper) and their version IDs.

install_server_version

Destructive. Installs another server software or Minecraft version.

Schedules

Tool

What it does

list_schedules

Scheduled tasks with cron timing, state, and steps.

create_schedule

Creates a schedule with ordered steps (console commands or power actions with delays), such as a daily 4:00 restart with a warning.

delete_schedule

Deletes a schedule and its steps.

Related MCP server: Minecraft Server MCP

What the PebbleHost API does not support

These parts of the requested feature set are missing or limited because PebbleHost's API (spec) does not offer them:

  • Java version as its own setting. The API has no endpoint to choose the Java runtime or Docker image. Java can only be changed if PebbleHost exposes it as a startup variable on your server; get_startup_settings shows whether it does. Otherwise change it in the panel.

  • Online player list. The API has no documented endpoint for players currently online. Its /minecraft/players endpoint lists players who have ever joined, without a documented format, so list_players uses the console list command instead and needs the server running. The Minecraft query protocol is not used.

  • Console history. There is no REST endpoint for console output. The console comes from the node's websocket, which keeps only about the last 150 lines and nothing while the server is offline.

  • Backup options. Creating a backup takes no name, file exclusions, or lock option. Download needs an export step first.

  • Archives. Compress and extract run in the background with no completion signal, so check with list_files. The archive name is chosen by PebbleHost.

  • Binary file editing. Files are read and written as text; jars and world files can only be uploaded, moved, archived, or deleted.

Not yet verified against a live server

The tools were tested against a fake panel built from PebbleHost's API spec, and the live panel was checked to answer auth correctly, but not with a real server. Most likely to need adjustment:

  • upload_local_file passes the destination folder as a directory parameter on the signed upload URL, as the Pterodactyl panel does; PebbleHost's spec does not document it.

  • list_server_versions shows version fields as PebbleHost returns them, since the spec leaves them unspecified.

  • restore_files passes the files' original paths; the spec does not say exactly how to name trashed files.

Setup

Requires Node.js 20 or newer.

git clone https://github.com/numycode/pebblehost-mcp
cd pebblehost-mcp
npm install
npm run build

Get an API key

  1. Sign in to the PebbleHost game panel.

  2. Open your account settings and generate an API key (PebbleHost's API docs: "visit your dashboard and click Generate API token").

  3. Copy the key into your MCP client's config (below).

The key acts as your panel account: it can control every server your account can access, beyond what this MCP server does. Keep it out of the repository and out of chat transcripts, and revoke it in the panel if it leaks. If the panel offers an allowed-IPs field for the key, restrict it to the machine that runs this server.

Configuration

The server reads its settings from environment variables only; nothing is stored in this repository.

Variable

Required

Description

PEBBLEHOST_API_KEY

Yes

Your panel API key.

PEBBLEHOST_SERVER_ID

Yes, for everything except list_servers

The server the tools act on: its 8-character identifier or UUID. Run list_servers once without it to find the identifier.

PEBBLEHOST_ALLOW_ALL_SERVERS

No

Set to true to let tools act on other servers on the account through their server argument. Off by default.

PEBBLEHOST_PANEL_URL

No

Panel base URL. Defaults to https://panel.pebblehost.com.

.env.example lists them. .env files are git-ignored, but this server does not load them itself; your MCP client passes the variables.

Claude Code

claude mcp add pebblehost \
  -e PEBBLEHOST_API_KEY=your-key \
  -e PEBBLEHOST_SERVER_ID=5f1680e2 \
  -- node /absolute/path/to/pebblehost-mcp/dist/src/index.js

claude mcp add stores the key in your local Claude Code config (~/.claude.json by default), not in a project file. Avoid --scope project, which writes .mcp.json into the project you may commit.

Claude Desktop

Add this to claude_desktop_config.json (Settings → Developer → Edit Config) and restart Claude Desktop:

{
  "mcpServers": {
    "pebblehost": {
      "command": "node",
      "args": ["/absolute/path/to/pebblehost-mcp/dist/src/index.js"],
      "env": {
        "PEBBLEHOST_API_KEY": "your-key",
        "PEBBLEHOST_SERVER_ID": "5f1680e2"
      }
    }
  }
}

Remote connector for claude.ai (Streamable HTTP)

With MCP_TRANSPORT=http the server speaks MCP's Streamable HTTP transport at /mcp instead of stdio, so claude.ai (web, Desktop, and mobile) can use it as a custom connector. The PebbleHost API key stays in the server's environment; Claude never sees it.

How sign-in works

The server is its own OAuth 2.1 authorization server, built for one owner:

  • One pre-configured client. You choose a client ID and secret and enter both in claude.ai under "Use your own OAuth client". Dynamic client registration is off and public clients (no secret) are refused, so nobody else can register a client.

  • Owner password. When you click Connect in claude.ai, the server shows a sign-in page that asks for MCP_OWNER_PASSWORD. Only then does it issue an authorization code (S256 PKCE required, single use, 5 minutes) to https://claude.ai/api/mcp/auth_callback.

  • Tokens. Access tokens last 1 hour and refresh tokens 30 days. They are HMAC-signed and bound to this server's /mcp URL, so they survive restarts. Changing the client secret or the owner password revokes every token.

  • Every /mcp request needs a valid access token. Without one the server answers 401 with a WWW-Authenticate header pointing at its OAuth metadata, which is how Claude starts sign-in.

HTTP configuration

These are in addition to the PEBBLEHOST_* variables above.

Variable

Required

Description

MCP_TRANSPORT

Yes

http. Defaults to stdio. The Docker image sets it.

MCP_PUBLIC_URL

Yes

Public HTTPS origin, no path, such as https://mcp.example.com. The connector URL is this plus /mcp.

MCP_OAUTH_CLIENT_ID

Yes

Any client ID you choose, such as claude.

MCP_OAUTH_CLIENT_SECRET

Yes

At least 32 characters. Generate with openssl rand -base64 48.

MCP_OWNER_PASSWORD

Yes

At least 12 characters; asked for on the sign-in page. Use a long random one.

HOST, PORT

No

Listen address. Default 127.0.0.1:3000; the Docker image uses 0.0.0.0:3000.

Run it with Docker behind a Cloudflare Tunnel

These steps are for a Linux machine at home (such as Fedora) with Docker. The tunnel makes an outbound connection to Cloudflare, so no router ports are opened and the container publishes no ports.

  1. Build the image in a clone of this repository:

    docker build -t pebblehost-mcp .
  2. Write an env file outside the repository, readable only by you:

    mkdir -p ~/.config/pebblehost-mcp
    install -m 600 /dev/null ~/.config/pebblehost-mcp/env

    Then fill it in:

    PEBBLEHOST_API_KEY=...
    PEBBLEHOST_SERVER_ID=...
    MCP_PUBLIC_URL=https://mcp.example.com
    MCP_OAUTH_CLIENT_ID=claude
    MCP_OAUTH_CLIENT_SECRET=...
    MCP_OWNER_PASSWORD=...
  3. Create the tunnel in the Cloudflare dashboard (Zero Trust → Networks → Tunnels → Create a tunnel → Cloudflared). Copy its token. Add a public hostname, such as mcp.example.com, with service http://pebblehost-mcp:3000.

  4. Run the server and cloudflared on one Docker network:

    docker network create mcp
    docker run -d --name pebblehost-mcp --network mcp --restart unless-stopped \
      --env-file ~/.config/pebblehost-mcp/env pebblehost-mcp
    docker run -d --name cloudflared --network mcp --restart unless-stopped \
      cloudflare/cloudflared:latest tunnel --no-autoupdate run --token <tunnel-token>
  5. Check it: curl -i https://mcp.example.com/mcp -X POST should return 401 with a WWW-Authenticate: Bearer ... resource_metadata=... header.

Notes:

  • Don't put Cloudflare Access, Bot Fight Mode, or a WAF challenge in front of this hostname. Claude connects from Anthropic's servers (160.79.104.0/21) and can't pass a browser challenge. The OAuth sign-in protects it instead. If you add WAF rules, allow that range.

  • Rate limits use the client IP from cloudflared's X-Forwarded-For, which the server trusts only from private and loopback addresses.

  • To revoke Claude's access, change MCP_OAUTH_CLIENT_SECRET or MCP_OWNER_PASSWORD and restart the container.

Add it in claude.ai

  1. Open Settings → Connectors (for a Team or Enterprise plan, an Owner uses Organization settings → Connectors). Click Add custom connector.

  2. Enter a name and the URL https://mcp.example.com/mcp.

  3. Under Advanced (or the authentication step), choose Use your own OAuth client and enter the client ID and client secret from the env file.

  4. Click Add, then Connect. A page from your server asks for the owner password; enter it and click Approve. Claude returns to the connector page, connected.

The connector works the same in Claude Desktop and mobile once added. Claude Code can keep using the stdio setup above.

How it works

PebbleHost's current game panel exposes a Pterodactyl-style Client API at https://panel.pebblehost.com/api/client, documented in PebbleHost's OpenAPI spec at api.pebblehost.com (api.yaml). Requests authenticate with Authorization: Bearer <API key>. Each tool maps to endpoints under /api/client/servers/{server}/: resources, power, command, files/*, backups/*, startup/*, projects/*, and schedules/*.

The console uses GET /websocket, which returns a short-lived token and the node's console websocket. read_console, send_command, and list_players connect to it using the Pterodactyl Wings console protocol: send auth with the token, then send logs for recent history, and collect console output events. The connection sends the panel URL as its Origin, as the daemon requires.

edit_file reads the file, replaces the text locally, and writes the whole file back, so an edit made in the panel between those two calls would be overwritten.

The older PebbleHost knowledge base article about a Multicraft-based "Game Panel API" (help.pebblehost.com) is marked deprecated by PebbleHost and does not apply to the current panel.

Development

npm test   # builds, then runs the tests against a fake panel and console websocket, and the HTTP transport's OAuth flow

Available Tools

32 tools
compress_filesZip files into an archiveA

Compresses files or folders into an archive created in the same folder. All paths must be in one folder. Runs in the background; call list_files on that folder to see the archive when it finishes.

Inputs: paths (required), server.

create_backupCreate a backupA

Starts a backup of the server's files. It runs in the background; check list_backups for progress. The plan's backup limit applies.

Inputs: server.

create_folderCreate a folderC
Idempotent

Creates a directory on the server.

Inputs: path (required), server.

create_scheduleCreate a scheduleA

Creates a scheduled task that runs its steps in order on a cron timing in the server's timezone, for example a daily restart: minute "0", hour "4", steps [command "say Restarting in 1 minute", then power "restart" after 60 seconds].

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

delete_backupDelete a backupA
DestructiveIdempotent

DESTRUCTIVE: permanently deletes the backup from PebbleHost's storage; it cannot be restored afterwards.

Inputs: backup (required), server.

delete_filesDelete files or foldersA
DestructiveIdempotent

DESTRUCTIVE: deletes files or folders. By default PebbleHost moves them to a trash bin where restore_files can bring them back within 24 hours; permanent skips the trash and cannot be undone.

Inputs: paths (required), server, permanent.

delete_scheduleDelete a scheduleA
DestructiveIdempotent

Deletes a schedule and all its steps.

Inputs: schedule_id (required), server.

edit_fileEdit part of a fileA
Destructive

Replaces exact text in a text file and saves it. old_text must match the file exactly, including indentation, and must occur once unless replace_all is set; otherwise nothing is written. Read the file first.

Inputs: path (required), new_text (required), old_text (required), server, +1 more.

extract_archiveUnzip an archiveA
DestructiveIdempotent

DESTRUCTIVE: files in the archive replace existing files with the same paths. Extracts a .zip, .tar.gz, or similar archive into the folder that contains it. Runs in the background; call list_files afterwards.

Inputs: path (required), server.

get_server_statusGet server statusA
Read-only

Returns whether the server is online (power state offline, starting, running, or stopping), uptime, and CPU, RAM, disk, and network usage against the plan's limits. The panel caches usage for up to 20 seconds.

Inputs: server.

get_startup_settingsRead startup settingsA
Read-only

Lists the server's startup variables with their current values, allowed options, and validation rules. Depending on the server type these include the server jar file, the Minecraft version, and the Java version or startup flags.

Inputs: server.

install_server_versionInstall server software versionA
Destructive

DESTRUCTIVE: replaces the server jar with another software or Minecraft version. Downgrading can corrupt worlds and plugins may stop working. Take a backup and stop the server first. Takes a version ID from list_server_versions.

Inputs: version_id (required), server.

kill_serverForce-kill the server processA
DestructiveIdempotent

DESTRUCTIVE: ends the server process immediately without saving. Players lose progress since the last save and worlds or plugin data can be corrupted. Use only when set_power stop has hung.

Inputs: server.

list_backupsList backupsA
Read-only

Lists the server's backups (newest information from the panel), with size, whether each is exported for download, and any restore fee, plus backup operations still in progress.

Inputs: server.

list_filesList filesB
Read-only

Lists the files and folders in a directory of the server, with sizes and modification times.

Inputs: server, directory.

list_playersList online playersA
Read-only

Returns the players currently online, by running the Minecraft "list" command and reading its console output. The server must be running.

Inputs: server.

list_schedulesList schedulesA
Read-only

Lists the server's scheduled tasks with their cron timing, whether they are active, and their steps.

Inputs: server.

list_serversList PebbleHost serversA
Read-only

Lists the servers this MCP server may manage, with identifiers and addresses. When PEBBLEHOST_SERVER_ID is set, only that server is listed.

Inputs: no named parameters.

list_server_versionsList installable server softwareA
Read-only

Lists the server software PebbleHost can install (such as Paper) and their versions, with the version IDs install_server_version takes.

Inputs: server, software, max_versions.

move_fileRename or move a fileC
Destructive

Renames or moves a file or folder. Both paths are relative to the server root.

Inputs: to (required), from (required), server.

read_consoleRead console outputA
Read-only

Returns the most recent console lines of a running server (the node keeps about the last 150), plus anything printed while listening. For older output or an offline server, read_file logs/latest.log with tail_lines.

Inputs: lines, server, wait_seconds.

read_fileRead a fileA
Read-only

Returns the content of a text file such as server.properties, a plugin config, or logs/latest.log. Output is cut at 100000 characters; use tail_lines for long logs. Binary files (jars, worlds) cannot be read.

Inputs: path (required), server, tail_lines.

restore_backupRestore a backupA
Destructive

DESTRUCTIVE: replaces the server's current files with the backup; changes since the backup are lost. Consider create_backup first. If list_backups shows a restore fee, set accept_restore_fee only after the user agrees to pay it.

Inputs: backup (required), server, accept_restore_fee.

restore_filesRestore deleted filesA
Idempotent

Restores files or folders that delete_files moved to the trash in the last 24 hours, back to their original paths.

Inputs: paths (required), server.

send_commandRun a console commandA
Destructive

Runs a command in the server console, without a leading slash (for example "say Hello", "lp user Steve parent set admin", "whitelist add Steve"), and returns the console output printed in the next wait_seconds. The server must be running.

Inputs: command (required), server, wait_seconds.

set_powerStart, stop, or restart the serverA

Starts, stops, or restarts the server. stop and restart run the normal shutdown, which saves the world. The action runs in the background: check get_server_status or read_console afterwards.

Inputs: action (required), server.

set_startup_variableChange a startup settingA
DestructiveIdempotent

DESTRUCTIVE: changing the server jar, Minecraft version, or Java version can stop the server from starting or upgrade the world irreversibly; plugins such as EaglercraftXServer and ViaVersion only support some versions. Take a backup first. Sets one startup variable from get_startup_settings; it takes effect on the next restart.

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

upload_file_from_urlUpload a file from a URLA
Destructive

Has the server download a file from a public URL into a folder, such as a plugin jar (LuckPerms, ViaVersion, EaglercraftXServer) into plugins/. Use this for binary files, which write_file cannot create. Returns once the download finishes; plugins load on the next restart.

Inputs: url (required), server, filename, directory.

upload_local_fileUpload a file from this computerA
DestructiveIdempotent

Uploads a file from the computer running this MCP server (for example a plugin jar you built) into a folder on the server. A file with the same name is replaced.

Inputs: local_path (required), server, directory.

write_fileCreate or overwrite a fileA
DestructiveIdempotent

DESTRUCTIVE: replaces the file's entire content if it exists. Creates or overwrites a text file. To change part of an existing file, use edit_file instead. The server and plugins usually read config changes only after a reload or restart.

Inputs: path (required), content (required), server.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 32 tools

    Disambiguation4/5

    Most tools target clearly distinct resource+action pairs (set_power vs kill_server, write_file vs edit_file, delete_files vs restore_files, backups vs files), and destructive semantics are spelled out. The main overlap is install_server_version versus set_startup_variable, both of which can change the server jar/Minecraft version, and upload_local_file vs upload_file_from_url only differ by source.

    Naming Consistency4/5

    Nearly all names follow consistent snake_case verb_noun (list_backups, create_backup, restore_backup, read_file). Minor deviations: singular/plural noun mixing (delete_files, list_servers, list_files vs read_file) and get_startup_settings vs set_startup_variable use different nouns for the same object.

    Tool Count3/5

    32 tools is heavy, though the domain genuinely spans power, console, files, backups, schedules, and startup config. Some pairs could be consolidated (upload_local_file/upload_file_from_url, install_server_version/set_startup_variable), and a flat 32-tool surface raises selection cost.

    Completeness4/5

    Coverage is strong: lifecycle (power/kill/status), console/commands, full file CRUD plus upload/download/archive/trash, backups with restore and export, schedules, and startup/version management. Gaps: schedules can only be created or deleted (no edit/inspect of an existing schedule's steps) and there is no way to handle binary file content or local downloads beyond a one-time link.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to interact with and manage Minecraft servers through a standardized interface, supporting server monitoring, player management, log analysis, and command execution.
      11
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language management of Pebblehost Minecraft servers, including server status, control, console commands, file management, and backups.
      1
      MIT