How a remote MCP server handles OAuth: what MCP clients actually check
A team running a reviews API behind a remote MCP server, letting clients like Claude, Cursor and VS Code read and reply to reviews across 84 platforms, describes how it made connections work without a pasted API key. Clients discover the login flow by calling the server unauthenticated and reading the 401 response's WWW-Authenticate header, which must be exposed to browsers via CORS. The team deliberately kept the MCP endpoint closed, publishing its tool list as a static server card instead, since a 200 on the first call would make clients skip OAuth. Client registration is stateless: client IDs are HMAC-signed registrations, and authorization codes are encrypted, five-minute, single-use PKCE grants. Access tokens appear as named API keys that users can revoke to disconnect a client, and redirect URIs are validated against a strict allowlist of schemes and hosts.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in