Cloud for BotsDocsLibraryPricingDashboardGet a key

Cloud for Bots docs

One key and one MCP server give your bot sandboxes, a logged-in browser, storage, secrets, queues, cron, locks and a human when it gets stuck. Bots get this guide automatically when they connect. Plain text: /bots.md

Quickstart

  1. Get a key. Enter your email on the homepage. Your key shows once and is copied for you. No card.
  2. Connect your bot. In Grok Bot (or any MCP client) add the server:
    URL:     https://cloudforbots.com/mcp
    Header:  Authorization: Bearer <your key>
  3. First win. Ask your bot: “Run python in my Cloud for Bots sandbox and add the numbers 1 to 100.” It should answer 5050. Or from a terminal:
    curl -s https://cloudforbots.com/api/v1/sandbox \
      -H "Authorization: Bearer $CLOUDFORBOTS_API_KEY" \
      -d '{"action":"run","cmd":"python3 -c \"print(sum(range(101)))\""}'

Want to try first? The homepage has a live sandbox you can run without a key.

Connect your bot

AppHow
Grok BotAdd a custom MCP server with the URL and header above.
Claude Codecurl -fsSL https://cloudforbots.com/install.sh | sh or claude mcp add with the URL and header.
Claude appSettings → Connectors → add custom connector.
ChatGPTDeveloper mode → add a custom MCP connector.
Any MCP clientStreamable HTTP at https://cloudforbots.com/mcp, bearer auth.

Step-by-step with copy buttons: /start.

Which tool when

Pattern 1: long job with resume

  1. store get ns jobs, key <job> -> last finished step (none = start at 0).
  2. For each remaining step: sandbox run it, then store set {"step": n, "result": ...}.
  3. If you crash or the chat ends, start again at step 1. You skip finished steps.

Pattern 2: webhook-driven bot

  1. inbox create name orders -> give the URL to the other service.
  2. cron set (or timer) with {queue: "wake.orders"} if you need a nudge, or just check on each run.
  3. queue pull inbox.orders, handle each message, then ack its id. Un-acked messages come back.

Pattern 3: safe posting with a rate limit

  1. lock acquire post (ttl_s 60). If you do not get it, another bot is posting: stop.
  2. rate take posts limit 6/6h. If not allowed, wait retry_after_s.
  3. fetch the posting API with {{secret:POST_TOKEN}}.
  4. ledger record the run, then lock release with the token.

Rules of thumb

Custom instructions for your bot

Paste this once so your bot knows when to reach for each tool.

You have Cloud for Bots tools (MCP server "cloud-for-bots"). Use sandbox for heavy or long jobs. Save progress to store after each step and resume from it. Use inbox, queue and cron to wake up later. Take a lock and a rate slot before posting or other shared actions. Use secrets + fetch instead of pasting API keys. Use browser for logged-in sites and handoff when a human is needed. Ask me before spending money or posting publicly. Full guide: https://cloudforbots.com/bots.md

Tool reference

Every tool works three ways: as an MCP tool, as REST, and from the TypeScript SDK. All calls use Authorization: Bearer <key>.

Sandbox MCP: sandbox

Named Linux sandboxes that pause instead of dying. Files, packages and processes survive.

POST /api/v1/sandbox

ActionBody
run{cmd, cwd?, timeout_s? (1-120), background?, secrets?}
write_file{path, content | content_base64}
read_file{path}
sync_from_store / sync_to_store{ns?, prefix?, dir?}
pause · kill · status · list{name?}
curl -s https://cloudforbots.com/api/v1/sandbox \
  -H "Authorization: Bearer $CLOUDFORBOTS_API_KEY" \
  -d '{"action":"run","cmd":"python3 -c 'print(5050)'"}'

Free: 3 sandboxes, 60 run-minutes a day. Auto-pauses 1 minute after the last call.

Browser MCP: browser

A real headless Chromium per named session. Logins and cookies stay between calls.

POST /api/v1/browser

ActionBody
open{url}
run{steps:[{goto},{click},{fill},{type},{press},{extract},{screenshot},...]}
handoff{kind: 2fa|captcha|login, note?, fill?}
screenshot · pause · kill · list{session?}
curl -s https://cloudforbots.com/api/v1/browser \
  -H "Authorization: Bearer $CLOUDFORBOTS_API_KEY" \
  -d '{"action":"open","url":"https://example.com"}'

Store MCP: store

Key-value and files for your account. Any key on the account can read them.

POST /api/v1/store

ActionBody
get · set · incr · delete · list{ns?, key, value?, ttl_seconds?, if_version?}
file_put · file_get · file_list · file_delete{ns?, name, content_base64?}
usage{}
curl -s https://cloudforbots.com/api/v1/store \
  -H "Authorization: Bearer $CLOUDFORBOTS_API_KEY" \
  -d '{"action":"set","ns":"jobs","key":"daily","value":{"step":3}}'

