Cloud Gateway & MCPTools MCP (runtime)

Tools MCP — where the agent acts

The Tools MCP is the Cloud Gateway’s runtime endpoint. An MCP-native agent connects here and calls tools; each call is authorized by the gate and executed with a vaulted credential the agent never sees.

  • URL: https://gw.regentprotocol.org/gw/mcp
  • Auth (every request): Authorization: Bearer <control key> + X-Agent-Id: <agent id>
  • Protocol: JSON-RPC 2.0 (initialize, tools/list, tools/call)

Client config

{
  "mcpServers": {
    "regent-gateway": {
      "url": "https://gw.regentprotocol.org/gw/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_CONTROL_KEY",
        "X-Agent-Id": "YOUR_AGENT_ID"
      }
    }
  }
}

The control key comes from create_control_key (Admin MCP); the agent id from create_agent.

Calling a tool

tools/list returns exactly the tools in your catalog (see the Tool Catalog), plus the built-in pay tool. Each tools/call runs the full enforcement flow: gate → inject the vaulted credential → call the provider.

{
  "method": "tools/call",
  "params": {
    "name": "stripe",
    "arguments": {
      "method": "POST",
      "path": "v1/payment_intents",
      "body": { "amount": 500, "currency": "usd" },
      "intent": "pay the supplier invoice"
    }
  }
}

Arguments: method (default GET), path, body?, intent? (recorded in the audit), user_token? (OIDC id_token when acting for a person), facts? (verified facts for policy).

Prefer plain HTTP? The same tools are at https://gw.regentprotocol.org/gw/{tool}/{path} with the same two headers.

The built-in pay tool

Every agent gets a built-in pay tool — a payment from the agent’s Custodian custody wallet (a second rail alongside API tools). It’s gated the same way and KMS co-signed by Regent.

{ "name": "pay",
  "arguments": { "to_address": "0x…", "amount": 5, "mandate_id": "…",
                 "intent": "supplier payout" } }

Returns pending (submitted, settles via webhook), denied, or escalated. Requires an active wallet + a spend mandate. See Custody and the Wallets page in the dashboard.

What every call is checked against

The same gate decision runs on API tools and custody payments:

CheckBlocks when
Identitythe X-Agent-Id isn’t a registered, active agent
Mandatea money tool exceeds its per-tx / daily / monthly limit
Cedar policyyour rule forbids it — by tool, action, resource (recipient), amount, role
Guardianbehavioral risk is too high (can escalate)

Everything fails closed: no gate, no vaulted key, or a policy deny → the provider is never called. A deny is a normal, readable outcome (the agent sees the code + reason).

Per-agent tool control & modes

  • Disable a tool for one agent — in the dashboard, the agent’s page has a per-tool on/off switch. A disabled tool disappears from that agent’s tools/list and any call returns TOOL_DISABLED_FOR_AGENT.
  • Enforcement modeenforce (a deny blocks) vs observe (shadow: records what it would block but lets the call run). Check the mode before a live demo.