API reference: MCP sign-in
6 endpoints of the MCP sign-in group.
Protected Resource Metadata of the MCP server (RFC 9728)
GET/.well-known/oauth-protected-resource/mcp No API key
The MCP server answers a request without a token with 401 and WWW-Authenticate with resource_metadata pointing here. mcp.sendtide.ch serves it at /.well-known/oauth-protected-resource.
Example
curl "https://api.sendtide.ch/.well-known/oauth-protected-resource/mcp" Responses
| Status | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | Metadata Response fields
|
Authorization server metadata (RFC 8414)
GET/.well-known/oauth-authorization-server No API key
Example
curl "https://api.sendtide.ch/.well-known/oauth-authorization-server" Responses
| Status | Description |
|---|---|
200 | Metadata with the endpoints, code_challenge_methods_supported [S256], grant types authorization_code and refresh_token |
Register a client (Dynamic Client Registration, RFC 7591)
POST/oauth/register No API key
Open to anyone, at most 20 registrations per client address and hour. Redirect URIs are https, http to localhost, 127.0.0.1 or [::1] (any port at use), or a private-use scheme of a native app; never a fragment. A client with token_endpoint_auth_method none proves itself with PKCE only; client_secret_post and client_secret_basic get a secret.
Request body application/json
| Field | Type | Description |
|---|---|---|
redirect_uris * | array<string> | |
client_name | string | |
client_uri | string | |
token_endpoint_auth_method | enum: none | client_secret_post | client_secret_basic | |
grant_types | array<enum: authorization_code | refresh_token> | |
response_types | array<enum: code> |
Example
curl -X POST "https://api.sendtide.ch/oauth/register" \
-H "Content-Type: application/json" \
-d '{"redirect_uris":["string"]}' Responses
| Status | Description |
|---|---|
201 | Registered |
400 | invalid_redirect_uri or invalid_client_metadata |
429 | Too many registrations |
Start the sign-in (authorization code with PKCE)
GET/oauth/authorize No API key
Opened in the browser. An unknown client or redirect URI shows an error page. Otherwise errors go back to the redirect URI with error, state and iss; a valid request goes to the dashboard, where the user picks the account, the access (read, send, full) and whether real mail may be delivered (off by default: test mode), and comes back with code, state and iss. The code is valid once, for 60 seconds.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
response_type * | query | enum: code | |
client_id * | query | string | |
redirect_uri | query | string | |
state * | query | string | |
code_challenge * | query | string | |
code_challenge_method * | query | enum: S256 | |
resource | query | string | RFC 8707: the URL of the MCP server, e.g. https://mcp.sendtide.ch |
scope | query | string | A suggestion for the consent page (read |
Example
curl "https://api.sendtide.ch/oauth/authorize?response_type=code&client_id=…&state=…&code_challenge=…&code_challenge_method=S256" Responses
| Status | Description |
|---|---|
302 | To the dashboard or back to the client |
400 | Error page |
Exchange a code or a refresh token
POST/oauth/token No API key
authorization_code needs code, redirect_uri, code_verifier and client_id; refresh_token needs refresh_token and client_id. Access tokens are valid one hour. Each refresh gives a new refresh token; using an old one again revokes the whole grant. A used code presented again revokes what it gave. resource, when sent, must be the MCP server.
Request body application/x-www-form-urlencoded
| Field | Type | Description |
|---|---|---|
grant_type * | enum: authorization_code | refresh_token | |
code | string | |
redirect_uri | string | |
code_verifier | string | |
refresh_token | string | |
client_id | string | |
client_secret | string | |
resource | string | |
scope | string |
Example
curl -X POST "https://api.sendtide.ch/oauth/token" \
-d token=… Responses
| Status | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | Tokens Response fields
| |||||||||||||||
400 | invalid_grant | |||||||||||||||
401 | invalid_client |
Revoke a token (RFC 7009)
POST/oauth/revoke No API key
Revoking either token of a grant ends the whole grant. Answers 200 also for unknown tokens.
Request body application/x-www-form-urlencoded
| Field | Type | Description |
|---|---|---|
token * | string | |
token_type_hint | string | |
client_id | string | |
client_secret | string |
Example
curl -X POST "https://api.sendtide.ch/oauth/revoke" \
-d token=… Responses
| Status | Description |
|---|---|
200 | Revoked (or unknown) |
401 | invalid_client |