Skip to content

MCP & OAuth

Sendcrate ships a built-in Model Context Protocol (MCP) server over Streamable HTTP (JSON-RPC) at /mcp. Connected clients can list buckets and objects, create share links within the connection’s configured guardrails, and revoke links.

Create connections in Settings → Developers. Each connection defines hard boundaries enforced by the server regardless of what the client requests:

  • Bucket scope: All org buckets or an explicit subset.
  • Allowed delivery modes: Restrict which modes the agent can mint (for example, gated only).
  • Maximum share lifetime: Upper bound on link expiry.

Revoking a connection immediately invalidates its bearer token or OAuth grants.

Section titled “Option 1: OAuth (recommended for interactive clients)”
  1. In Settings → Developers, create a new MCP connection and choose OAuth.
  2. Copy its connection URL: <app_url>/mcp/<connection-id>.
  3. Paste the URL into your MCP client. The client automatically discovers the authorization server via /.well-known/oauth-protected-resource/mcp/* and /.well-known/oauth-authorization-server, registers dynamically, and opens a browser approval page.
  4. Sign in as the connection owner and approve access.
  • Uses Authorization Code flow with S256 PKCE and exact registered redirect URIs (HTTPS, or HTTP loopback for local clients).
  • Public clients (token_endpoint_auth_method: none) are supported via dynamic registration.
  • Clients must send the connection URL as resource during authorization and token exchange; issued tokens are bound to that connection’s MCP endpoint.
  • Access tokens expire after 1 hour. Refresh tokens rotate on every use and expire 30 days after approval; reusing a rotated refresh token invalidates the entire grant.

Choose Bearer when creating the MCP connection for headless scripts or clients without OAuth support, and send:

Authorization: Bearer <token>

to <app_url>/mcp.