# Connect your agent

> Let your agent do it: Connect yourself to Hermitbox on this machine. If `~/.local/bin/hermitbox` is missing, run `curl -fsSL https://hbx.sh | sh` as my ordinary user, never with sudo. Add `hermitbox mcp` to your own MCP settings by its absolute path, with the command or entry for your client. It reads the credentials the installer saved, so never copy a key into a config file or this chat. Then create a sandbox, run `echo hello` in it, show me the output and delete it. Follow the exact steps in https://docs.hermitbox.dev/v0.3.2/get-started/agents.md.

Once your agent is connected, it can create sandboxes, run commands, read and write files,
snapshot, fork, sleep and wake them, and publish ports. Paste one prompt and the agent sets itself
up, or add `hermitbox mcp` to it yourself. On the machine where you ran the installer,
`hermitbox mcp` reads the saved credentials, so no key goes in any agent's config.

## Ask your agent

Any agent that can run commands on your machine can do the whole setup from this prompt. It
installs Hermitbox, connects itself and proves it works:

```text
Install Hermitbox on this machine and connect yourself to it.
Run `curl -fsSL https://hbx.sh | sh` as my ordinary user, never with sudo.
Then add `hermitbox mcp` to your MCP settings by its absolute path (~/.local/bin/hermitbox).
It reads the credentials the installer saved, so never copy a key into a config file or this chat.
For anything else, follow https://docs.hermitbox.dev/llms.txt.
Prove it works: create a sandbox, run `echo hello` in it, show me the output, then delete it.
```

To add Hermitbox yourself, use your agent's section below. The ordinary-user install puts the CLI
in `~/.local/bin/hermitbox`, and a root install puts it in `/usr/local/bin/hermitbox`. Agents
started from a desktop might not have either on `PATH`, so each command names the full path.

## Claude

Claude Code adds the server for your user with one command:

```sh
claude mcp add --transport stdio --scope user hermitbox -- ~/.local/bin/hermitbox mcp
```

Check it with `claude mcp get hermitbox`. There is no Claude Desktop extension yet; in Claude
Desktop, give Claude the prompt above. To reach a remote install, see
[Claude](https://docs.hermitbox.dev/v0.3.2/integrations/claude.md).

## Cursor

Open
[Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=hermitbox&config=eyJjb21tYW5kIjoiJHt1c2VySG9tZX0vLmxvY2FsL2Jpbi9oZXJtaXRib3giLCJhcmdzIjpbIm1jcCJdfQ==)
and confirm in Cursor. Or add this server to `~/.cursor/mcp.json` under `mcpServers.hermitbox`
yourself.
Cursor expands `${userHome}` itself.

```json
{ "command": "${userHome}/.local/bin/hermitbox", "args": ["mcp"] }
```

To reach a remote install, see [Cursor](https://docs.hermitbox.dev/v0.3.2/integrations/cursor.md).

## VS Code

VS Code adds the server to your user profile with one command:

```sh
code --add-mcp "{\"name\":\"hermitbox\",\"type\":\"stdio\",\"command\":\"$HOME/.local/bin/hermitbox\",\"args\":[\"mcp\"]}"
```

Copilot's agent mode lists the Hermitbox tools after a reload. To reach a remote install, see
[VS Code](https://docs.hermitbox.dev/v0.3.2/integrations/vscode.md).

## Codex

Codex adds the server with one command:

```sh
codex mcp add hermitbox -- ~/.local/bin/hermitbox mcp
```

It lands in `~/.codex/config.toml` as `[mcp_servers.hermitbox]`. To reach a remote install, see
[Codex](https://docs.hermitbox.dev/v0.3.2/integrations/codex.md).

## ChatGPT

ChatGPT on the web can't add Hermitbox yet. It connects to a public MCP endpoint over HTTPS, and
Hermitbox's MCP server listens only on this machine. Give the prompt to an agent that runs on your
machine, or use Codex. See [ChatGPT](https://docs.hermitbox.dev/v0.3.2/integrations/chatgpt.md).

## Any MCP client

Add a stdio server whose command is `~/.local/bin/hermitbox` with the argument `mcp`. Each client
names its settings file and variable syntax differently. [Any MCP client](https://docs.hermitbox.dev/v0.3.2/integrations/mcp.md)
shows the configuration for a remote install.

## What the server offers

[MCP tools](https://docs.hermitbox.dev/v0.3.2/reference/mcp.md) lists the tools, the loopback HTTP transport and their limits.
Host admission enforces [tier limits](https://docs.hermitbox.dev/v0.3.2/reference/tiers.md), so an agent can't grant a sandbox a
capability the host lacks.
