Hatchbox MCP server Beta

Run your Hatchbox account from any MCP client

The Hatchbox MCP server hands your coding agent the whole Hatchbox API — apps, deploys, databases, servers, domains, env vars, and logs. Claude Code, Codex, Cursor — anything that speaks the Model Context Protocol. Ask a question, get an answer, or get an action.

Free on every plan, including the 7 day free trial. $10 per server per month after that — unlimited apps.

The Hatchbox MCP server is a Model Context Protocol server that connects an AI coding agent to your Hatchbox account. It wraps the Hatchbox /api/v1 API with one tool per operation, reads and writes annotated separately, so your agent can inspect your infrastructure and change it — authenticated with your own API token.

MCP is an open protocol, so this isn't tied to one vendor. Setup is a line of config and a token — npx fetches the package each time it runs, so there's no package to install, nothing to keep updated, and nothing new on your servers.

claude mcp add hatchbox -- npx -y @hatchbox/hatchbox-mcp   # Claude Code
codex mcp add hatchbox -- npx -y @hatchbox/hatchbox-mcp    # Codex

Both still need your API token. Every other client takes that same npx command in its own config file. Full setup below.

One question, two systems, one answer

Checking whether production is running the latest code is a four-window job. It doesn't have to be.

Before

Open the Hatchbox dashboard to find the deployed commit. Open GitHub to find the latest commit on main. Compare two SHAs by eye. Go back to Hatchbox and click deploy. Then go back to what you were actually doing.

Now

“Is my lumio-app running the latest code?” Your agent checks the commit Hatchbox has deployed, compares it against the latest commit on GitHub, and — if they've drifted — triggers the deploy.

This is the part a status-check bot or a CLI can't do. Your agent already has your repository open and your other tools connected in the same session. Hatchbox is just the other half of the picture — and once it's there, the answer and the fix are the same step.

Things to ask it

Real prompts, and the tools your agent reaches for to answer them.

  • “Which of my apps haven't deployed in the last month?”

    list_account_apps, get_app

  • “Why did last night's deploy fail?”

    get_log

  • “Restart the worker process on staging.”

    list_processes, restart_process

  • “Back up the production database and tell me when it's finished.”

    create_backup, get_log

  • “Add BUGSNAG_API_KEY to all three of my apps.”

    create_env_vars

  • “Point app.example.com at my Rails app.”

    create_domain

  • “Run the nightly report at 2am every day.”

    create_cron_job

  • “Reboot the server that's been up the longest.”

    list_servers, get_server, reboot_server

  • “Is auto-deploy on for everything in my staging cluster?”

    list_account_clusters, list_account_apps

What customers say

I run 15+ Rails apps and static sites with Hatchbox. My bill went from $400/month on Heroku to $28/mo with Hatchbox & DigitalOcean combined.

Donn Felker

Software Professional

If you want the most bang for your buck, Hatchbox / Hetzner / DigitalOcean is the killer combo. You can throw sooo much at this and it's crazy how inexpensive it is.

Josh Pigford

Serial Entrepreneur

Applications deployed
24,000+
Deployments run
2 million+
Deploying since
2016

Read more customer stories

What your agent can do

One tool per API operation, across everything the Hatchbox API exposes.

Area Reads Writes
Apps & deploys Apps, processes, connected git providers Create, update, restart, deploy, toggle auto-deploy
Databases & backups App and cluster databases, backup configuration, latest backup Create databases and backups, attach and detach, test backup connections
Servers & clusters Servers and the clusters they belong to Update configuration and packages, reboot
Domains Domains on each app Create, update, delete
Environment variables Create, update, delete
Cron jobs Scheduled jobs on each app Create, update, delete
Logs Follow deploys, restarts, and backups through to completion

One tool per operation

Every operation the Hatchbox API exposes has a tool of its own. Nothing is bundled behind a generic “call the API” escape hatch.

Reads and writes are separate

Read-only tools are annotated read-only and can't change anything. Writes are annotated as writes, so your client can ask you first.

It won't spend money behind your back

The server tools update and reboot machines you already have. Creating cloud instances isn't in the API yet — and when it lands it'll be a write like any other, flagged so your client can ask first.

The annotations are standard MCP, so your agent — and the approval prompt in whichever client you use — can tell a read from a write before anything runs. That holds for every write tool, including ones added after you set this up.

Which MCP clients it works with

Anything that can launch a local stdio server and set two environment variables. That covers most of them. Here's where the config lives, and how far we've tested.

