Developers

Hostwolf developers

Build on Hostwolf

Everything you can do in the control panel, you can do from code: power, console, files, backups, mods and modpacks, players, game settings, schedules and more.

Quick start#

  1. Open Account → API keys in the panel and create a key. It starts with ptlc_ and is shown only once.
  2. Pick how you want to use it:

curl

# List your servers
curl https://panel.hostwolf.net/api/client \
  -H "Authorization: Bearer ptlc_your_key" \
  -H "Accept: application/json"

# Restart one (the 8-character id from its panel URL)
curl -X POST https://panel.hostwolf.net/api/client/servers/1a2b3c4d/power \
  -H "Authorization: Bearer ptlc_your_key" \
  -H "Content-Type: application/json" \
  -d '{"signal": "restart"}'

TypeScript

npm install https://hostwolf.net/dl/hostwolf-sdk-0.1.9.tgz
import { Hostwolf } from '@hostwolf/sdk';

const hw = new Hostwolf({ apiKey: process.env.HOSTWOLF_API_KEY! });
const { data: servers } = await hw.servers.list();
await hw.servers.restart(servers[0].identifier);
console.log(await hw.tail(servers[0].identifier, { lines: 20 }));

AI assistant (MCP)

claude mcp add --transport http hostwolf https://mcp.game.hostwolf.net --header "Authorization: Bearer ptlc_your_key"

Then ask: "Back up my Minecraft server, update Paper to the latest version and tell me if anything breaks." That's the hosted server at https://mcp.game.hostwolf.net, with nothing to install. See MCP setup for Claude Desktop, Cursor and VS Code, or to run it yourself.

What you can build#

Discord botsStart, stop and check servers from chat with power and player endpoints.
Automated backupsBack up before every update with backups and schedules.
Mod managementInstall and update mods and modpacks from Modrinth, CurseForge and more with addons.
Status pagesShow live player counts and state from resources and the console websocket.
Config as codeKeep configs in git and push them with files and game settings.
AI operationsLet an assistant read crash logs, run diagnostics and fix things for you.

API keys#

  • Send the key as Authorization: Bearer ptlc_... on every request. A wrong, incomplete or revoked key gets 401.
  • A key can do everything your account can do on your servers. It can also act on servers you're a subuser of, within the permissions you were given there.
  • Revoke keys at any time on the API keys page.
  • Keys can't order, cancel or pay for servers. Billing stays in the panel, and plans are listed on pricing.
  • Use a separate key for each app or assistant, so you can revoke one without breaking the others.

IP allow-list#

When you create a key you can limit it to up to 50 IP addresses or CIDR ranges, such as 203.0.113.7 or 2001:db8::/48. Requests from any other address get 403 with the address the panel saw: This IP address (203.0.113.7) does not have permission to access the API using these credentials.

  • If your machine has IPv6, the panel usually sees the IPv6 address, so allow that as well (or a range around it).
  • The hosted MCP server can't use a key with an IP allow-list. Give it a key without one (limit it with ?servers= or ?readonly=1 instead), or run the MCP server on your own machine and allow that machine's address.
  • To change the list, create a new key and revoke the old one.

Downloads#

The SDK and MCP server are served from hostwolf.net, not the npm registry. There's nothing to sign up for, and every release has a fixed URL:

PackageInstall
TypeScript SDKnpm install https://hostwolf.net/dl/hostwolf-sdk-0.1.9.tgz
MCP servernpx -y https://hostwolf.net/dl/hostwolf-mcp-0.1.12.tgz, or use the hosted https://mcp.game.hostwolf.net

Current versions and checksums are in index.json; what changed is in the changelog.

Limits and good manners#

Rate limit: 256 requests per minute per account. Some actions have their own, lower limit, counted separately for each action:

ActionLimit
Create a backup2 per 10 minutes
Create a database2 per minute
Notification tests3 per minute
Switch game version, install or remove a modpack, CS2 framework6 per minute each
Export or import a database6 per minute each
Upload an addon, install a featured addon, check or set a domain10 per minute each
Update game settings or server notification settings20 per minute each
Change a database's remote access20 per minute
Run diagnostics30 per minute
Search addons or modpacks60 per minute each
Hosted MCP300 requests per minute per address, 180 per key

Over a limit you get 429 with a Retry-After header in seconds. The SDK retries short waits for you and reports longer ones as error.retryAfter.

  • Stats: for live stats, use the console websocket instead of polling /resources in a tight loop.
  • Long jobs: backups, restores, reinstalls and modpack installs run in the background. Start them, then check back. The SDK can wait for you: servers.waitForState(), backups.waitUntilDone() and waitForConsole().

Resources#

Stuck, or missing an endpoint? Tell us at game.hostwolf.net/contact or support@hostwolf.net.