Skip to content

Phase 3: OpenClaw-MCP server (openclaw.execute_task as MCP tool) #118

@hanwencheng

Description

@hanwencheng

Context

OpenClaw is the second runtime in M3 (Hermes #117 is the first). The thesis: "the same authority layer works across different agent runtimes" — proving this with two runtimes (Hermes + OpenClaw) plus Doubao (already in M2's #112) gives the 3+ runtime coverage that M3 requires per milestones-roadmap.md §4.

OpenClaw is a Tencent computer-use-style agent (similar shape to Anthropic's Computer Use + browser automation). Different runtime, different LLM provider (Hunyuan via Tencent Cloud), same AgentKeys authority surface. If both Hermes (US-centric LLM stack) and OpenClaw (CN-centric LLM stack) work through the same MCP server, the cross-vendor moat is real.

The integration pattern is set by #117 — this issue applies the same shape to OpenClaw.

Scope (M3)

Install OpenClaw

MCP server wrapping OpenClaw

Vendor opt-in

Out of scope (defer)

  • Tuning OpenClaw prompts per vendor (M4)
  • Streaming responses (M4)
  • Cross-runtime task continuation ("Hermes ran step 1; OpenClaw runs step 2") — M4 with delegation work
  • OpenClaw browser-automation features that need a sandboxed Chromium per actor (M4 if vendor demand surfaces)

Acceptance criteria

Risks

Risk Mitigation
OpenClaw commercial-use terms forbid redistribution Read terms BEFORE deploy; if forbidden, ship as "vendor brings their own OpenClaw deployment" (we provide the MCP wrapper only)
Tencent Cloud account requirements gate access Coordinate with Volcengine BD relationship if possible; if blocked, ship without OpenClaw and add Qwen-instruct or another CN-friendly runtime
OpenClaw's browser-automation features expand attack surface (computer-use agent + AgentKeys creds = risky combo) Per arch.md §3 trust boundaries: OpenClaw is a Task Host; it never holds long-lived AgentKeys creds, only short-lived cap-tokens with explicit per-action scope

References

Effort

~1 week (after #117 pattern is established). Sequencing:

  1. (Days 1-2) OpenClaw deploy + ToS verification + Tencent Cloud account
  2. (Days 2-4) MCP server wrapper (mostly copy Phase 3: Hermes-MCP server (hermes.execute_task as MCP tool) #117's adapter with OpenClaw-specific API calls)
  3. (Days 4-5) Vendor-portal opt-in toggle + per-actor runtime selection
  4. (Days 5-7) Cross-runtime integration test (same task, three runtimes, comparable results)

Pickup notes for the next agent / developer

  • Phase 3: Hermes-MCP server (hermes.execute_task as MCP tool) #117 ships first — wait for that pattern to be solid before starting here
  • The signature openclaw.execute_task(task, context, constraints) → {result, steps_taken, cost_usd, audit_trail_id} MUST match hermes.execute_task verbatim. Same shape; runtime is just an implementation detail behind the tool.
  • ToS check goes first. If the terms forbid redistribution, the path becomes "vendor brings own OpenClaw" — which is a different scope; raise the change before starting the wrapper.
  • Recursive composition (OpenClaw → AgentKeys MCP → S3) is the same pattern; reuse the auth context propagation from Phase 3: Hermes-MCP server (hermes.execute_task as MCP tool) #117
  • Watch for: OpenClaw's computer-use features make it tempting to give it broader cap-token scope than Hermes. Resist. Same Task Host trust model applies — short-lived per-action caps only.
  • Use the /agentkeys-issue-create skill for follow-up issues (e.g., per-runtime tuning, vendor-specific OpenClaw configs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/mcpMCP server, MCP tool integration, MCP protocol work

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions