PricingSign inGet startedDashboard →

← Docs

Going further

AI agents, the API & the CLI

Belov Cloud has three front doors for automation — an MCP server for AI agents, a REST API for scripts and CI, and the belov CLI for your terminal. They offer the same operations under the same rules: read sites, logs, deploys and activity; deploy and roll back; restart; change env vars; add and remove scheduled jobs (cron); clear caches; switch PHP; run WP-CLI; run staging and backups.

Connect an AI agent over MCP. In claude.ai, add a custom connector with the URL below; in ChatGPT, add it as a custom MCP connector; in Claude Code or Cursor, add it as an MCP server. The first time, you're sent to Belov Cloud to approve the connection — choose full access or read-only — and from then on the agent acts as you, within your role and site access. On WordPress it can run WP-CLI too: reads freely, changes with full access, and it can try a change on staging first. Every action it takes lands in Activity, and anything destructive (pushing staging to live, restoring a database) needs an explicit confirmation.

MCP server
https://belov.cloud/api/mcp

claude mcp add --transport http belov https://belov.cloud/api/mcp      # Claude Code
  1. Or create an API token
    For scripts, CI and the CLI: Account → AI agents → API tokens (owners and admins). Choose full access or read-only, and an expiry if you want one. The token starts with bc_live_ and is shown once — keep it in a secrets manager. It stops working if you revoke it, or if the person who made it stops being an owner or admin.
  2. Call the REST API
    Send it as Authorization: Bearer <token>. GET /api/v1/sites lists your sites; GET /api/v1/sites/<id> shows one, including how to reach it over SSH. Deploys, env vars, logs, staging and backups each have an endpoint.
  3. Follow long work without sleeping
    Deploys return a release number and everything else long — PHP switches, staging, restores, backups — returns an operation. Poll it with ?wait=45 and the request returns the moment the work finishes.
  4. Or use the belov CLI
    No install needed: npx belov sites (it's the npm package belov; npm i -g belov keeps it). No access to the npm registry? curl -fsSL https://belov.cloud/cli/install.sh | sh puts belov on your PATH straight from us. Set BELOV_TOKEN and run belov deploy <id> --wait, belov logs <id>, belov env:set <id> KEY=value, belov staging:create <id> --wait. Add --json to any command.
Deploy and wait for the result
curl -X POST https://belov.cloud/api/v1/sites/SITE_ID/deploys \
  -H "Authorization: Bearer $BELOV_TOKEN"

curl "https://belov.cloud/api/v1/sites/SITE_ID/deploys/12?wait=45" \
  -H "Authorization: Bearer $BELOV_TOKEN"

belov deploy SITE_ID --wait          # the same, from the CLI
Access is yours, not the platform's
A token or a connected app only ever reaches your account — and a connected app only the sites you can see, so a developer limited to two sites gives their agent exactly those two. Read-only access can look but never change anything or read secrets. Disconnect apps and revoke tokens any time in Account → AI agents.
SSH for work inside a site
Platform actions go through the API. For work inside a site — a shell, WP-CLI, files, the database — agents that run in a terminal can use SSH: every WordPress site and every full-stack app has it, and GET /api/v1/sites/<id>/ssh returns a ready ~/.ssh/config block.

The full reference — every endpoint, MCP tool and CLI command — is one page.

API reference →

← All guides