eve sends a bearer from a token provider and runs none of the MCP authorization flow itself

Kind: nuance · Status: current · Last verified: 2026-11-16 · Clients: eve · Revisions: 2026-07-28, 2025-11-25

@ai-sdk/mcp 2.0.99 has an OAuth client. It reads resource_metadata from WWW-Authenticate, fetches protected resource metadata and authorization server metadata, registers a client, and uses PKCE. All of it is driven by an authProvider on the transport. eve's #createClient passes fetch, headers, type and url, and no authProvider, so none of that code runs. eve's own fetch wrapper checks the status of a 401 and cancels the body. It does not read WWW-Authenticate.

The connection's auth is a token provider. With getToken alone, eve calls it and sends Authorization: Bearer <token>. With startAuthorization and completeAuthorization as well, eve runs an interactive sign-in: it suspends the turn on a webhook it owns and resumes when the provider completes. The documented provider is connect() from @vercel/connect/eve. @vercel/connect 2.9.2 requests tokens from Vercel Connect's API at /v1/connect/token/<connector>. Which OAuth features Vercel Connect uses towards the server's authorization server was not read.

Sign-in is lazy. When getToken throws ConnectionAuthorizationRequiredError, eve connects with no Authorization header and lists tools. Sign-in starts on an HTTP 401, or when a tools/call returns isError: true with a non-empty _meta["mcp/www_authenticate"]. The source comment names that key as the OpenAI Apps SDK convention. On a 401 to a request that carried a token, eve evicts the token, asks the provider again and retries once before it asks the user. A 403 is passed through.

eve's docs state what follows for servers. A server that leaves protected tools out of an anonymous tools/list never triggers sign-in, because the model cannot find those tools.

Headers are resolved for every request. A headers map can hold static values, promises or callbacks that receive the session context. An Authorization key in headers is rejected when auth is also set.

Sources