Governing agents over MCP

July 26, 2026 · View on GitHub

Any MCP host can talk to DashClaw — zero SDK code. Two transports, one tool surface:

TransportForHow
stdioClaude Code, Codex, any local MCP clientnpx @dashclaw/mcp-server
Streamable HTTPClaude Desktop / claude.ai (custom connector), Claude Managed Agents, any remote MCP clientevery DashClaw instance serves MCP at /api/mcp — no package install

Honesty first: bare MCP is a cooperative surface. The tools return guard decisions; the model is guided (by the dashclaw-governance skill) to call dashclaw_guard before acting and to honor the answer, but MCP structurally cannot wrap tools it doesn't own, so there is no mechanical backstop for the host's other tools. If you need mechanical blocking, pair MCP with Claude Code hooks or route the side-effect through a registered capability (dashclaw_invoke — DashClaw executes that itself, so a block means the call never happens). Per-surface table: enforcement boundary.

stdio setup

{
  "mcpServers": {
    "dashclaw": {
      "command": "npx",
      "args": ["@dashclaw/mcp-server"],
      "env": {
        "DASHCLAW_URL": "https://your-dashclaw.example.com",
        "DASHCLAW_API_KEY": "oc_live_xxx"
      }
    }
  }
}

Required: DASHCLAW_URL + DASHCLAW_API_KEY. Optional: DASHCLAW_AGENT_ID (defaults per host). No org id is needed — the API key resolves the org. Tuning knobs (timeouts, retries, DASHCLAW_GUARD_UNAVAILABLE_POLICY for fail-open/fail-closed behavior when the instance is unreachable) are in the server README.

One caveat: Claude Desktop chat cannot run local stdio MCP servers reliably (its bundled Node crashes them) — Desktop uses the OAuth connector below instead.

Claude Desktop / claude.ai: the OAuth connector

Settings → Connectors → paste https://<your-instance>/api/mcp. OAuth auto-discovers — no key in the UI — and tool calls attribute to the claude-desktop agent identity. Full walkthrough incl. troubleshooting: CLAUDE-DESKTOP-PLUGIN.md.

Claude Managed Agents

agent = client.beta.agents.create(
    name="Governed Agent",
    model="claude-sonnet-4-6",
    tools=[{"type": "agent_toolset_20260401"}],
    mcp_servers=[{
        "type": "url",
        "url": "https://your-dashclaw.example.com/api/mcp",
        "headers": {"x-api-key": "oc_live_xxx"},
        "name": "dashclaw"
    }],
)

A working example lives in examples/managed-agent-mcp/.

What the tools are

The server exposes 17 governance tools across 5 groups — core governance (dashclaw_guard, dashclaw_record, dashclaw_wait_for_approval, dashclaw_invoke, dashclaw_capabilities_list, dashclaw_policies_list, and session lifecycle), retrospection (dashclaw_assumption_record, dashclaw_decisions_recent), agent identity (dashclaw_pair), team tasks (dashclaw_task_create, dashclaw_task_event, dashclaw_task_update), and plans (dashclaw_plan_submit, dashclaw_plan_status) — plus 3 read-only resources (dashclaw://policies, dashclaw://agent/{agent_id}/history, dashclaw://status). The complete tool-by-tool table is mcp-server/README.md.

The local stdio server additionally registers three DashClaw-gated tools (dashclaw_status, dashclaw_recent_decisions, export_dashclaw_evidence), which gate on the same DASHCLAW_URL + DASHCLAW_API_KEY credentials as the governance set. See mcp-server/README.md.

Teach the model the protocol

Wiring tools in is half the job; the model also needs to know when to call guard and how to behave on each verdict. That is the dashclaw-governance skill — drop it into your host's skills directory (bundled automatically with the coding-agent plugins, or copy from public/downloads/dashclaw-governance/). It teaches the decision tree, the approval-wait protocol, and session lifecycle.

Verify

From a connected host, ask the agent to run dashclaw_guard with a low-risk test intent, then check /decisions on your instance — the evaluation lands as the newest row, attributed to the host's agent identity. If the tools are missing entirely, see troubleshooting.