The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Clawops listing page.
MCP-native infrastructure ops for OpenClaw — with read-only mode, destructive-action confirmation, and audit logs built in.
clawops is a CLI and MCP server for deploying and operating self-hosted OpenClaw instances. Provision on AWS, GCP, Azure, or any Linux VM — then manage day-to-day operations from the terminal, or let Claude Code and Cursor drive them through typed MCP tools with explicit safety controls.
README maintenance. The release-notes section had grown to four versions and was missing
v1.7.2 entirely. It now carries the current line only; CHANGELOG.md remains the
full history.
Requires OpenClaw >= 2026.9.2. This line deploys the 2.0 runtime contract: a writable state
directory holding config, SQLite and plugins; gateway.mode written into the config; no
--allow-unconfigured. A pre-2.0 OpenClaw understands none of it, so doctor, plan, up and
apply refuse anything below the floor. For OpenClaw <= 2026.7.1-2, use
npm install -g @clawops/cli@legacy.
The support range in spec/openclaw-versions.yaml was previously unbounded and read by no code,
so any OpenClaw release was accepted. Moving tags are now resolved to a concrete version before
the range check, and an unresolved tag is refused rather than assumed safe — latest and stable
both point at 2.0 today. The default is now a concrete pin.
clawops doctor --stack <name> reports the version a deployed gateway is actually running, so an
existing deployment that already picked up 2.0 through a moving tag can be identified.
clawops config set now applies. It never has. The config clawops mounted was read by nothing
on either OpenClaw line — models, channels and auth mode were silently discarded. Setting
OPENCLAW_CONFIG_PATH fixes it, with four guards: gateway.port normalisation (with a warning),
an argv --port pin, a parse check, and a post-restart health gate. The MCP gateway restart
tool, which dropped the config mount entirely, now matches the CLI path.
A fresh local deployment starts. OpenClaw refuses a non-loopback bind without auth and always
binds 0.0.0.0 in a container, and the bootstrap never supplied a token — so the gateway exited 78
and systemd restart-looped. A token is now generated once, kept in a 0600 env file, and passed
via --env-file, never on the command line.
Ollama is reachable. localhost inside the container is the container. clawops now passes
--add-host=host.docker.internal:host-gateway and defaults the Ollama address to match.
Packaging. spec/ was missing from the published files, and neither it nor
bootstrap.sh.tmpl resolved from the bundle — so clawops plan and clawops up --provider local
failed from an npm install. Both are now shipped and resolved correctly.
SSH host keys. The verifier read each known_hosts line's key type as the key, so any
standard entry failed permanently with Host denied. Standard entries now parse, including
comma-separated host lists, [host]:port, hashed hostnames, @revoked / @cert-authority
markers, and wildcard and negated patterns.
Behaviour change: a host covered by a wildcard whose key does not match is now refused where it previously connected. Ignoring wildcards meant trust-on-first-use accepted a key your own
known_hostscontradicted. This matches OpenSSH.
pulumi binary required).--json) for scripting and automation.docs/limitations.md for the manual path.~/.clawops/config.json.docs/support-matrix.md.clawops setup is an interactive wizard that gets OpenClaw running in about 2 minutes. It
handles everything in one flow — no config files to write by hand, no commands to memorize.
Step 1 — Choose a deployment target
Pick an existing server you can SSH into (Linux or macOS), or a new cloud VM on AWS, GCP, or Azure. Cloud deployments walk you through authenticating with the provider CLI if you aren't already signed in.
Step 2 — Pick an LLM provider
Choose from Anthropic, OpenAI, Amazon Bedrock, Ollama, or others. The wizard prompts for your
API key and saves it locally (in ~/.clawops/secrets/, chmod 600) — it is never sent anywhere
except to OpenClaw on the target host when the config is applied.
Step 3 — Add chat integrations (optional)
Select any combination of Discord, Telegram, Slack, WhatsApp, or Teams. The wizard collects each integration's bot token the same way as the API key — paste it in, reference an env var, or point to a file.
Step 4 — Wire your AI editor
Select which AI apps should have access to clawops — Claude Desktop, Claude Code, Cursor, Windsurf, VS Code, and Zed are all supported. The wizard writes an MCP server entry into each app's config file using the absolute binary path so the app can launch it independently.
Step 5 — Deploy
The wizard bootstraps OpenClaw on the target host over SSH (installs Docker, pulls the image, starts the container), applies your LLM and integration config, generates a gateway auth token, and prints a direct dashboard URL:
Prerequisites: Node.js ≥ 22, an SSH key, and either an SSH-reachable Linux/macOS host or a
cloud account with CLI credentials configured (aws configure, gcloud auth login, or az login).
For a full narrated walkthrough with example output, see docs/demo-script.md.
If you prefer step-by-step control, or are adding clawops to an already-running deployment:
See docs/examples/local-vm.md for SSH prerequisites, firewall
setup, and troubleshooting.
The setup wizard handles this automatically (Step 4). To wire or re-wire editors at any time:
This opens the same interactive checkbox used in the wizard — select Claude Desktop, Claude Code, Cursor, Windsurf, VS Code, or Zed and clawops writes the MCP entry into each app's config using the correct absolute binary path.
To add the entry manually instead, paste this into your editor's MCP config:
Replace /path/to/clawops with the output of which clawops. Config file locations:
| App | Path |
|---|---|
| Claude Desktop (macOS) | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Desktop (Linux) | ~/.config/Claude/claude_desktop_config.json |
| Claude Code | ~/.claude.json |
| Cursor | ~/.cursor/mcp.json |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
| VS Code (macOS) | ~/Library/Application Support/Code/User/mcp.json |
| VS Code (Linux) | ~/.config/Code/User/mcp.json |
| Zed | ~/.config/zed/settings.json (key: context_servers) |
Start with --read-only — it enables status, logs, config reads, and diagnostics while
blocking mutations. Remove it only after reviewing
docs/security/mcp-safety.md.
Destructive tools (clawops_destroy, clawops_up, clawops_config_set, etc.) require explicit
confirmation before executing — they will never run silently.
For HTTP mode setup see docs/mcp/.
| Command | Description |
|---|---|
setup | First-run wizard — guided LLM, integrations, and deploy-plan generation |
init | Register a stack in ~/.clawops/config.json without provisioning |
up | Provision or update stack (--dry-run for preview) |
down | Destroy local-provider stack (requires --yes; --dry-run shows current outputs) |
destroy | Destroy cloud-provider stack with confirmation prompt (--dry-run shows current outputs) |
status | Show stack outputs: IP, gateway URL, region, provisioned time |
plan | Generate a deploy-plan JSON artifact (dry-run safe) |
apply | Apply a previously reviewed plan file (--dry-run validates and shows diff without applying) |
ssh | Interactive SSH session or run a remote command |
logs | Stream OpenClaw logs (-f, --tail N, --since 5m) |
tunnel | Local port-forward to gateway UI over SSH |
config | Get/set remote OpenClaw config values (--dry-run shows would-write JSON) |
agents | List OpenClaw agents, or stream one agent's logs |
gateway | Restart the OpenClaw gateway service |
backup | Create an OpenClaw state backup (restore returns in clawops 2.x — see limitations) |
stacks | List named stacks and their state |
doctor | Check Node version, config, SSH key, provider credentials, and Pulumi home |
secret | Manage secrets: list, set, delete, rotate, audit |
monitor | Live dashboard: gateway health, container stats, log tail, stack picker |
mcp serve | Start the embedded MCP server (stdio or HTTP) |
mcp install | Interactively wire clawops into AI editors |
mcp wire | Wire the gateway's AI as an MCP client of clawops |
help | List all commands and global flags |
harden | Apply security hardening to a deployed stack (SSH, UFW, fail2ban, unattended-upgrades, Docker socket; AWS: SG audit, SSM check, Flow Logs, GuardDuty) |
bug | Open a pre-filled GitHub issue with system context from doctor |
Full flag reference: clawops <command> --help
For non-local providers, clawops enforces a review-before-apply discipline:
The plan JSON conforms to spec/deploy-plan.schema.json (AJV-validated) and captures reviewed
intent: provider, region, instance type, CIDR ranges, and OpenClaw version. apply re-runs
pulumi up using those parameters against the current live state — it does not replay a locked
execution artifact. Review and apply in the same session to minimize drift risk.
See docs/plan-apply.md for full semantics, drift guidance, and the safe CI pattern.
clawops ships an embedded MCP server. Claude Code, Cursor, and any MCP-compatible agent can drive deployments without leaving the chat interface.
The wizard resolves the absolute binary path automatically so app launchers can find clawops
without inheriting your shell's PATH. See Connect an AI editor above
for manual config paths.
The OpenClaw gateway runs its own AI agent. Once wired, that agent can call clawops directly instead of guessing at infrastructure state:
Requires OpenClaw ≥ 2026.4 on the gateway. The clawops setup wizard offers this step
automatically after a successful deploy.
Start the server manually or confirm your config is correct:
Do not bind to a non-loopback address without additional authentication controls in front of it.
| Tool | Toolset | Description |
|---|---|---|
clawops_status | read | Show stack outputs |
clawops_logs_tail | read | Tail OpenClaw logs |
clawops_config_get | read | Read a remote config value |
clawops_agents_list | read | List running agents |
clawops_task_status | read | Poll a long-running task |
clawops_stacks_list | admin | List all stacks and their state |
clawops_up | cli | Provision or update a stack |
clawops_plan | cli | Generate a deploy plan |
clawops_apply | cli | Apply a plan file |
clawops_ssh_exec | cli | Run a command over SSH |
clawops_config_set | cli | Write a remote config value |
clawops_destroy | cli | Destroy a stack (elicits confirmation) |
clawops_workflow_deploy_app | workflow | End-to-end deploy: plan → confirm → apply → status |
read toolset tools are available in --read-only mode. All other toolsets require full mode.
Destructive tools require explicit confirmation (elicitation) unless yes: true is passed.
See docs/security/tool-risk-matrix.md for the full risk
classification of every tool.
Config lives at ~/.clawops/config.json (override with $CLAWOPS_HOME).
Cloud credentials are never stored in config — clawops reads them from the environment:
| Provider | Credential source |
|---|---|
| AWS | AWS_PROFILE or standard AWS credential chain (~/.aws/credentials) |
| GCP | GOOGLE_APPLICATION_CREDENTIALS or gcloud auth application-default login |
| Azure | AZURE_CLIENT_ID / AZURE_CLIENT_SECRET or az login |
| Local | SSH host + key configured in stacks[name].localOpts |
See docs/limitations.md for the full list. Key points:
clawops apply is not an immutable plan execution — see docs/plan-apply.md.--read-only for first evaluation.Key design decisions:
pulumi binary required; Pulumi home is sandboxed to ~/.clawops/.pulumi; stack programs are inline TypeScript closuresgs://), S3 (s3://), Azure Blob — no local state files, no pulumi.yamlssh2: never shells out to /usr/bin/ssh; TOFU host verification against ~/.clawops/known_hosts; connection pool with 5-min idle TTLgeneratePlan() → review → applyPlan(); destructive changes always require human review of the plan JSONspec/mcp-tools.yaml; all destructive tools use elicitationSee docs/architecture.md for a full narrative, and docs/decisions/ for ADRs.
Each cloud provider is an inline Pulumi program that creates the resources below. All three share the same outputs (publicIp, gatewayUrl, sshHost, sshPort, sshUser) consumed by the SSH and config-overlay layers.
| Path | Purpose |
|---|---|
spec/ | Machine-readable ground truth: JSON Schema, YAML. Treat as source of truth. |
SPEC.md | Full technical specification (milestones, rules, schemas) |
DESIGN_RULES.md | 25 normative rules (R1–R25) referenced throughout the codebase |
docs/architecture.md | Narrative system overview |
docs/plan-apply.md | Plan/apply semantics, drift guidance, CI pattern |
docs/ci.md | CI integration guide: OIDC, env vars, plan → apply in CI |
docs/security/ | MCP safety model, tool risk matrix, redaction, audit logs |
docs/providers/matrix.md | Per-provider capability matrix |
docs/decisions/ | Architecture Decision Records |
.claude/skills/ | Invokable procedures: /add-provider, /release, /tdd, /mcp-tool |
.claude/rules/ | Path-scoped lint rules loaded by Claude Code |
Two files are generated from spec/ and must not be hand-edited:
src/providers/types.ts — ProviderAdapter interface from spec/providers.schema.jsonsrc/mcp/tools/_generated.ts — Zod schemas and type exports from spec/mcp-tools.yamlRun pnpm gen:schemas after modifying either spec file. CI enforces this with --check.
Use the /add-provider skill in Claude Code, or follow src/providers/CLAUDE.md. Every adapter must satisfy ProviderAdapter in src/providers/types.ts — do not relax the schema to fit the adapter.
Use the /mcp-tool skill. The skill adds the tool to spec/mcp-tools.yaml, runs pnpm gen:schemas, creates the handler in src/mcp/tools/<toolset>/<name>.ts, and wires it into the registry. All four annotation hints (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) are required on every tool.
Use pnpm changeset to record a release note before merging a feat or fix.
| Milestone | Status | What ships |
|---|---|---|
| M0 — Scaffold | ✅ | Tooling, CI, stubs, generated types |
| M1 — GCP MVP | ✅ | init / up / down / status / ssh / logs on GCP |
| M2 — Remote Mgmt | ✅ | tunnel, config, agents, gateway; SSH connection pool |
| M3 — AWS + Azure | ✅ | AWS EC2 + Azure VM adapters; stacks list |
| M4 — Local VM | ✅ | Local adapter (SSH bootstrap, no Pulumi); doctor |
| M5 — MCP Layer | ✅ | mcp serve (stdio), all CLI ops as MCP tools, progress tracking |
| M6 — Plan/Apply | ✅ | plan + apply; deploy-plan schema; MCP HTTP transport; workflow_deploy_app |
| M7 — v1.0 Polish | ✅ | Full doctor surface; destroy command; --dry-run across commands; CI guide |
See docs/roadmap.md for the public roadmap and upcoming work.
MPL-2.0 — see LICENSE.