OpenClaw API · MCP · CLI · SDKs

OpenClaw as an API

The open-source agent runtime, addressable from every modern interface. REST endpoints, an MCP server for Claude, Cursor, and Windsurf, a real CLI, typed SDKs, webhooks, and streaming — on managed or self-hosted infrastructure.

bash
curl https://api.donely.ai/v1/openclaw/runs \
  -H "Authorization: Bearer $DONELY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent":"my-agent","input":"Summarize today\'s sales calls"}'

Agents today don't live behind a single chat box. The same OpenClaw agent should answer a REST call from your backend, register as an MCP tool inside Cursor, run as a step in a CI pipeline, and stream tokens into your product UI. The OpenClaw API gives you all of those surfaces from one runtime.

What you can do

Every surface agents need — one platform

REST, MCP, CLI, SDKs, webhooks, and streaming. Wire OpenClaw into anything from a Cursor session to a production backend.

REST API

Versioned /v1 endpoints for runs, agents, tools, skills, knowledge, and memory — over standard HTTPS with bearer auth.

MCP Server

Native Model Context Protocol server. Add OpenClaw to Claude Desktop, Cursor, Windsurf, or any MCP client and your agents appear as first-class tools.

CLI

openclaw login, run, logs, skills deploy, agents pull — built for shell scripts, CI pipelines, and humans at a terminal.

Typed SDKs

TypeScript and Python SDKs with full coverage, streaming helpers, retries, and idempotency. Generated from the OpenAPI spec.

Webhooks

HMAC-signed events for run.completed, run.failed, tool.called, message.sent, and channel.received.

Streaming

SSE streams for token-by-token output, intermediate reasoning, tool calls, and structured outputs.

Sandboxed tools

Browser, shell, file ops, and email tools run inside an isolated sandbox per instance — never on a shared host.

Scoped keys & OAuth

Personal keys for hacking, scoped service keys for backends, per-user OAuth for end-user agents in your SaaS.

Durable runs

Resumable, replayable runs that survive worker restarts. Great for cron jobs, long research tasks, and background queues.

Quickstart

Pick your surface

The same OpenClaw agent runtime, addressable from REST, MCP, the CLI, or a typed SDK.

bash
# Create a run on an existing OpenClaw agent
curl https://api.donely.ai/v1/openclaw/runs \
  -H "Authorization: Bearer $DONELY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent": "research-bot",
    "input": "Pull this week\'s GitHub trending repos and summarize",
    "stream": true
  }'

# List your agents
curl https://api.donely.ai/v1/openclaw/agents \
  -H "Authorization: Bearer $DONELY_API_KEY"
REST base

https://api.donely.ai/v1/openclaw

MCP endpoint

https://mcp.donely.ai/openclaw/sse

CLI

npm i -g @openclaw/cli

What people build

From IDE copilots to production backends

OpenClaw as an MCP tool

Add the MCP URL to Claude Desktop or Cursor and every OpenClaw skill becomes a first-class tool the model can call.

Embed agents in your product

Stream OpenClaw runs into your app UI via SSE with structured token, tool, and citation events.

CI-driven agents

Call openclaw run inside GitHub Actions or your own pipeline — replace fragile prompt-glue scripts with a real runtime.

Per-client isolated agents

Spin up an isolated OpenClaw instance per customer or workspace via the API, each with its own keys and audit log.

Scheduled research & ops

Durable, resumable runs for nightly research, weekly digests, and long-running ops jobs.

Hybrid self-hosted + managed

Run the OpenClaw runtime in your own VPC and still hit the same /v1 API surface and MCP endpoint.

FAQ

Questions, answered honestly

Yes. The /v1 surface, MCP endpoints, CLI, SDKs, and webhook contracts are identical. Self-hosted runs point at your own URL; managed points at api.donely.ai. Your client code doesn't change.

MCP (Model Context Protocol) is the open standard that LLM clients like Claude Desktop, Cursor, and Windsurf use to talk to external tools. Shipping an MCP server means anyone using those clients can drop an OpenClaw agent in as a tool without writing integration code.

No. OpenClaw agents are defined in plain TypeScript or YAML, and you only ever interact with them over REST, MCP, the CLI, or a typed SDK — the same patterns you already use for any modern API.

Use scoped service keys for trusted backends. For SaaS products where each end user needs their own agent and tool credentials, OpenClaw supports per-user OAuth flows and scoped delegated keys.

Runs are durable. State is persisted, runs survive process restarts, and you can stream the same run from multiple clients. Webhooks fire on completion so backends don't poll.

Yes. The full OpenAPI 3.1 spec is available and powers the typed SDKs. You can also generate your own client in any language.

Your AI workforce is one click away

Get started in minutes. No setup, no infrastructure headaches.

Deploy your first AI employee

Free $5 credit · No credit card required · 60s setup