Skip to content

MCP Server

Let an AI assistant drive your account. 52 tools, one per API operation.

Manage API keys

Public beta

The MCP server is open in beta. Tools and responses may still change, and every call acts on your real deployments. Give an assistant a scoped key, never a full-access one.

What it is

MCP (Model Context Protocol) is the open standard for giving an AI assistant tools. Point a compatible client (Claude Desktop, Cursor, an in-app agent) at the endpoint below, and it can list, inspect and control your deployments in natural language: "restart my bot", "why did it crash", "show the last logs". Every tool maps to a REST API operation and runs through the exact same permissions, scopes and rate limits.

Connect

The endpoint speaks JSON-RPC over HTTP and authenticates with your bhk_ API key as a Bearer token. Most clients connect through the mcp-remote bridge:

Client config
{
  "mcpServers": {
    "bot-hosting": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://bot-hosting.net/api/mcp",
        "--header",
        "Authorization: Bearer bhk_your_key"
      ]
    }
  }
}

Or test it directly with curl (calls a tool the same way the AI would):

curl https://bot-hosting.net/api/mcp \
  -H "Authorization: Bearer bhk_your_key" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"deployments_list","arguments":{}}}'

Auth & scopes

initialize and tools/list are open for discovery; tools/call requires the key, and the key's scopes gate what actually runs. Give an assistant a key with only the scopes it needs, e.g. deployments:read + deployments:power for a support bot that can restart but never delete.

Deployments

deployments:read List and inspect deployments
deployments:power Start, stop, restart, console
deployments:write Create, edit, delete, resize, move
projects:read List your projects
projects:write Create and delete projects
files:read Browse and download files
files:write Upload, edit, rename, delete files
env:read Read env vars (secrets stay masked)
env:write Set env vars
backups:read List backups
backups:write Create and delete backups
packages:read View installed packages
packages:write Add and remove packages

Account

account:read Read profile and quota
billing:read Read invoices and plan
credits:spend Spend credits to create resources

Templates

templates:read Browse anyone's public templates

Tools

Deployments

deployments_list deployments:read

List every deployment the caller can access.

deployments_get deployments:read

Fetch a single deployment.

id
deployments_update deployments:write

Rename a deployment or change its description.

idname?description?
deployments_move deployments:write

Move a deployment to another of your projects.

idtoProjectId
deployments_delete deployments:write destructive

Delete a deployment (instant; teardown runs in the background).

id
deployments_create deployments:write

Create a deployment (blank, from a public GitHub repo, or a template).

namedescription?projectId?sourcegithubRepo?branch?templateId?env?runtime?runtimeVersion?
deployments_getStartup deployments:read

Get the startup config: runtime, version, entry file, start command.

id
deployments_updateStartup deployments:write

Change runtime / version / entry file / start command (queues a rebuild).

idruntimeruntimeVersionentryFile?startCommand?kind?engine?
runtimes_list deployments:read

List available runtimes and database engines with their versions.

deployments_getGit deployments:read

Get the linked GitHub source: repo, branch, auto-pull.

id
deployments_setAutoPull deployments:write

Toggle auto-pull: re-pull the linked repo on every restart.

idautoPull
deployments_power deployments:power

Send a power signal (start / stop / restart / kill).

idaction
deployments_logs deployments:read

Read the last N lines of the console log.

idsize?
deployments_resources deployments:read

Live resource usage: CPU, memory, disk, network and uptime.

id
deployments_command deployments:power

Send a single command to the server console.

idcommand
deployments_resize deployments:write

Change RAM / CPU / storage allocation (drawn from your plan pool).

idramMBcpuPctstorageMB
deployments_sync deployments:write

Pull the latest code from the linked GitHub repo (restarts it if it was running).

id
files_list files:read

List a directory inside the deployment volume.

idpath?
files_read files:read

Read the text content of a single file.

idpath
files_write files:write

Create or overwrite a text file.

idpathcontent
files_rename files:write

Rename or move a file within a directory.

idroot?fromto
files_delete files:write destructive

Delete one or more files or folders.

idroot?files
files_mkdir files:write

Create a folder.

idroot?name
files_decompress files:write

Decompress an archive in place.

idroot?file
files_compress files:write

Compress files into a new archive.

idroot?files
files_copy files:write

Duplicate a file (Wings appends a "copy" suffix).

idlocation
files_chmod files:write

Change a file mode (e.g. "0755").

idroot?filemode
files_downloadUrl files:read

Get a one-time signed URL to download a file.

idpath
env_list env:read

List environment variables. Secret values are masked.

id
env_set env:write

Create or update a user environment variable (applies on next restart).

idkeyvaluesecret?
env_update env:write

Update an existing environment variable: rename it (newKey), change its value, or flip its secret flag. Applies on next restart.

idkeynewKey?value?secret?
env_delete env:write destructive

Delete a user environment variable (applies on next restart).

idkey
backups_list backups:read

List the backups of a deployment.

id
backups_create backups:write

Start a manual backup of a deployment.

id
backups_get backups:read

Fetch a single backup by id.

backupId
backups_delete backups:write destructive

Delete a backup.

backupId
backups_restore backups:write destructive

Restore a backup onto a deployment (overwrites its files).

backupIddeploymentIdstartAfter?
packages_list packages:read

List packages in the manifest (npm or pip).

idmanager
packages_add packages:write

Add or update a package in the manifest.

idmanagernamespec?dev?
packages_remove packages:write

Remove a package from the manifest.

idmanagername
projects_list projects:read

List the projects you own or collaborate on.

projects_create projects:write

Create a project.

namedescription?
projects_delete projects:write destructive

Delete a project and all its deployments (owner only).

id
deployments_enableDomains deployments:write

Assign a subdomain (activate domains). Idempotent.

id
deployments_setSlug deployments:write

Set the subdomain alias (slug).

idslug
deployments_removeSlug deployments:write

Remove the subdomain alias.

id
deployments_setCustomDomain deployments:write

Attach a custom domain. Returns the DNS verification token.

iddomain
deployments_verifyCustomDomain deployments:write

Check the DNS for the attached custom domain.

id
deployments_removeCustomDomain deployments:write

Detach the custom domain.

id

Account

account_get account:read

Your profile, credit balance and quota (pool vs used).

Templates

templates_list templates:read

Browse the public template catalogue (any author).

sort?category?q?page?perPage?
templates_get templates:read

Full details + public stats of a single template by slug.

slug

Prefer raw HTTP?

The same operations are a plain REST API with curl, Python and Node examples.

REST API docs