{
  "type": "agent-onboarding",
  "version": "1.0",
  "updated": "2026-12-02",
  "description": "How an AI agent gets access to a Trusteed MCP store, phase by phase: which endpoint, which credential, which scopes, which quota, how requests are signed and how access is revoked. Derived from the protected-resource metadata, the registration block, agent-policy.json and the published rate limits; this document adds no rule of its own.",
  "canonical_scope": "Access to the MCP endpoints /{storeSlug}/mcp/{discovery|customer|checkout}. Not the REST agent API (/api/v1/agent/*), which uses an API key.",
  "related_documents": {
    "protected_resource_metadata": "https://trusteed.xyz/.well-known/oauth-protected-resource/{storeSlug}/mcp",
    "auth_md": "https://trusteed.xyz/auth.md",
    "agent_policy": "https://trusteed.xyz/.well-known/agent-policy.json",
    "checkout_guide": "https://trusteed.xyz/.well-known/agent-checkout-guide.lite.json",
    "rate_limits_reference": "https://trusteed.xyz/.well-known/agent-policy.json#rateLimits"
  },
  "phases": [
    {
      "phase": "1_discover",
      "endpoint": "https://trusteed.xyz/{storeSlug}/mcp/discovery",
      "auth_mode": "anonymous",
      "credential": "none",
      "scopes_required": [],
      "quota": {
        "bucket": "discovery",
        "per_minute": 1000,
        "scope": "IP"
      }
    },
    {
      "phase": "2_try_on_demo",
      "endpoint": "https://trusteed.xyz/demo-store/mcp/checkout",
      "auth_mode": "sandbox_key",
      "credential": "agnt_sandbox_ key in Authorization: Bearer or X-Agent-Api-Key",
      "scopes_required": [],
      "obtain": {
        "tool": "create_sandbox_key",
        "rest": "https://api.trusteed.xyz/api/v1/sandbox/key",
        "lifetime_hours": 24,
        "keys_per_ip_per_day": 25,
        "payments": "simulated"
      },
      "quota": {
        "bucket": "checkout",
        "per_minute": 60,
        "scope": "agent"
      }
    },
    {
      "phase": "3_customer_reads",
      "endpoint": "https://trusteed.xyz/{storeSlug}/mcp/customer",
      "auth_mode": "oauth_customer",
      "credential": "OAuth 2.1 Bearer token bound to the customer",
      "scopes_required": null,
      "quota": {
        "bucket": "customer",
        "per_minute": 200,
        "scope": "customer"
      }
    },
    {
      "phase": "4_merchant_checkout",
      "endpoint": "https://trusteed.xyz/{storeSlug}/mcp/checkout",
      "auth_mode": "agentic_trust",
      "credential": "OAuth 2.1 Bearer token with agent client identity",
      "scopes_required": [
        "mcp:checkout"
      ],
      "quota": {
        "bucket": "checkout",
        "per_minute": 60,
        "scope": "agent",
        "also": "1500/min per agent across buckets"
      }
    }
  ],
  "registration": {
    "register_uri": "https://trusteed.xyz/register",
    "dynamic_client_registration_rfc7591": "https://auth.trusteed.xyz/oidc/register",
    "identity_types_supported": [
      "oauth2-client-credentials"
    ],
    "credential_types_supported": [
      "client_secret",
      "private_key_jwt"
    ],
    "authorization_server": "https://auth.trusteed.xyz/",
    "token_endpoint": "https://auth.trusteed.xyz/oauth/token",
    "grant_types": [
      "client_credentials"
    ]
  },
  "scopes": {
    "mcp:read": {
      "description": "Read store data, product catalog, merchant profile",
      "grants_permissions": [
        "read"
      ]
    },
    "mcp:write": {
      "description": "Write operations (cart, session management)",
      "grants_permissions": [
        "read",
        "write"
      ]
    },
    "mcp:search": {
      "description": "Product search and discovery",
      "grants_permissions": [
        "read",
        "search"
      ]
    },
    "mcp:checkout": {
      "description": "Checkout flow — create cart, apply discount, complete checkout",
      "grants_permissions": [
        "read",
        "write",
        "checkout"
      ]
    }
  },
  "scopes_note": "The authoritative scope list is scopes_supported of each resource's protected-resource metadata. The authorization server's own discovery document does not enumerate these API scopes: they are defined on the resource, not as OpenID scopes, so a client must read them from the resource metadata.",
  "quota": {
    "note": "Quotas attach to the bucket and its scope (ip, customer, agent), not to the OAuth scope. The tightest layer answers first.",
    "layers": "Limits stack and the tightest one answers first. API-wide: 500 requests per 15 minutes per IP (governs sustained traffic; X-RateLimit-* report the tightest layer). Per bucket: discovery 1000/min per IP, customer 200/min per customer, checkout 60/min per agent; 1500/min per agent across buckets.",
    "global_per_ip": {
      "limit": 500,
      "window": "15 minutes"
    }
  },
  "request_signing": {
    "standard": "RFC 9421 HTTP Message Signatures",
    "required": false,
    "mode": "block_spoofed",
    "note": "Optional. A signature that fails verification is rejected; an unsigned request is not rejected for that reason. It identifies the agent, it is not an authorization by itself."
  },
  "revocation": {
    "oauth_tokens": "https://auth.trusteed.xyz/oauth/revoke",
    "standard": "RFC 7009",
    "sandbox_key": "Nothing to revoke: it expires on its own after 24 hours."
  }
}