MCP server
Let Claude Code or Cursor drive deployments through typed tools.
clawops ships an MCP server in the same package. Every operation is a typed tool carrying explicit safety annotations, so an agent knows what is read-only, what is destructive, and what needs confirmation before it acts.
Claude Code
claude mcp add clawops -- clawops mcp serveCursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"clawops": {
"command": "npx",
"args": ["-y", "@clawops/cli", "mcp", "serve"],
"env": { "AWS_PROFILE": "my-profile" }
}
}
}The env block matters. A client starts the server with the environment its config gives it,
not your shell's, so a profile exported in a terminal never reaches it and every tool that reads
a stack fails with "Could not read the state of stack". Name the profile there, or whatever your
state backend reads. It is a profile name, not a key.
Read-only mode
For an agent you would rather not let provision anything:
clawops mcp serve --read-onlyOnly tools annotated read-only are exposed. Nothing can create, modify or destroy infrastructure.
Wiring the gateway's own AI
clawops mcp wire lets the OpenClaw gateway's agents call clawops. You run the server where the
gateway can reach it, and the gateway connects before it saves the entry:
clawops mcp serve --http 18790 --bind 0.0.0.0 --token "$(openssl rand -hex 16)"
clawops mcp wire --stack prod --token <same token>Every agent on the gateway gets every clawops tool
OpenClaw's MCP servers are gateway-wide, so wiring offers clawops to all agents, including the
default agent that anyone who can message the gateway reaches. From 2.4.1 mcp wire names each
one. To keep an agent away, add "clawops__*" to its agents.entries.<id>.tools.deny. For an
agent that hands destructive changes back to you instead of making them, use a host agent
(below).
Requires OpenClaw 2026.7.1-2 or later on the gateway.
On the gateway host
clawops agent install (2.4) runs the MCP server on the gateway host for one OpenClaw agent only
you can reach. Its read tools run locally, with no SSH, state or cloud credentials. A destructive
tool you allowed returns the CLI command for you to run instead of acting, and yes: true is
ignored. See Operations.
How the safety model works
Every tool declares four hints. Read-only, destructive, idempotent, and open-world, rather than
relying on defaults. Destructive tools require explicit confirmation unless the caller passes
yes: true.
Long-running tools record their progress on a task that clawops_task_status reads. They do not
yet send progress notifications, and only clawops_migrate returns its task id before it
finishes, so a slow call looks hung until it returns.
Tool calls are written to an audit log with arguments sanitised. Authorization, anything matching
*token*, *secret* or *key*, passwords and connection strings are redacted before they are
recorded.
For clawops_config_set, the value is redacted when its config path names a secret, such as
models.providers.openai.apiKey. Before 2.3.1 the path was redacted and the value was logged in
clear. If you set a secret this way on an earlier version, check ~/.clawops/mcp-audit.log and
rotate that secret.
Plan generation
The MCP tools generate deploy plans. They do not apply infrastructure straight from a natural-language instruction. An agent produces a plan, you review it, and application is a separate explicit step. See Plan → Apply.