Client Where the config lives Status
Claude Code claude mcp add, or .mcp.json Verified end-to-end against production
Claude Desktop claude_desktop_config.json Works, manual config only
Codex codex mcp add, or ~/.codex/config.toml Standard stdio config, untested by us
Cursor ~/.cursor/mcp.json or .cursor/mcp.json Standard stdio config, untested by us
VS Code (agent mode) .vscode/mcp.json, under servers Standard stdio config, untested by us
Anything else Whatever your client uses for stdio servers Should work — tell us if it doesn't

We're only claiming what we've actually run. Claude Code is verified end-to-end; everywhere else the server is doing the same ordinary thing — a local process on stdio, reading two environment variables — so it should behave the same. If you get it working somewhere that isn't listed, or it breaks somewhere that is, we'd like to know.

How to install the Hatchbox MCP server

Three steps, about five minutes, and all three are configuration — npx fetches and runs the package itself, so there's no package to install.

  1. Create an API token

    Go to API Tokens in Hatchbox, click New API Token, name it, and copy the value.

  2. Register it with your client

    One command, or one block of config. The command is npx -y @hatchbox/hatchbox-mcp in every client.

  3. Set two environment variables

    HATCHBOX_BASE_URL and HATCHBOX_API_TOKEN. Then ask your agent what it can see.

From the command line

# Claude Code
claude mcp add hatchbox -- npx -y @hatchbox/hatchbox-mcp

# Codex
codex mcp add hatchbox \
  --env HATCHBOX_BASE_URL=https://hatchbox.io/api/v1 \
  --env HATCHBOX_API_TOKEN=your-token-here \
  -- npx -y @hatchbox/hatchbox-mcp

For Claude Code, set HATCHBOX_BASE_URL and HATCHBOX_API_TOKEN for that server afterwards — see claude mcp add --help, or edit .mcp.json directly.

By hand, in JSON

Claude Desktop (claude_desktop_config.json) and Cursor (~/.cursor/mcp.json) take the same shape:

{
  "mcpServers": {
    "hatchbox": {
      "command": "npx",
      "args": ["-y", "@hatchbox/hatchbox-mcp"],
      "env": {
        "HATCHBOX_BASE_URL": "https://hatchbox.io/api/v1",
        "HATCHBOX_API_TOKEN": "your-token-here"
      }
    }
  }
}

VS Code uses the same entry in .vscode/mcp.json, but nests it under servers rather than mcpServers.

By hand, in TOML

Codex keeps its servers in ~/.codex/config.toml:

[mcp_servers.hatchbox]
command = "npx"
args = ["-y", "@hatchbox/hatchbox-mcp"]

[mcp_servers.hatchbox.env]
HATCHBOX_BASE_URL = "https://hatchbox.io/api/v1"
HATCHBOX_API_TOKEN = "your-token-here"

HATCHBOX_BASE_URL is always https://hatchbox.io/api/v1 wherever you put it. It's the same for every account, not something you need to look up.

About that API token

Your Hatchbox API token has no scoping. It's effectively full access across your accounts, gated only by your subscription status. Treat it like a password.

Let your client hold it

Use your client's environment variable handling rather than pasting the token into a prompt. Don't commit it, and don't share it.

One token per developer

Everyone authenticates with their own. Nothing is shared across a team, and there's nothing for us to provision on our end.

Writes are labelled as writes

Every write tool carries a standard MCP annotation, so your client can require approval before any of them run. The rest can only read.

Revoke it whenever

Delete the token in API Tokens and access stops immediately. The MCP server keeps no state of its own.

If unscoped tokens are a blocker for how your team works, tell us. That's exactly the kind of thing the beta is for.

This is a beta

Claude Code support is done and verified end-to-end against production. Claude Desktop works today too, but only through the manual config above — a one-click install bundle is coming next. Other MCP clients use the same ordinary stdio setup, and we expect them to work, but we haven't put each one through its paces ourselves.

That means the rough edges are still visible, and we'd rather hear about them now than after a wider release. If something's confusing, missing, or broken — in any client — tell us.

Hatchbox MCP server questions

Still stuck? Ask us directly — a real person who has been using it since before it shipped will answer.

Simple, predictable pricing.

We charge per server, not per app. Run one application or twenty on the same box — the bill doesn't change.

Start free trial

$10

/server/mo
  • Unlimited applications
  • Deploy anywhere
  • Zero downtime deployments
  • Custom domains & free SSL
  • Databases, cron jobs & background workers
  • Full SSH access to your servers
  • Real, human support
  • 7 day free trial

Ready to make deployments fun again?

Hatchbox has run more than 2 million deploys across 24,000+ applications since 2016. Start a 7 day free trial and put yours on a server you own.