Free: 100 MB, 100,000 items, values up to 256 KB, files up to 4 MB. REST: /api/v1/store/kv/<ns>/<key>

Secrets + fetch MCP: secrets

Store an API key once. Call APIs with {{secret:NAME}} and the value is never shown to the bot.

POST /api/v1/secrets · POST /api/v1/fetch

ActionBody
secrets set{name, value, allowed_hosts:["api.example.com"]}
secrets list · delete{name?}
fetch{url, method?, headers?, body?} with {{secret:NAME}} anywhere
curl -s https://cloudforbots.com/api/v1/secrets \
  -H "Authorization: Bearer $CLOUDFORBOTS_API_KEY" \
  -d '{"url":"https://api.example.com/me","headers":{"Authorization":"Bearer {{secret:EX_TOKEN}}"}}'

Free: 25 secrets. Only https, only allowed hosts, values redacted from replies.

Queue, inbox, topics MCP: queue

Wake up later and pass work between bots. At-least-once delivery.

POST /api/v1/queue · /api/v1/inbox · /api/v1/topic

ActionBody
push{queue, message | messages, delay_s?}
pull{queue, max<=10, visibility_s}
ack · nack{queue, ids}
inbox create{name} returns a public URL; posts land in queue inbox.<name>
topic publish · subscribe{topic, queue?, message}
curl -s https://cloudforbots.com/api/v1/queue \
  -H "Authorization: Bearer $CLOUDFORBOTS_API_KEY" \
  -d '{"action":"pull","queue":"inbox.orders","max":5}'

Free: 10,000 pushes a day, 64 KB per message.

Cron and timers MCP: cron

Run a request or drop a message on a schedule (UTC), or once.

POST /api/v1/cron

ActionBody
set{name, schedule:"*/5 * * * *", request | {queue, message}}
timer{at | delay_s, request | queue}
list · history · pause · resume · delete · run_now{name}
curl -s https://cloudforbots.com/api/v1/cron \
  -H "Authorization: Bearer $CLOUDFORBOTS_API_KEY" \
  -d '{"action":"set","name":"daily","schedule":"@daily","request":{"queue":"wake.daily","message":"go"}}'

Lock and rate MCP: lock

Stop bots colliding: one writer at a time, and shared limits across every bot.

POST /api/v1/lock · POST /api/v1/rate

ActionBody
lock acquire · renew · release · status{name, ttl_s?, wait_s?, token}
rate take · peek{name, limit:"6/6h", n?}
curl -s https://cloudforbots.com/api/v1/lock \
  -H "Authorization: Bearer $CLOUDFORBOTS_API_KEY" \
  -d '{"action":"take","name":"posts","limit":"6/6h"}'

Free: 1,000 locks, 200 counters.

Human handoff MCP: handoff

When the bot hits a captcha, 2FA or a sign-in wall, a person gets a one-tap link.

POST /api/v1/handoff

ActionBody
create{kind, url?, note?, notify_email?}
status · cancel · list{id}
curl -s https://cloudforbots.com/api/v1/handoff \
  -H "Authorization: Bearer $CLOUDFORBOTS_API_KEY" \
  -d '{"action":"create","kind":"2fa","note":"Bank login code"}'

All Access gets links. Free keys log the block only.

Login vault MCP: vault

The bot gets a signed-in session without seeing the password.

POST /api/v1/vault

ActionBody
put{name, domain, username, password, totp_secret?} (from the dashboard)
login{name, url, form}
fetch{session, url}
curl -s https://cloudforbots.com/api/v1/vault \
  -H "Authorization: Bearer $CLOUDFORBOTS_API_KEY" \
  -d '{"action":"login","name":"crm","url":"https://crm.example.com/login","form":{"email":"{{username}}","pw":"{{password}}"}}'

Model gateway MCP: ai

Call Grok, Claude or GPT with your own provider keys stored in Secrets. No markup.

POST /api/v1/ai

ActionBody
call{model, messages, system?, max_tokens?, provider?, key_secret?}
curl -s https://cloudforbots.com/api/v1/ai \
  -H "Authorization: Bearer $CLOUDFORBOTS_API_KEY" \
  -d '{"model":"grok-4","messages":[{"role":"user","content":"hi"}]}'

Default secret names: XAI_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY.

Ledger, replay, webhooks MCP: ledger

Record runs and costs, replay what happened, get signed events.

POST /api/v1/ledger · /api/v1/replay · /api/v1/webhooks

ActionBody
ledger record{bot, status, usd?, tokens_in?, model?}
ledger feed · rollup{since?, days?}
webhooks add · list · rotate · redeliver{url, events?}
curl -s https://cloudforbots.com/api/v1/ledger \
  -H "Authorization: Bearer $CLOUDFORBOTS_API_KEY" \
  -d '{"action":"rollup","days":7}'