mandate0
MCP

Connect over MCP

Use Streamable HTTP with OAuth or a scoped credential.

The endpoint is /api/mcp on the platform. It supports Streamable HTTP. A plain browser GET is not a complete MCP handshake.

OAuth

  1. Add the platform's /api/mcp URL to a compatible remote HTTP MCP client.
  2. Start authentication. The client discovers authorization metadata from the server's 401 challenge.
  3. Sign into mandate0 in the browser.
  4. Review the client name, return address, scopes and environment. A self-registered client name is unverified.
  5. Leave Sandbox selected for the first connection and approve.
  6. Return to the client, list tools, and call a read tool such as m0_list_merchants.

Clients supporting dynamic registration can register as public clients without a shared secret. The authorization-code flow requires PKCE S256. See client setup.

Static credentials

Programmatic clients can send Authorization: Bearer <key> or X-Api-Key: <key>. Use an appropriate developer key, agent credential or server-issued MCP key. Store values in a process environment or secret manager.

An agent credential binds the actual agent identity. The advisory X-Agent-Id header does not grant authority.

Scopes and environments

OAuth starts in sandbox. Live access requires readiness and a deliberate approval. Refresh preserves the granted mode. A client requesting no scopes receives a read-only baseline; writes and spending need explicit scopes and may still require owner-approved authority or confirmation.

Respect rate-limit and quota signals, including Retry-After. Rotating credentials to evade limits is not supported.

Errors

Let an MCP SDK initialize, negotiate and maintain its session. Check transport failures and the tool result's isError flag: a successful HTTP exchange can still carry a refused operation. An expired token needs refresh or reconnection; missing permission needs a corrected grant.

On this page