# hatchbox

Connects your assistant to Hatchbox to manage Rails deployments and inspect or edit environment variables directly from chat.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 81
- Author: pulsemcp
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/pulsemcp/mcp-servers/tree/HEAD/experimental/hatchbox
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/mcp/hatchbox

## What it does

The server links AI clients to the Hatchbox platform via its HTTP API and server SSH connections. It triggers application deployments for the latest code or a specified Git commit SHA, checks build progress, and handles application environment keys.

Safety controls are turned on from the start. The default `READONLY` mode blocks any variable creation or deletion until you explicitly set `READONLY=false` in the configuration. Reading server variables relies on SSH rather than the API. Without `WEB_SERVER_IP_ADDRESS` and an authorized SSH key, variable inspection calls will fail.

When several Rails apps share a single server, supply `HATCHBOX_APP_NAME`. This filters the target Puma processes so the tool reads values from the correct application environment.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `HATCHBOX_API_KEY`, `HATCHBOX_ACCOUNT_ID`, `HATCHBOX_APP_ID`, `HATCHBOX_DEPLOY_KEY`, `WEB_SERVER_IP_ADDRESS`, `SSH_KEY_PATH`, `HATCHBOX_APP_NAME`, `READONLY`, `ALLOW_DEPLOYS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env HATCHBOX_API_KEY=<HATCHBOX_API_KEY> --env HATCHBOX_ACCOUNT_ID=<HATCHBOX_ACCOUNT_ID> --env HATCHBOX_APP_ID=<HATCHBOX_APP_ID> --env HATCHBOX_DEPLOY_KEY=<HATCHBOX_DEPLOY_KEY> --env WEB_SERVER_IP_ADDRESS=<WEB_SERVER_IP_ADDRESS> --transport stdio hatchbox -- npx -y hatchbox-mcp-server
```
Replace <…> with your own values. 4 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
codex mcp add hatchbox --env HATCHBOX_API_KEY=<HATCHBOX_API_KEY> --env HATCHBOX_ACCOUNT_ID=<HATCHBOX_ACCOUNT_ID> --env HATCHBOX_APP_ID=<HATCHBOX_APP_ID> --env HATCHBOX_DEPLOY_KEY=<HATCHBOX_DEPLOY_KEY> --env WEB_SERVER_IP_ADDRESS=<WEB_SERVER_IP_ADDRESS> -- npx -y hatchbox-mcp-server
```
Replace <…> with your own values. 4 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "hatchbox": {
            "command": "npx",
            "args": [
                "-y",
                "hatchbox-mcp-server"
            ],
            "env": {
                "HATCHBOX_API_KEY": "<HATCHBOX_API_KEY>",
                "HATCHBOX_ACCOUNT_ID": "<HATCHBOX_ACCOUNT_ID>",
                "HATCHBOX_APP_ID": "<HATCHBOX_APP_ID>",
                "HATCHBOX_DEPLOY_KEY": "<HATCHBOX_DEPLOY_KEY>",
                "WEB_SERVER_IP_ADDRESS": "<WEB_SERVER_IP_ADDRESS>"
            }
        }
    }
}
```
Replace <…> with your own values. 4 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "hatchbox": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "hatchbox-mcp-server"
            ],
            "env": {
                "HATCHBOX_API_KEY": "<HATCHBOX_API_KEY>",
                "HATCHBOX_ACCOUNT_ID": "<HATCHBOX_ACCOUNT_ID>",
                "HATCHBOX_APP_ID": "<HATCHBOX_APP_ID>",
                "HATCHBOX_DEPLOY_KEY": "<HATCHBOX_DEPLOY_KEY>",
                "WEB_SERVER_IP_ADDRESS": "<WEB_SERVER_IP_ADDRESS>"
            }
        }
    }
}
```
Replace <…> with your own values. 4 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e HATCHBOX_API_KEY=<HATCHBOX_API_KEY> -e HATCHBOX_ACCOUNT_ID=<HATCHBOX_ACCOUNT_ID> -e HATCHBOX_APP_ID=<HATCHBOX_APP_ID> -e HATCHBOX_DEPLOY_KEY=<HATCHBOX_DEPLOY_KEY> -e WEB_SERVER_IP_ADDRESS=<WEB_SERVER_IP_ADDRESS> hatchbox npx -y hatchbox-mcp-server
```
Replace <…> with your own values. 4 more environment variables are in the server README

## When to use it
- Trigger a Rails app deploy for a specific Git commit
- Inspect active environment variables over SSH
- Track deployment progress using the returned activity ID
- Update or delete configuration keys in Hatchbox

## Example prompts
- Check the value of the RAILS_ENV environment variable
- Deploy commit abc123def456 to Hatchbox and track the activity status
- Delete the UNUSED_VAR variable from my Rails app settings

## Similar
- [Dokku MCP Server](https://affpapa.org/en/nevibecode/mcp/dokku-mcp-server.md) — MCP server · ★ 9
- [convex-deploy-guard](https://affpapa.org/en/nevibecode/skills/convex-deploy-guard.md) — skill · 36300 installs
- [ssh](https://affpapa.org/en/nevibecode/skills/ssh.md) — skill · 1200 installs
- [ssh-configuration](https://affpapa.org/en/nevibecode/skills/ssh-configuration.md) — skill · 451 installs
- [mcp-ssh-manager](https://affpapa.org/en/nevibecode/mcp/mcp-ssh-manager.md) — MCP server · ★ 520
- [infrabroker](https://affpapa.org/en/nevibecode/mcp/infrabroker.md) — MCP server · ★ 13

From the same set: [pulsemcp/mcp-servers](https://affpapa.org/en/nevibecode/by/pulsemcp/mcp-servers.md) — 28 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
