MCP Setup & Guides

Let AI tools deploy code for you automatically.

MCP (Model Context Protocol) lets AI tools deploy code automatically. OpenBerth has two MCP implementations:

  • Standalone MCP (stdio) — separate binary for Claude Desktop, Cursor, and other local MCP clients
  • Server-side MCP (Streamable HTTP) — built into the server, used by Claude.ai and Claude mobile via OAuth

Claude Desktop

Install the berth-mcp binary:

TerminalCopy

curl -fsSL https://openberth.io/install-mcp.sh | bash

Manual download

macOSLinuxWindows

amd64ARM64

TerminalCopy

# Download from releases
curl -Lo /usr/local/bin/berth-mcp \
  https://github.com/AmirSoleimani/openberth/releases/latest/download/berth-mcp-linux-amd64
chmod +x /usr/local/bin/berth-mcp

Then add it to your Claude Desktop config at ~/.config/Claude/claude_desktop_config.json:

claude_desktop_config.jsonCopy

{
  "mcpServers": {
    "berth": {
      "command": "/usr/local/bin/berth-mcp",
      "env": {
        "BERTH_SERVER": "https://openberth.example.com",
        "BERTH_KEY": "bt_your_api_key_here"
      }
    }
  }
}

Cursor

Same berth-mcp binary. Add to .cursor/mcp.json in your project or global config:

mcp.jsonCopy

Claude.ai

The server exposes an MCP endpoint at /mcp using Streamable HTTP transport with OAuth 2.1 authentication. Claude.ai can connect directly — no separate binary needed.

  1. Open claude.ai in your browser
  2. Go to Settings → Integrations → Add
  3. Enter your server’s MCP URL: https://openberth.example.com/mcp
  4. Complete the OAuth login when prompted

Once connected, Claude can deploy, update, and manage your apps directly from the chat.

Claude Mobile

The Claude mobile app supports MCP integrations, letting you deploy and manage apps from your phone.

Requirements

  • Your OpenBerth server must be accessible via a public HTTPS URL (not localhost or HTTP-only)
  • The Claude mobile app with MCP support (iOS or Android)

Connecting

  1. Open the Claude app on your phone
  2. Go to Settings → Integrations → Add Integration
  3. Enter your server’s MCP URL: https://openberth.example.com/mcp
  4. You’ll be redirected to your OpenBerth server to log in
  5. After logging in, the integration appears in your list

Allow all tools without approval

By default, Claude asks for permission before using each tool. For a self-driven experience where Claude deploys, iterates, and promotes without interrupting you for each step:

  1. Go to Settings → Integrations
  2. Tap on the OpenBerth integration
  3. Enable “Allow all tools without approval”

This lets Claude handle the entire deploy → test → fix → promote lifecycle autonomously.

Example workflow

Here’s a typical conversation on Claude mobile with OpenBerth connected:

ConversationCopy

You:  Build me a recipe collection app. I want to add recipes
      with ingredients and steps, and search through them.

Claude creates a sandbox, builds the app, pushes files,
checks logs, iterates on any errors, then promotes to
production — all automatically.

Claude: Your recipe app is live at:
        https://recipes.openberth.example.com

I built it with a search bar, add recipe form, and
        ingredient/step management. Try adding your first recipe!

Tips

  • Use descriptive names — tell Claude what to name the deployment so you get a clean URL like recipes.openberth.example.com
  • Review the source — ask Claude to use berth_source to show you what it built
  • TTL defaults — sandboxes default to 4h and deploys to 72h. Ask for ttl: 0 if you want it to stay up permanently
  • Update later — come back to the conversation and ask Claude to modify the deployed app using berth_update

Claude Code

Claude Code (Anthropic’s terminal agent) can deploy to OpenBerth using a custom skill — no MCP binary needed. The skill teaches Claude Code to call the OpenBerth HTTP API directly via curl.

Setup

  1. Download the skill file from the OpenBerth repo: claude/SKILLs.md
  2. Place it in your Claude Code skill directory (e.g. ~/.claude/skills/openberth.md) or your project’s .claude/skills/ folder
  3. Set the environment variables so Claude Code can reach your server:

TerminalCopy

export BERTH_SERVER=https://openberth.example.com
export BERTH_KEY=sc_your_api_key

Usage

Once installed, tell Claude Code what you want and it will deploy it:

ConversationCopy

You:  Deploy this project to OpenBerth as "my-app"

Claude Code reads your files, calls the API via curl,
polls status until running, and reports the live URL.

Claude: Deployed! Live at https://my-app.openberth.example.com

The skill supports the full workflow: sandbox creation, pushing changes, installing packages, promoting to production, checking logs, and more. Claude Code picks the right approach automatically — sandbox for iterative development, one-shot deploy for finished code.

MCP tools

Both MCP implementations expose these tools. The standalone MCP also adds berth_deploy_dir and berth_update_dir for deploying local directories.

Tool Description
berth_deploy Deploy inline files to a live HTTPS URL
berth_deploy_dir Deploy a local directory (standalone only)
berth_update Update a deployment with new inline files
berth_update_dir Update from a local directory (standalone only)
berth_status Check deployment status and URL
berth_logs Get container logs
berth_list List all active deployments
berth_source Get the source code files of a deployment
berth_destroy Destroy a deployment
berth_protect Set access control on a deployment
berth_lock Lock or unlock a deployment (freeze to prevent changes)
berth_sandbox_create Create a dev sandbox with hot reload
berth_sandbox_push Push file changes to a sandbox (instant)
berth_sandbox_install Install/remove packages in a sandbox
berth_sandbox_exec Run a shell command in a sandbox
berth_sandbox_logs Get sandbox logs
berth_sandbox_destroy Destroy a sandbox
berth_sandbox_promote Promote a sandbox to production
berth_update_quota Update network transfer quota
berth_secret_set Create or update an encrypted secret
berth_secret_list List secret names and descriptions (never values)
berth_secret_delete Delete a secret