OAuth 2.1 Flow
You do not need this page to use Hype Doc from an AI tool. It is for people building an MCP client or debugging a failed sign-in.
The /mcp endpoint accepts OAuth access tokens only. API tokens work on the REST API but are rejected here.
Discovery
Section titled “Discovery”An unauthenticated request to https://app.myhypedoc.com/mcp returns 401 with a pointer to the resource metadata:
HTTP/1.1 401 UnauthorizedWWW-Authenticate: Bearer resource_metadata="https://app.myhypedoc.com/.well-known/oauth-protected-resource"Two documents describe the rest:
GET https://app.myhypedoc.com/.well-known/oauth-protected-resourceGET https://app.myhypedoc.com/.well-known/oauth-authorization-serverThe authorization server document lists these endpoints:
| Purpose | Path |
|---|---|
| Client registration | POST /oauth/register |
| Authorization | GET /oauth/authorize |
| Token | POST /oauth/token |
| Revocation | POST /oauth/revoke |
What is supported
Section titled “What is supported”| Grant types | authorization_code, refresh_token |
| PKCE | Required, S256 only |
| Client authentication | None. All clients are public. |
| Scopes | read, write. If a client sends none, it gets both. |
| Access token lifetime | 1 hour |
| Redirect URIs | https anywhere, or http on localhost, 127.0.0.1, or ::1. No fragments. |
Clients register themselves. There is no client secret and no manual setup.
- The client registers with
POST /oauth/register, sendingredirect_urisand an optionalclient_name. The response contains aclient_id. - The client sends the user to
/oauth/authorizewith theclient_id,redirect_uri,response_type=code, acode_challenge, andcode_challenge_method=S256. - The user signs in to Hype Doc if needed and approves the request on the consent page.
- Hype Doc redirects back to the client with a
code. - The client calls
POST /oauth/tokenwith the code and the PKCE verifier. It receives an access token and a refresh token. - The client sends
Authorization: Bearer <access token>on every/mcprequest. - When the access token expires, the client calls
/oauth/tokenwithgrant_type=refresh_token. Each refresh returns a new refresh token.
Scopes
Section titled “Scopes”| Scope | Allows |
|---|---|
read | list_wins, list_spaces, list_tags |
write | log_win, create_space, export_wins |
Without write, a call to a write tool returns 403 with Insufficient scope. The 'write' scope is required for this tool. Initialization and tools/list still work.
Transport
Section titled “Transport”/mcp is a stateless Streamable HTTP endpoint. Each request stands alone, responses are plain JSON, and there is no session to resume. Request bodies are limited to 1 MB.
Revoke access
Section titled “Revoke access”Users can disconnect an app at any time from Connected apps in the web app’s Settings. Clients can also call POST /oauth/revoke.
Limits
Section titled “Limits”| Endpoint | Limit |
|---|---|
POST /oauth/register | 5 per minute per IP |
GET /oauth/authorize | 30 per minute per IP |
POST /oauth/token | 20 per minute per IP |
/mcp | 60 per minute per token |
See Rate Limits for the 429 response format.