
Openclaw Control Mcp
io.github.smurfy92由 GitHub 帳號 smurfy92 發布v0.8.3更新於 Oct 26, 2026
MCP server bridging Claude Code to the OpenClaw gateway management plane via JSON-RPC.
發布方自己的服務:OpenClaw Direct
概覽
本機 MCP 伺服器,讓助理透過 JSON-RPC 操作 OpenClaw 閘道的管理介面:排程工作、工作階段、代理、頻道、技能、密鑰與審核。
- 可以做什麼
- 檢視閘道:列出已公布的 JSON-RPC 方法與事件,並可直接呼叫任意方法作為備援。
- 管理排程工作:列出、執行、新增、更新與刪除工作,含每日、每週、間隔與一次性範本。
- 處理工作階段與對話:列出、預覽、建立、傳送、中止、重設、刪除與壓縮工作階段,並讀取對話紀錄。
- 管理代理、頻道、模型、用量、日誌、設定、技能、工具與密鑰。
- 處理裝置與審核:配對、權杖輪替與撤銷、exec 與外掛審核決定,以及節點與 TTS 控制。
- 適用情境
- 適合已運行 OpenClaw 閘道、想用對話取代控制面板網頁來操作閘道的情況,例如查看排程工作、追蹤工作階段、診斷技能、輪替密鑰或核准卡住的 exec 呼叫。
- 執行需求
- 透過 npx 在本機執行(需 Node.js)。需要閘道的 WebSocket 位址(OPENCLAW_GATEWAY_URL),通常還需閘道權杖(OPENCLAW_GATEWAY_TOKEN),可選密碼。首次使用會產生 Ed25519 裝置身分,需在 OpenClaw 控制面板核准一次。可選的 HTTP 模式使用 OPENCLAW_HTTP_BEARER。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Openclaw Control Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
openclaw-control-mcp
[npm] [npm downloads] [CI] [license] [Node]
The OpenClaw control plane MCP server. Operate the gateway's full management surface from Claude Code, Cursor, or any MCP client — list and trigger crons, inspect sessions, configure agents and channels, manage skills and secrets, drive the doctor memory plane, pair devices, approve exec/plugin calls. 143 typed tools covering every JSON-RPC method the gateway publishes.
Different from the upstream
openclaw-mcp, which only wraps/v1/chat/completions. This one talks the JSON-RPC protocol used by the OpenClaw Control panel — so you can operate the gateway itself (its crons, sessions, agents, channels, skills, secrets, …), not just chat through it.
Without vs with
Without openclaw-control-mcp — you bounce between the Control panel UI, your terminal, and Claude Code. "List my crons" means opening the SPA. "Tail this agent session" means staying in the panel and refreshing. "Why did this skill fail?" means hunting through logs.tail manually. The assistant can chat through the gateway but it cannot operate it.
With openclaw-control-mcp — the same assistant queries openclaw_cron_list, follows up with openclaw_sessions_tail to watch a turn in flight, asks openclaw_skills_status for diagnostic data, rotates a secret via openclaw_secrets_set, and approves a stuck openclaw_exec_approval — without you ever leaving the chat. The Control panel becomes an audit interface, not a daily-driver.
Quickstart
One-click install from supported clients:
[Install in Cursor] [Install in VS Code]
On first start the wrapper generates an Ed25519 device identity and surfaces a pairing request id. Approve it once in the OpenClaw Control panel, the gateway issues a device token, and every subsequent call uses it transparently. Full pairing flow below.
Status
0.8.3 — published on npm, indexed on the official MCP Registry as io.github.smurfy92/openclaw-control-mcp. Multi-instance gateway configs, file-based secrets (.env + store.json mode 0600, no OS keychain access — see ADR-006), 143 typed tools across the 128 published JSON-RPC methods, plus two escape hatches: openclaw_introspect enumerates every method/event the gateway publishes in its hello-ok, and openclaw_call lets you reach any method that doesn't have a typed wrapper yet — so new gateway endpoints are reachable without waiting on a release.
The Ed25519 signed handshake is verified live against gateway 2026.4.12+. On first start, the wrapper generates a long-lived device identity, persists it under ${XDG_CONFIG_HOME:-~/.config}/openclaw-control-mcp/store.json (mode 0600), signs the connect frame, and surfaces the resulting pairing request id so you can approve it once via the Control panel. After approval the gateway issues a device token (in hello-ok.auth.deviceToken) which is cached per-gateway and used on subsequent connects to grant scopes.
The wire format (frame types, field names, signing canonicalisation, scopes) was reverse-engineered from the minified Control panel bundle (/api-docs/assets/index-*.js) and cross-checked against openclaw/openclaw/scripts/dev/gateway-smoke.ts. It is not officially documented. Behaviour may change without notice if OpenClaw updates the gateway.
First-run / pairing flow
- Start the wrapper (Claude Code does this automatically once registered in
~/.claude.json). - Ask Claude to run
openclaw_device_status. The first call:- generates an Ed25519 keypair and persists it to disk,
- opens a WS to the gateway,
- sends a signed
connectframe, - the gateway replies with
PAIRING_REQUIREDand arequestId, - the tool returns
{ pendingPairing: { requestId }, nextStep: "approve in Control panel…" }.
- Open the OpenClaw Control panel → Devices tab → approve the request whose id matches.
- Ask Claude to run
openclaw_device_statusagain. This time the gateway accepts the connect, returnsauth.deviceTokeninhello-ok, the wrapper caches it, andpaired: trueplus the granted scopes appear in the response. - From then on, scoped tools (
openclaw_cron_list,_status, …) work normally.
Install
From npm (recommended)
Restart Claude Code, then jump to Configuration.
From source (for contributors)
Releasing (npm + official MCP Registry, both from .github/workflows/publish.yml on a v*.*.* tag) is documented in CONTRIBUTING.md.
Configuration
The wrapper requires the WebSocket URL of your OpenClaw gateway. The public Hostinger HTTPS hostname does not expose the WS endpoint — you need the URL the Control panel itself uses internally.
Find it from your browser:
- Open the Control panel and log in.
- In the DevTools console run:
- Copy the
gatewayUrlfield (typicallyws://127.0.0.1:18789, a Tailscalews://100.x.y.z:18789, or a dedicatedwss://…host).
Use with Claude Code
Recommended: register, then configure in chat
The slickest path — no ~/.claude.json editing, no env vars. After installing (npx or from source), in chat:
"Configure OpenClaw with gateway
wss://your-gateway.example.comand token<your-token>"
Claude calls openclaw_setup({ gatewayUrl, gatewayToken }), the values get persisted to ~/.config/openclaw-control-mcp/store.json (mode 0600). The next call to openclaw_device_status triggers the WS handshake and pairing flow.
openclaw_setup_show reports the effective configuration, openclaw_setup_clear wipes the persisted config (without touching the device identity / token).
Alternative: env-var-driven
If you prefer env vars (they take precedence over the stored config), edit ~/.claude.json:
Restart Claude Code — openclaw_cron_list and friends will be available.
Secrets & the .env file
The server never touches your OS keychain — no security / secret-tool call, no permission prompt, nothing to approve. Since 0.8.0 secrets resolve from exactly two places, in this order:
.env candidates, highest precedence first:
$OPENCLAW_ENV_FILE— explicit path./.env— the directory the server is started from${XDG_CONFIG_HOME:-~/.config}/openclaw-control-mcp/.env
Copy .env.example, fill it in, then chmod 600 .env. The server warns on stderr if the file is readable by other users. The parser is deliberately minimal — KEY=value, export KEY=value, "quoted", '''raw''', # comments — with no variable interpolation, so a secret is never expanded or reinterpreted.
Want the server to never write a secret to disk? Put OPENCLAW_DEVICE_PRIVATE_KEY + OPENCLAW_DEVICE_TOKEN in the .env (get them from an already-paired install with npx tsx scripts/export-ci-secrets.ts). Env-supplied identity short-circuits the store entirely.
--health reports which .env files were loaded and which variables they supplied.
Upgrading from 0.5.0 – 0.7.0 (keychain removal)
Those versions kept secrets in the OS keychain and left blank fields in store.json. Run the one-shot import once, before your next session:
It reads the keychain, writes the values into store.json (mode 0600), and prints the security delete-generic-password … / secret-tool clear … commands for the now-unused items — it never deletes anything from your keychain itself. Running it twice is a no-op. This is the only code path in the package that reads a keychain at all; it is dynamically imported behind that flag and never runs on normal startup.
If you'd rather not migrate, openclaw_device_repair wipes the orphaned device and the next connect re-pairs from scratch.
Environment variables
Multi-instance: per-call instance parameter
Every tool accepts an optional instance field so a single MCP can target several gateways without flipping the active default first:
Configure each gateway with openclaw_setup({ instance: "work", gatewayUrl, gatewayToken }), list them with openclaw_setup_list, switch the active default with openclaw_setup_select_default. When OPENCLAW_GATEWAY_URL is set in the env, it overrides everything (including a instance arg) — the env-var path always wins.
HTTP mode
For clients that don't speak stdio (Cursor, Continue, Cline, Zed, browser), run the MCP as a Streamable HTTP server:
Endpoint: POST/GET http://<host>:<port>/mcp (MCP Streamable HTTP, stateful — each client gets its own session id). Stdio remains the default; the HTTP server only starts when explicitly enabled.
Auth behaviour:
OPENCLAW_HTTP_BEARERset → every/mcprequest must includeAuthorization: Bearer <token>. Mismatched / missing tokens get401 Unauthorizedwith aWWW-Authenticate: Bearer realm="openclaw-control-mcp"header. Comparison is constant-time.OPENCLAW_HTTP_BEARERunset + bound to loopback → starts with a stderr warning. Anyone with local shell access can invoke every tool.OPENCLAW_HTTP_BEARERunset + bound to a non-loopback host (0.0.0.0, public IP, etc.) → the server refuses to start. Public binding without auth is a takeover risk and not negotiable.
For long-lived deployments behind a reverse proxy, terminate TLS at the proxy (nginx, Caddy, Traefik) and forward to 127.0.0.1:3333/mcp — the bearer protects the proxy → MCP hop too.
Mock mode (no gateway required)
Set OPENCLAW_MOCK=1 (or pass --mock) to swap the WebSocket client for an in-memory mock. Useful for:
- CI — run tests / demos without a live gateway.
- Workflow rehearsals — dry-run a sequence of
cron.add/cron.update/config.patchcalls before pointing at prod. - Onboarding — try the MCP without provisioning a gateway instance.
State (cron jobs added, config patches, sessions) is kept in-process and discarded on exit. The mock seeds one cron job (sample-weekly) and one session so list calls return non-empty. Methods without a canned handler return { mock: true, ok: true } so nothing crashes — extend src/gateway/mock.ts to specialise additional methods.
Cron templates (no schedule syntax to remember)
Four wrappers on top of cron.add synthesize the wire format for the most common cases:
All four take the standard knobs: agentId?, model?, timeoutSeconds? (default 900), channel? + to?, deliveryMode? (announce | direct | none), instance?.
Tools
143 typed tools wrapping the 128 JSON-RPC methods the gateway publishes (and 2 standalone introspection tools). Run openclaw_introspect once paired to see the live list of methods + events on your specific gateway.
Introspection (no scopes required)
Setup (no scopes required)
Device & pairing (device.pair.*, device.token.*)
openclaw_device_status / openclaw_device_pair_list / _pair_approve / _pair_reject / _pair_remove / openclaw_device_token_revoke / _token_rotate. Manages your local Ed25519 identity and the per-gateway tokens it's been issued.
Coverage by domain (require operator.read / operator.write / operator.admin)
Tool names follow openclaw_<domain>_<method>. Method-name dots become underscores: cron.list → openclaw_cron_list, sessions.compaction.restore → openclaw_sessions_compaction_restore.
Destructive tools
These carry destructive side effects (data loss, service interruption, revoked access). Their description is marked accordingly so Claude Code's confirmation gate prompts before each call:
- Cron:
cron_remove,cron_run(real execution),cron_update - Sessions:
sessions_{abort,reset,delete,compaction_restore} - Agents:
agents_{delete,files_set} - Chat:
chat_abort - Channels:
channels_logout - Device:
device_{pair_remove,token_revoke,token_rotate} - Config:
config_{set,patch,apply} - Secrets:
secrets_resolve(returns secret material) - Doctor memory:
doctor_memory_{resetDreamDiary,resetGroundedShortTerm,repairDreamingArtifacts,backfillDreamDiary,dedupeDreamDiary} - Node:
node_{invoke,rename,pending_drain,pending_enqueue,pending_ack,pair_approve,pair_reject} - Skills:
skills_{install,update} - Approvals:
exec_approval_resolve,exec_approvals_{set,node_set},plugin_approval_resolve - Self-update:
update_run(gateway-wide, may interrupt sessions)
Examples
Copy-paste prompts you can drop into Claude after the MCP is paired. Each one targets the corresponding tool and shows the kind of natural-language phrasing that resolves to a concrete call.
Health & sanity
→ Calls openclaw_health, reports MCP version, gateway server version, paired device fingerprint, granted scopes, and how recently the last successful call ran.
→ Calls openclaw_introspect, returns the 128 JSON-RPC methods + 24 events the gateway publishes in its hello-ok.
Cron
→ openclaw_cron_list({ enabled: "all" }).
→ openclaw_cron_runs({ id: "<job-id>", limit: 5, compact: true }) — summaries truncated to 200 chars, each entry gets a runAtAgo: "3d ago" field.
→ Generates an openclaw_cron_add payload with the right schedule.kind: "cron", expr: "0 13 * * 5", tz: "Europe/Paris", and delivery.mode: "announce".
Sessions
→ openclaw_sessions_list({ limit: 10, sortBy: "updatedAt", sortDir: "desc" }).
→ openclaw_sessions_preview({ keys: ["agent:main:cron:<id>"] }) — returns role/text turns straight from the gateway.
Agents & channels
→ openclaw_agents_list.
→ openclaw_channels_status.
Escape hatch
→ Useful when a gateway-side method doesn't yet have a typed wrapper, or you want to inspect a feature still in beta.
Resilience
request() retries transient errors (network drop, ws close, timeout, DNS) with exponential backoff: defaults to 1s → 2s → 4s, max 4 attempts. Non-retryable errors (PAIRING_REQUIRED, INVALID, MISSING_SCOPE, etc.) fail fast — no point retrying a permission issue. Tune via:
OPENCLAW_RETRY_ATTEMPTS— total attempts (default4, range1–10)OPENCLAW_RETRY_BASE_MS— initial backoff in ms (default1000, range100–60000)OPENCLAW_DEBUG=1— prints every retry decision to stderr
When a request gives up, the thrown error carries gateway request '<method>' failed (attempt N/M): as a prefix and the original error is preserved as cause for inspection. GatewayError code / details / retryable flags are propagated through the wrap.
The client tracks lastSuccessAtMs for openclaw_health's lastSuccessAgo field — useful for "is the gateway still talking to me?" debug.
Diagnostic CLI
For one-shot health checks without wiring the MCP into a client:
Prints a JSON report (MCP version, gateway URL, paired state, scopes, server version, last-success age, error if any) and exits non-zero on failure. Handy in CI / scripts.
Schema looseness
Most v0.3.0 wrappers use z.passthrough() for params — they accept the documented fields plus anything else, and pass them through to the gateway. This trades strict client-side validation for forward-compat: as the gateway evolves, calls don't break on new fields. The downside is you'll only learn about a wrong field when the gateway rejects the request. If you hit a "missing required property" error, look at the gateway's response — it tells you the exact wire shape — and either correct your call, or open an issue / PR to tighten the wrapper's Zod schema.
Threat model
This MCP server exposes secret-bearing and side-effectful gateway operations (config.*, secrets.*, cron.run, sessions.send, agent, channel send) to an LLM that the operator drives via natural language. Treat that surface deliberately:
- The gateway token, device private key, and per-gateway device tokens are persisted under
${XDG_CONFIG_HOME:-~/.config}/openclaw-control-mcp/store.json(file mode0600). Since 0.8.0 the server never touches your OS keychain — nosecurity/secret-toolcall, no permission prompt. If you'd rather no secret was written to disk by the server at all, supply them via a.envfile instead (see Secrets & the.envfile). Never commit the store or the.env, and don't post--healthoutput unredacted. openclaw_secrets_setwrites into the gateway config tree viaconfig.patch. Any tool call that reaches this wrapper rotates the underlying secret in the gateway's view. Wrap it with explicit human confirmation in agent prompts.openclaw_callis an escape hatch — it forwards arbitrary JSON-RPC method calls. The gateway enforces per-scope permissions, but on the client side there's no input filter. Limit which tool catalogs your agent can see if untrusted prompts can reach it.OPENCLAW_DEVICE_PRIVATE_KEY/OPENCLAW_DEVICE_TOKENenv vars (for headless / CI / service-account usage) take priority over the store. Set them only in trusted execution contexts (GitHub secrets, K8s secrets, password manager exports, achmod 600.env— never in shell history, Docker--env, or a.envcommitted to a repo).- Prompt-injection surface: the gateway's responses (session previews, logs, agent outputs) feed back into the MCP client and can carry attacker-controlled content. Treat any tool output as untrusted when deciding whether to call destructive tools (the destructive list is published in §Destructive tools — confirm before chaining a write tool to a read tool output).
- HTTP transport surface: when running
--http, the server enforces a constant-timeBearercheck ifOPENCLAW_HTTP_BEARERis set, refuses to bind to a non-loopback interface without one, and emits a loud stderr warning if started on loopback without one. Rotate the bearer like a gateway admin token — anything that can read it can invoke every tool, includingsecrets.*writes. Terminate TLS at a reverse proxy before exposing the HTTP port to the network.
If you find a vulnerability, please open a private security advisory on GitHub rather than a public issue: https://github.com/smurfy92/openclaw-control-mcp/security/advisories/new.
Roadmap
- Auto-reconnect with exponential backoff — shipped in 0.3.1 (
client.request()retries with jitter; tunable viaOPENCLAW_RETRY_ATTEMPTS/OPENCLAW_RETRY_BASE_MSsince 0.4.0). - Stream session messages back into the MCP client (currently
sessions.subscriberegisters server-side but stdio can't surface deltas to Claude Code). - Tighten Zod schemas for the wrappers added in 0.3.0 — most use
passthrough()until the gateway shape for each domain is fully nailed down. PRs welcome. - Streamable HTTP transport in addition to stdio — shipped in 0.5.0 (
--http,http://127.0.0.1:3333/mcp), bearer-token auth added in 0.7.0 (OPENCLAW_HTTP_BEARER). See ADR-005. - Claude Desktop Extension (
.mcpb) packaging.
Migrating from openclaw-claw-mcp (early adopters)
If you used the wrapper under its previous name (openclaw-claw-mcp):
- The Store automatically reads
~/.config/openclaw-claw-mcp/store.jsonas a fallback when the new path is empty, so your paired device token keeps working. - On the next successful connect, the new path (
~/.config/openclaw-control-mcp/store.json) is created. You can then delete the old directory. - Update the entry name in
~/.claude.jsonfromopenclaw-clawtoopenclaw-control(purely cosmetic — only changes the tool prefixmcp__openclaw-control__*). - The local working dir / build output keeps the same path you cloned to; nothing else needs moving.
Troubleshooting
gateway request '…' failed: expected Uint8Array of length 32, got length=0— the persisteddevice.privateKeyis empty. On 0.8.0+ the usual cause is an upgrade from 0.5.0–0.7.0 where the key still sits in the OS keychain: runnpx -y openclaw-control-mcp --migrate-from-keychainonce. Otherwise recover withopenclaw_device_repair. Background:docs/troubleshooting/empty-private-key.md.gateway request '…' failed: device nonce mismatchafter some idle time — the WS connection went stale and the retry loop reuses a burned nonce. Workaround: re-callopenclaw_setupwith the same params (forces a fresh handshake). Details + proposed fixes:docs/troubleshooting/stale-connection-nonce-mismatch.md.
Caveats
- The protocol is reverse-engineered, not documented. Behaviour may change with gateway updates.
- The connect frame matches what
openclaw/openclaw/scripts/dev/gateway-smoke.tssends today (client.id: "openclaw-ios",mode: "ui", role + scopes per the iOS operator default). Differentclient.idvalues trigger different server policies —openclaw-control-uiandopenclaw-tuifor example require device identity and a secure-context origin. OPENCLAW_DEBUG=1logs every WS frame to stderr (truncated at 8 KB). Useful when comparing handshakes against the live Control panel SPA.
來源:README.md,提交 3f96a69
工具
0版本歷史
2- v0.8.3最新Oct 6, 2026
- v0.6.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Openclaw 整合
OpenClaw Direct
direct.openclaw官方發布者
一個遠端 MCP 端點,讓助理用自然語言部署、監控與管理 OpenClaw AI 助理。

OpenClaw MCP Ecosystem
由 GitHub 帳號 yedanyagamiai-cmd 發布
一個部署在 Cloudflare Workers 上的遠端端點,宣稱捆綁九個 MCP 伺服器,涵蓋安全掃描、知識圖譜、合規、金融、記憶、分析等。

Openclaw Upgrade Orchestrator Mcp
由 GitHub 帳號 temurkhan13 發布
一個本機 MCP 伺服器,用於 AI 執行環境升級安全,透過快照比對與指紋偵測供應商端的回歸問題。

Openclaw Skill Vetter Mcp
由 GitHub 帳號 temurkhan13 發布
一個本機 MCP 伺服器,讓助理審查第三方 AI 代理擴充套件,以及 AGENTS.md、.cursor/rules、CLAUDE.md 等代理設定檔。

Openclaw Output Vetter Mcp
由 GitHub 帳號 temurkhan13 發布
本機 MCP 伺服器,用來核對 AI 代理的說法是否屬實,提供內嵌依據檢查、例外被吞掉偵測與對話紀錄審查。