Docs menu

Reference

MCP tools

Look up every tool CLI's MCP server gives your agent, and learn how agents use them safely.

Explain it

MCP is the standard way AI apps like Claude Code and Cursor add tools. CLI gives them about 100 tools that cover everything you can do on CLI, with the same limits and checks as the dashboard.

Do you need this page? Only if you're curious what an agent can do, or building one. To connect your agent, see Connect your AI agent.

CLI's MCP server gives Claude Code, Cursor and other MCP apps about 100 cli_* tools. Each tool maps to one API endpoint (a few combine two or wait for a result), so an agent using MCP gets the same behaviour, checks and limits as one calling the API directly. To connect an agent, see Connect your AI agent; to add the server to a particular app, see Install in your agent app.

How agents use the tools

The server tells the agent to read the skill file first. It's available to MCP apps as the resource cli://skill, the same text as /skill.md. It covers sign-in, funding, the deploy loop, guardrails and what to do about each error code.

The why argument

Every tool that takes arguments also takes why: one sentence, up to 300 characters, on why the agent is doing this. CLI sends it as the X-CLI-Intent header, and it's shown beside the change in the flight recorder and on approval requests, so you can see the agent's reasoning when you review its work (see /docs/flight-recorder).

JSON
{
  "name": "cli_create_database",
  "arguments": {
    "projectId": "prj_…",
    "kind": "postgres",
    "linkTo": "svc_…",
    "why": "The app failed with MISSING_ENV for DATABASE_URL and you asked for a new database."
  }
}

Dry runs and approvals

Tools that change costly or risky things take two extra arguments:

  • dryRun: describe what would change (cost, restarts, what breaks) without changing anything. Agents should show you the plan first.
  • approvalId: after a tool answers APPROVAL_REQUIRED, the agent tells you what it asked for and where to approve it, calls cli_wait_for_approval, and if you approve, calls the same tool again with the same arguments plus approvalId.
Takes dryRun and approvalIdTakes approvalId only
cli_deploy, cli_update_service, cli_set_plan, cli_create_database, cli_delete_service, cli_deploy_template, cli_environmentscli_remove_domain, cli_restore_backup, cli_query_database, cli_exec

See Approvals.

Errors

When a call fails, the tool returns an error result holding CLI's error envelope, so the agent branches on error.code and follows error.remediation (see /docs/errors). The server also tells agents to stop after 3 failed fix attempts.

Two codes come from the MCP server itself rather than the API:

CodeMeaning
LOCAL_SPEND_LIMITPaying would go over CLI_SPEND_LIMIT_USDC for this MCP process. Ask the user to fund the project, or to raise the limit
CLIENT_ERRORSomething failed before reaching CLI (for example the network)

Tool labels

Every tool tells the app what it does, so the app can ask you at the right moments: whether it only reads (readOnlyHint), whether it changes something that can't be undone (destructiveHint), and whether it reaches outside your account, like deploying from GitHub or sending an email (openWorldHint).

The hosted connectors serve a core set of about 40 of these tools: projects, services and deploys, variables, databases and backups, domains, scheduled jobs, logs and health, cost, and approvals. Claude's connector (see /docs/claude) leaves out money and crypto tools and splits tools that both read and change. ChatGPT's (see /docs/chatgpt) also leaves out running commands, sandboxes and agent keys, refuses secrets, and masks credentials in its answers.

Server settings

