VibeHost
Guides

Deploy from Codex CLI

Use VibeHost from inside OpenAI's Codex CLI. Two paths: MCP server (interactive) or PAT-driven CLI (scripted).

The Codex CLI is OpenAI's local coding agent. It talks to VibeHost two ways: through our MCP server (interactive, OAuth) or through the vibehost CLI wrapped as a tool (scripted, PAT).

Add VibeHost with the Codex CLI:

codex mcp add vibehost --url https://api.vibehost.com/mcp
codex mcp login vibehost

Your browser opens, you approve, and the flow returns to Codex. Codex can now call every VibeHost tool to deploy, promote, roll back, read logs, and manage custom domains.

You can verify the server is configured:

codex mcp list

If you prefer to edit config by hand, add this to ~/.codex/config.toml and then run codex mcp login vibehost:

[mcp_servers.vibehost]
url = "https://api.vibehost.com/mcp"

In a Codex session, describe what you want:

Deploy this directory to VibeHost as a new app called my-codex-app. It's a Vite + React build.

Codex creates the app, uploads the files, deploys them and returns the live URL. The tool calls behind that are described once, in Choosing an upload path. Whether Codex asks before each step depends on its approval settings (see Confirmation prompts).

Install the CLI:

curl -fsSL -o vibehost-install.sh https://vibehost.com/install.sh
cat vibehost-install.sh
sh vibehost-install.sh && rm vibehost-install.sh

Authenticate once with a Personal Access Token. The example below reads the token from pass; substitute your own secret manager of choice:

export VIBEHOST_TOKEN=$(pass vibehost/pat)
vibehost whoami --json

Codex can now invoke vibehost like any other shell command. Every command takes --json and returns {ok, data | error} so the agent can branch on error.code without parsing prose. See the CLI reference.

When to pick which

SituationUse
First-time setupMCP (browser sign-in, no token to paste)
Interactive deploys from your editorEither
Scripted / CI / unattended runsCLI + PAT
You want every tool call to prompt for confirmationMCP
You want zero confirmation promptsCLI (with PAT)

Both can coexist. Set up MCP for interactive sessions and keep the CLI installed for scripts.

See also

On this page