Getting started
Connect your AI agent
Set up Claude Code, Cursor or any other agent to deploy and run your apps on CLI, with limits you choose.
CLI is built so your AI agent can do the work for you: create apps, add credit, deploy, read errors and fix them. You connect it once and give it a spending limit; every change it makes is recorded with its reason, its cost and an undo button.
How to do it: open a project and find Give your agent one line at the top. Pick your agent app (Claude, ChatGPT, Cursor and others), and CLI makes a key with a limit and gives you one line to paste.
"Read CLI's skill file, then deploy this folder and fix anything that fails."
You can see and undo anything it did in the flight recorder.
CLI is built so your AI agent can do the work: create services, add credit, deploy, read errors and fix them. You connect it once, give it a spending limit, and every change it makes shows up in your flight recorder with its reason, its cost and an undo button.
There are three ways to connect an agent: the MCP server (best for Claude Code, Cursor and other MCP apps), the skill file (for any agent that can make HTTP calls), or the agent's own wallet.
The quickest way: from the dashboard
The dashboard makes the agent a key and writes the line for you.
- Open a project. New accounts see this as the last setup step, Connect your agent; empty projects show the Give your agent one line panel.
- Pick your agent: Claude Code, Cursor, VS Code, Other MCP apps, or Any agent.
- Set a spending limit in dollars (it starts at $10). The agent has to ask you before spending more than this.
- Press Make the line. CLI creates a key for this project with the agent role,
read,deployandmanagescopes, your limit, and a 30-day expiry. - Copy the line. For Claude Code, run it in your project folder. For Cursor and VS Code, press Add to Cursor or Add to VS Code, or put the snippet in
.cursor/mcp.jsonor.vscode/mcp.json. For other MCP apps, add the snippet to the app's MCP settings. For any other agent, paste the prompt into its chat. - Ask your agent: "Deploy this to CLI."
The panel then shows each step the agent takes, with its reason, and each service it creates, until something is live.
On the Claude Code tab, the panel also offers the two CLI plugins: clicloud (signs in through your browser, no payments) and clicloud-x402 (uses this key and can pay over x402). Every app's setup, step by step, is in Install in your agent app.
In Claude on the web, desktop or mobile, add the CLI connector instead: no key, you approve it in your browser. See CLI in Claude. In ChatGPT, add the CLI app; see CLI in ChatGPT.
Set up the MCP server yourself
The MCP server is the npm package @clicloud-app/mcp, and runs on your machine with npx:
npx -y @clicloud-app/mcpIt gives your agent about 100 cli_* tools and the skill file as a resource. You configure it with environment variables:
| Variable | What it does |
|---|---|
CLI_API_URL | The CLI server to talk to |
CLI_API_KEY | A project key (clik_…). Works without a wallet, with that key's role and limits |
CLI_AGENT_PRIVATE_KEY | An EVM wallet: signs in and pays on Base |
CLI_AGENT_SOLANA_KEY | A Solana wallet: pays on Solana, and signs in when there's no EVM key |
CLI_PAY_NETWORK | base or solana, when both wallets are set |
CLI_SPEND_LIMIT_USDC | The most this MCP process may pay over x402. Default 0: it never pays and asks you instead |
You need either CLI_API_KEY or a wallet. To make a key without the dashboard panel, see Agent permissions and limits.
Claude Code
claude mcp add cli -e CLI_API_URL=https://api.clicloud.app -e CLI_API_KEY=clik_… -- npx -y @clicloud-app/mcpOr install the CLI plugin for Claude Code instead; see Install in your agent app.
Cursor and other MCP apps
Add this to .cursor/mcp.json (or your app's MCP settings). VS Code uses .vscode/mcp.json with servers in place of mcpServers; see Install in your agent app.
{
"mcpServers": {
"cli": {
"command": "npx",
"args": ["-y", "@clicloud-app/mcp"],
"env": {
"CLI_API_URL": "https://api.clicloud.app",
"CLI_API_KEY": "clik_…"
}
}
}
}Agents that read the skill file
Any agent that can read a web page and make HTTP calls can use CLI without MCP. Point it at /skill.md on your CLI server (also served as /llms.txt). It covers signing in, funding, the deploy loop, guardrails, and a playbook for every error code.
The dashboard's Any agent option writes a prompt like this for you:
"Read https://api.clicloud.app/skill.md, then deploy this project to CLI project prj_abc123. Call the API with the header "Authorization: Bearer clik_…", and send a one-line reason with every change in the X-CLI-Intent header."
Agents with their own wallet
An autonomous agent with its own funds doesn't need you to create anything: its EVM or Solana wallet is its account. It can sign in, create a project, fund it and deploy before any person signs up.
The sign-in works like this:
- The agent asks for a challenge with its address.
- CLI returns a message containing a one-time code.
- The agent signs the message exactly as given (EVM:
personal_sign; Solana: ed25519 over the text). - CLI returns a token valid for 24 hours.
With the API:
POST /v1/auth/challenge
POST /v1/auth/verify{ "address": "0x1234…abcd" }With the MCP server, set CLI_AGENT_PRIVATE_KEY or CLI_AGENT_SOLANA_KEY and the server signs in for you. To let it pay for credit over x402, also set CLI_SPEND_LIMIT_USDC to the most it may spend.
The project's owner can then add a person, or another agent with a spending cap, as members. See Teams and security.
Every change carries a reason
Every MCP tool that takes arguments also takes why: a one-sentence reason, sent to CLI as the X-CLI-Intent header. Agents using the API send that header directly. You see the reason in the flight recorder beside the change, and on any approval request the agent sends you.
A good reason is written for you, not for the agent: "Raise memory: the worker was killed for running out at 512 MB."
What your agent will and won't do
The skill file tells agents to follow some rules, and CLI enforces your limits on the server whatever the agent tries:
- It says why on every change, and checks the flight recorder first: if you just changed something, it asks before changing it back.
- It makes at most 3 automatic fix attempts per failing service, and stops if the same error repeats twice.
- It never invents secret values such as API keys; it asks you.
- It stops at its spending limit and asks you to raise it.
- If your project's rules ask for approval, it sends you a request and waits. See Approvals.
Good first prompts
"Deploy this repo to CLI. If it needs a database, ask me first."
"Why did the last deploy of web fail? Fix it if you can, and tell me what you changed."
"What is my-app costing per hour, and is anything oversized?"
"Add a staging environment that deploys from the staging branch."
"Put the api behind app.example.com and tell me which DNS records to add."
"Show me the plan and the cost before you change anything."
Next steps
- Install in Claude Code, Cursor, VS Code or another app: Install in your agent app.
- Decide what agents may do: Agent permissions and limits.
- Approve requests from your phone: Approvals.
- See and undo every change: Flight recorder and undo.
- The full tool list: MCP tools.