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.
Creating an MCP connection
Section titled “Creating an MCP connection”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,
gatedonly). - Maximum share lifetime: Upper bound on link expiry.
Revoking a connection immediately invalidates its bearer token or OAuth grants.
Option 1: OAuth (recommended for interactive clients)
Section titled “Option 1: OAuth (recommended for interactive clients)”- In Settings → Developers, create a new MCP connection and choose OAuth.
- Copy its connection URL:
<app_url>/mcp/<connection-id>. - 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. - Sign in as the connection owner and approve access.
OAuth security details
Section titled “OAuth security details”- 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
resourceduring 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.
Option 2: Bearer token
Section titled “Option 2: Bearer token”Choose Bearer when creating the MCP connection for headless scripts or clients without OAuth support, and send:
Authorization: Bearer <token>to <app_url>/mcp.