VariableMeaning
CLI_API_URLThe CLI server
CLI_API_KEYA project key (clik_…): works without a wallet, with that key's role and limits
CLI_AGENT_PRIVATE_KEYAn EVM wallet (signs in, pays on Base)
CLI_AGENT_SOLANA_KEYA Solana wallet (pays on Solana; signs in when there's no EVM key)
CLI_PAY_NETWORKbase or solana, when both wallets are set
CLI_SPEND_LIMIT_USDCMost this MCP process may pay over x402 (default 0: it never pays, and asks you instead)

Account and money

ToolWhat it does
cli_whoamiSigns in if needed and shows this agent's wallet and projects
cli_walletThis key's limits: spending cap, spent, remaining, scopes, the services it may change, and the project balance
cli_topupAdds credit by paying USDC over x402 from the agent's wallet, on Base or Solana; only what the user authorized
cli_funding_optionsWays to fund without x402: the project's USDC deposit address and, with usd, a card link for the user to open
cli_tokenThe CLI token on Robinhood Chain: price and staking info, a credit quote with the transactions to send, staking transactions, or an address's stakes
cli_usageBalance, burn per hour, runway, cost per service, and per-service CPU and memory use with downsize, upsize or keep advice
cli_set_low_balance_alertOwners: email or webhook alert when credit drops below an amount in USDC (null turns it off)
cli_agent_credentialA signed credential of this agent's track record to show another service or person, with optional audience and ttlHours (default 168, at most 720). Needs an API key. With bindWallet: true and a wallet set, it first binds the wallet so the record follows it across projects

See Agent credentials for what a credential holds and how it's checked.

Projects and people

ToolWhat it does
cli_create_projectCreates a project; the caller becomes its owner
cli_list_projectsLists the projects this wallet or key can access
cli_get_projectProject details: balance (micro-USDC), status, members, services and a top-up URL
cli_environmentsLists, creates or deletes environments; use an environment's id as projectId in other tools
cli_add_memberAdmins: adds a person by email or GitHub username as viewer, developer or admin
cli_add_agentAdmins: lets another agent's wallet operate the project, up to a spending cap in USDC
cli_audit_logWho changed what, newest first

Services and deploys

ToolWhat it does
cli_create_serviceCreates a service from a git repo or a Docker image (private registries need credentials from the user)
cli_update_serviceChanges copies, volume, start command, port, health check, alerts, monorepo folder, watch paths or sleep; applies on the next deploy
cli_set_planChanges a service's CPU and memory; applies on the next deploy
cli_delete_serviceStops and deletes a service; a database's data is kept unless deleteData (owner only)
cli_deployDeploys a service and, by default, waits until it's live or failed
cli_deploy_statusA deploy's current status, with the classified error if it failed
cli_rollbackRedeploys the previous healthy image of a deploy's service, without rebuilding
cli_set_previewsTurns pull-request previews on or off for a GitHub service, with empty or copied preview databases
cli_importPlans (or with apply, creates) services from Railway, Heroku, Render, Fly, Vercel or Compose config, or a Railway or Heroku token
cli_list_templatesOne-click stacks: what each creates, its inputs and its hourly cost
cli_deploy_templateDeploys a template into a project, wiring variables and starting databases first

Variables

ToolWhat it does
cli_set_envSets or deletes (null) a service's variables, or loads a whole .env; values are write-only
cli_check_variablesChecks that every ${{service.KEY}} reference resolves, and lists what the service depends on
cli_shared_variablesReads or sets project-wide shared variables, used as ${{shared.KEY}}

Databases

ToolWhat it does
cli_create_databaseCreates and starts a private Postgres, MySQL, Redis or MongoDB, optionally linked to an app
cli_link_databasePuts a database's connection URL into an app's variables as a secret; redeploy afterwards
cli_database_accessA database's connection URLs; public: true opens a port for the user's machine, false closes it
cli_query_databaseRuns SQL on Postgres or MySQL (read-only unless an admin allows writes); with no SQL, lists tables
cli_backup_databaseBacks up a database now and waits until it's done
cli_list_backupsA database's backups and recent restores
cli_restore_backupReplaces all data with a backup, after a safety backup; confirm must be the database's name

Domains

ToolWhat it does
cli_generate_domainGives an app a hosted address under CLI's domain, live at once with no DNS
cli_rename_domainChanges a generated address's subdomain; the old one stops working
cli_add_domainAttaches a custom domain and returns the TXT and CNAME records the user must create
cli_verify_domainChecks a custom domain's DNS; success makes it live with HTTPS
cli_list_domainsA service's custom domains, with status and DNS records
cli_remove_domainDetaches a custom domain from its service

Cron

ToolWhat it does
cli_create_cronSchedules a command in an app's live image (UTC, at most every 5 minutes), billed per second
cli_list_cronA service's cron jobs with their next run and last result
cli_update_cronChanges a job's schedule, command or timeout, pauses it, or removes it
cli_run_cronRuns a job now and waits; returns status, exit code and masked output

Running and debugging

ToolWhat it does
cli_logsBuild and runtime logs for one deploy, secrets masked
cli_service_logsRecent output from a running service, with text or regex search and error or warn filters over the last 5000 lines
cli_service_healthWhether an app is up, why not, uptime over 24 hours and 7 days, and recent incidents
cli_request_metricsRequests per hour, 4xx and 5xx counts, and p50 and p95 latency
cli_execRuns a shell command in an app's live container and returns output and exit code; wakes a sleeping app first
cli_eventsWhat happened in a project since a point, optionally waiting for the next event
cli_explain_errorWhat an error code means and how to fix it
cli_known_fixesFor a failed deploy, the changes that fixed the same kind of failure elsewhere (anonymized), with how often each worked

Shipping safely and leaving

ToolWhat it does
cli_shadowRuns the next version on a copy of live traffic, shows how it compares, then promotes or discards it
cli_provenanceThe signed record of how a deploy's image was built: repository, commit, digest and builder
cli_export_manifestWhat exporting the project would hold, without secrets (the archive itself is a person's download)

AI models and on-chain automation

ToolWhat it does
cli_aiThe AI gateway: models and prices, keys for apps (with the variables to set), usage, the monthly cap, and one paid completion
cli_keeperKeepers: call a contract through a managed signer on a schedule or on an event, run one now, pause, see its runs
cli_watch_contractReact to a contract's events: call the app, write them into a Postgres table, or run a job with them
ToolWhat it does
cli_domainSearch for a domain, buy it from credit (only once the user agrees) and point it at a service, add DNS records, auto-renew
cli_emailSending domains, email keys for apps, usage, and sending one email
cli_app_signinSign-in for the user's app: turn it on, list users, disable or enable one
cli_vectorTurn on vector search (pgvector) for a Postgres database

Static sites, functions, the edge and costs

ToolWhat it does
cli_static_siteServe an app's build output as a static site (no container, bandwidth only), or turn it back into a container
cli_functionCreate, update or read a single-file Node or Python function that sleeps when idle
cli_edgeRate limits, connection caps, IP allow/deny lists, bot blocking and body limits at the router; what was blocked
cli_static_ipSend an app's outbound traffic from fixed IPs for allow-listed APIs and databases
cli_rightsizeA week of measured use with suggestions and their monthly savings; apply the low-risk ones

Workflows, testing, monitoring and forecasts

ToolWhat it does
cli_workflowDurable multi-step workflows: define, start, send events, check, retry or cancel runs
cli_load_testLoad-test one of the project's apps and read latency, errors and the breaking point
cli_browser_checkCheck pages and flows in a real browser every few minutes, with screenshots on failure
cli_secretsLeaked secrets found in code, logs and variables; scan now; mark rotated
cli_forecastThe month-end and 30-day spend forecast with its range, trends, runway and spikes

Checking and setting up

ToolWhat it does
cli_doctorEverything in the project that needs attention, worst first, each with a fix
cli_detectHow to run a repo: framework, app or static site, start command, port, databases and variables

Logs, databases, status and selling

ToolWhat it does
cli_log_alertsAlert when text (or a regex) shows up in an app's output
cli_db_toolsSchema, saved queries, and migrations that back up first and run in one transaction
cli_status_noticePost incidents and maintenance to the public status page, with updates
cli_paid_apisWhat a project sells and earns, and CLI's own pay-per-call APIs
cli_sellCharge per call for an app's API and list it in the directory

Launching and building

ToolWhat it does
cli_go_liveGo-live check for one app, each missing item with its fix (/docs/go-live)
cli_requestsLatest requests to an app from the router, filtered; replay a GET (/docs/request-inspector)
cli_compare_environmentsWhat differs between two environments; copy variables across
cli_unit_economicsCost per request and per paying caller, and a suggested price per call
cli_project_mapThe project's services, what connects to what, and what each costs, in plain words
cli_webhook_inboxA URL that records webhooks; see them and replay them to an app (/docs/webhook-inboxes)
cli_flagsFeature flags: on, off or a percentage of users, no redeploy (/docs/feature-flags)
cli_dependenciesPackages with known security problems at the live commit, and fixes for them: a pull request built in a throwaway copy, merged when a person accepts (/docs/dependency-fixes)
cli_bountiesFind bounties, attempt one with a commit from your fork, check how it went; post and decide your own (/docs/bounties)

In Claude's directory connector

The hosted connector (https://api.clicloud.app/mcp, see /docs/claude) serves the same tools with three differences:

  • No tools that move money or crypto: cli_topup, cli_wallet, cli_funding_options, cli_token, cli_keeper, cli_watch_contract, cli_agent_credential, cli_find_api, cli_paid_apis and cli_sell aren't there, and cli_domain can't buy or renew.
  • A tool that both reads and changes things is split in two: cli_<name> reads and cli_<name>_change changes. Every tool is annotated as read-only or as changing something, so Claude asks before changes.
  • The server's instructions describe CLI; they don't point at the skill file.
  • A smaller set: the six domain tools are one tool, cli_service_domains (list) and cli_service_domains_change (add, generate, rename, verify, remove); the four cron tools are cli_cron and cli_cron_change; cli_provenance and cli_export_manifest are left out; long descriptions are cut to their first sentences.
  • Long jobs answer within about 25 seconds, with stillRunning and the tool to check it with if they're not done.

Governance

ToolWhat it does
cli_recent_changesThe flight recorder: recent changes with who, why, what, the cost before and after, and whether they can be undone
cli_undoUndoes one change from the flight recorder, with the caller's own permissions
cli_propose_changeProposes a change instead of making it: CLI builds it in a throwaway copy and asks a person to approve
cli_wait_for_approvalWaits until a person approves or denies a request, or until a timeout

Sandboxes

ToolWhat it does
cli_sandbox_createStarts a throwaway, isolated machine (python, node, ubuntu, go, rust or any image), with no network unless asked
cli_sandbox_execRuns a shell command in a sandbox and returns stdout, stderr, exit code and duration
cli_sandbox_write_fileWrites a file into a sandbox (text or base64, up to 10 MB)
cli_sandbox_read_fileReads a file from a sandbox (text or base64, up to 10 MB)
cli_sandbox_deleteDeletes a sandbox now; it's billed until this moment

See Sandboxes.

Buying

ToolWhat it does
cli_find_apiSearches the directory of paid APIs: price per call, uptime, real paid traffic and how to pay

See Paying for other APIs.

What the tools don't cover

Some features are only in the API, the cli command or the dashboard, for example notification channels, ask, traces and error groups, on-call proposals, managed signers and selling. Agents that can make HTTP calls reach them through the API using the skill file (see /docs/api).