Skip to main content
The Vero MCP Server uses OAuth 2.0 Authorization Code flow with Auth0 as the identity provider. MCP clients that support OAuth handle this automatically — users just log in when prompted.

How authentication works

1

Client requests /mcp

The MCP client sends an initial request to /mcp without a token. The server responds with 401 Unauthorized and a WWW-Authenticate header containing a link to the protected resource metadata.
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer realm="mcp", resource_metadata="https://mcp.veroreceipts.com/.well-known/oauth-protected-resource"
2

Client discovers OAuth metadata

The client fetches the protected resource metadata (RFC 9728), which points to the authorization server. It then fetches the authorization server metadata (RFC 8414) to learn the OAuth endpoints.
3

Dynamic client registration

The client registers itself via the /oauth/register endpoint (RFC 7591) and receives a client_id.
4

User authorizes

The client redirects the user to /oauth/authorize, which proxies to Auth0’s authorization endpoint. The user logs in (or signs up) and grants access. Auth0 redirects back with an authorization code.
5

Token exchange

The client sends the authorization code to /oauth/token, which proxies to Auth0’s token endpoint and injects the client secret. The client receives an access token.
6

Authenticated requests

All subsequent requests to /mcp include the access token as a Bearer token. The server validates it and forwards it to the Vero API.

OAuth endpoints

The server implements the following OAuth-related endpoints:
EndpointRFCPurpose
/.well-known/oauth-protected-resourceRFC 9728Protected Resource Metadata — tells the client where to find the authorization server
/.well-known/oauth-authorization-serverRFC 8414Authorization Server Metadata — lists supported endpoints, scopes, and grant types
/oauth/registerRFC 7591Dynamic Client Registration — returns the pre-configured client_id
/oauth/authorizeAuthorization proxy — injects OIDC scopes and redirects to Auth0
/oauth/callbackCallback proxy — forwards the authorization code to the MCP client
/oauth/tokenToken proxy — injects the client secret and forwards to Auth0

Token validation

The server supports two token validation strategies depending on configuration:

Scopes

The server requests the following OAuth scopes during authorization:
ScopePurpose
openidRequired for OIDC — enables ID token issuance
profileAccess to user’s name and nickname
emailAccess to user’s email address
offline_accessEnables refresh tokens for long-lived sessions

Token flow through the system

Once authenticated, the user’s Bearer token flows through the entire system:
MCP Client
  │ Bearer token

Vero MCP Server ──validates──▶ Auth0 (JWKS or /userinfo)
  │ Same Bearer token

Vero API (plaid-wrapper) ──validates──▶ Auth0


Plaid / Gmail / OCR services
The MCP server does not mint its own tokens. It validates the Auth0 token and passes it through to the Vero API, which performs its own independent validation.

PKCE support

The authorization server metadata advertises support for S256 code challenge method (PKCE). MCP clients that implement PKCE will use it automatically for added security during the authorization code exchange.