Agents and control
CLI in Claude
Connect CLI to Claude with the directory connector, or run the self-hosted plugin with x402 payments. What each one does, sends and can't do.
You can run your apps on CLI from Claude: on the web, desktop, phone, or in Claude Code. Connect once, set your limits, and ask in plain words. Every change Claude makes is recorded with its reason.
How to do it: in Claude, add the CLI connector and approve it in your browser. If you use Claude Code and want Claude to pay with its own wallet, install the clicloud-x402 plugin instead.
"Put my repo online on CLI with a Postgres database."
Either way, your spending limits are enforced by CLI, not by Claude.
There are two ways to use CLI from Claude. They share the same tools for running apps; the connector leaves out the money tools (see the table). Both record every change with Claude's reason.
CLI connector and clicloud plugin | clicloud-x402 plugin | |
|---|---|---|
| Where it runs | CLI's hosted MCP server, https://api.clicloud.app/mcp | npx @clicloud-app/mcp on your machine |
| How it signs in | You approve it in your browser (OAuth). No key to paste | A project API key you paste once |
| Works in | Claude on the web, desktop and mobile, and Claude Code | Claude Code (and any MCP app) |
| Payments | None. Add credit and withdraw in the dashboard | x402 USDC from an agent wallet you fund, up to a limit you set |
| Tools | A core set of about 40: projects, deploys, variables, databases and backups, domains, scheduled jobs, logs, health and cost | Every tool (about 100) |
Both spend the project's credit on hosting as usual, within the limits and approvals you set.
The CLI connector
In Claude: add CLI from the connectors directory, or add a custom connector with the URL https://api.clicloud.app/mcp. Claude opens CLI in your browser: sign in, read what it can and can't do, and press Allow.
In Claude Code:
/plugin marketplace add clicloud-app/claude-plugins
/plugin install clicloud@clicloudThe plugin connects to the same server and adds two skills: one that explains how the tools fit together, and /clicloud:deploy.
Long jobs
Claude's requests have to finish in under a minute, so deploys, backups and restores answer within about 25 seconds. If the job is still running, the answer says so and Claude checks again with cli_deploy_status (or the tool the answer names) instead of starting it twice. Apps that support progress updates see each stage as it happens: queued, building, starting, live.
What it can do
It has a core set of about 40 tools, the ones people ask for from a chat. The rest (workflows, load tests, edge rules, AI keys and so on) are in the dashboard, the API and the self-hosted plugin.
- See your projects, apps, deploys, logs, metrics and usage.
- Deploy, roll back, change settings and variables, add databases and domains, and delete things. These tools are marked as changing something, so Claude asks you before each one.
- Tools that read and tools that change are separate: for example
cli_workflowlists and shows workflows, andcli_workflow_changecreates, runs and deletes them.
Limits you set when you connect
When you press Allow, you choose:
- Which projects it can use: all of them (including ones you make later), or only the ones you tick. Environments of an allowed project are allowed too. A connection limited to some projects can't create new ones.
- The most it can spend a day, $10 unless you change it. It covers starting deploys, new databases and other paid changes, like an agent key's limit. Past it, CLI asks you: you get an approval request (in the dashboard, by email and as a notification) naming the connection and what it wants to do, and Claude waits for your answer. An approval covers that one request. Running costs keep being paid from project credit as usual.
Through a connection you're never the project's owner: owner-only actions, like keeping a demo project, stay in the dashboard. Change the limits any time under Account → Connected apps → Limits; they apply straight away.
Know it's really Claude
Anyone can register an app called "Claude". The approval screen shows Verified only when it would send you back to claude.ai or claude.com. If an app calls itself Claude but would send you somewhere else, the screen says so in red and highlights Cancel.
Each connection, and each disconnection, is recorded in your projects' activity, and changes made through it are marked as coming from the connector. If you sign in by email, you also get an email whenever a new app connects.
What it can't do
- Add credit, withdraw, buy domains, sell APIs, pay over x402, or move money or crypto in any other way. Those tools aren't there, and CLI refuses those requests from a connector sign-in even through the API.
- Read your conversation, Claude's memory or your files. It gets only the arguments Claude passes to a tool.
Sign-in and data
- OAuth 2.1 with PKCE. Access tokens last an hour and refresh tokens 30 days; refreshing replaces both. CLI stores only hashes of them. Registering, signing in and token requests are rate-limited per address, and sign-ins nobody finished are cleaned up.
- See, limit and disconnect connected apps under Account → Connected apps. Disconnecting stops it straight away.
- Approvals still apply: if your rules need a person's yes, Claude waits for it.
The self-hosted x402 plugin
/plugin marketplace add clicloud-app/claude-plugins
/plugin install clicloud-x402@clicloudClaude Code asks for:
- CLI API key: from the dashboard's Connect an agent panel. It has its own role and spending cap.
- Agent wallet private key (optional): an EVM wallet the agent pays from. Fund it with only what you're willing for the agent to spend.
- x402 spending limit: the most the plugin may pay in USDC, in total. It's counted on your machine (
~/.config/cli/spend.json), so restarting doesn't reset it. 0 never pays.
The key and wallet go into your system's secure credential store. The plugin runs an exact, pinned version of @clicloud-app/mcp with npx, which downloads it from npm. With a wallet, it can add credit to a project, pay for other paid APIs and sell your own. See Paying for other APIs and Selling your API and tools.
Which one?
- Use the CLI connector for everyday work from any Claude app: nothing to install, and through it Claude can only spend the project's hosting credit, up to the daily limit you set.
- Use clicloud-x402 when an agent should pay for things itself, from a wallet you fund and cap.
You can install both. Questions: [email protected].
Try it
Once CLI is connected, ask Claude things like:
- "Deploy github.com/clicloud-app/starters (the fastapi folder) to a new CLI project called demo, with a Postgres database, and tell me the URL when it's live."
- "What's running in my CLI projects, what did each cost this week, and is anything failing?"
- "The api service in my demo project is returning errors. Read its logs and recent deploys, tell me what's wrong, and roll back to the last good deploy if a deploy caused it."
Each change asks you first, and shows up in the project's activity as coming from the connector.