Skip to main content

MCP Server Authorization

Model Context Protocol (MCP) is the protocol AI applications (Claude, ChatGPT, Cursor and similar hosts) use to discover and call external tools. MCP servers expose tools; MCP clients invoke them. When an MCP server exposes sensitive resources, it needs authorization to ensure only permitted clients and users can access it.

LumoAuth's role is to authorize those tool calls: register MCP servers as protected resources, configure scopes, and let LumoAuth serve as the OAuth 2.0 authorization server while AI applications act as OAuth clients.

Specifications implemented

This implementation follows the MCP Authorization specification, revision 2025-11-25, including OAuth 2.1, protected resource metadata (the discovery document an MCP server publishes so clients can find its authorization server), resource indicators (the resource parameter that pins a token to one server), the authorization-server discovery document, the issuer identifier in the authorization response (iss), and Client ID Metadata Documents (a client identifies itself with a URL to a metadata file instead of registering first) — the spec's preferred client registration mechanism. It also covers the accepted spec enhancements: SEP-835 (default scopes advertised in the 401 challenge), SEP-837 (application_type validation in dynamic client registration), SEP-2350 (incremental scope consent on step-up), SEP-2351 (standardized well-known URI suffix), and SEP-2352 (registration-credential-to-issuer binding).

Architecture​

Key concepts​

Roles​

RoleDescriptionIn LumoAuth
Authorization ServerIssues access tokens and handles user authenticationLumoAuth serves this role
Resource Server (MCP Server)Hosts tools, resources, and prompts; validates Bearer tokensYour registered MCP server
Client (MCP Client)AI application that connects to MCP servers on behalf of usersRegistered as an OAuth client in LumoAuth

Standards implemented​

StandardPurpose
OAuth 2.1Core authorization framework with security best practices
Protected resource metadataHow MCP clients discover the authorization server for an MCP server
Resource indicatorsBinding tokens to a specific MCP server audience
Discovery documentDiscovering LumoAuth's endpoints
Dynamic client registrationMCP clients can register themselves through the API
Issuer identifier in the responseThe iss parameter on the redirect back, which prevents mix-up attacks
Client ID metadata documentsURL-based client identity, preferred by MCP 2025-11-25

The exact specifications are listed in Standards used on this page.

Quickstart​

To secure an MCP server with LumoAuth:

  1. Register your MCP server in the Organization Portal under AI Agents → MCP servers (click Register MCP server).
  2. Configure your MCP server to return 401 Unauthorized with a WWW-Authenticate header pointing to LumoAuth's Protected Resource Metadata.
  3. Validate tokens using LumoAuth's token introspection endpoint, verifying that the aud claim matches your server's Resource URI.

The MCP servers page in the portal, with the Register MCP server button and three registered servers

API endpoints​

GET /orgs/{orgId}/api/v1/.well-known/oauth-protected-resource/mcp/{serverId} — protected resource metadata for a specific MCP server. View details →

GET /orgs/{orgId}/api/v1/.well-known/oauth-protected-resource — root-level Protected Resource Metadata for the organization's MCP servers. View details →

GET /orgs/{orgId}/api/v1/mcp/servers — list all active MCP servers for an organization. The caller needs the settings.manage permission; an API key additionally needs the mcp:read scope. View details →

GET /orgs/{orgId}/api/v1/mcp/servers/{serverId} — details of a specific MCP server including discovery URLs. View details →

GET / POST /orgs/{orgId}/api/v1/mcp/{serverId}/challenge — test the 401 challenge flow. Returns the WWW-Authenticate header for unauthenticated requests. View details →

Standards used on this page​

Plain nameStandard
Protected resource metadataRFC 9728
Resource indicatorsRFC 8707
Discovery documentRFC 8414
Issuer identifier in the responseRFC 9207
Client ID metadata documentsOAuth Client ID Metadata Document (draft)
Dynamic client registrationRFC 7591
Model Context Protocol (MCP) authorizationMCP Authorization specification

See the standards reference for what each one covers and how LumoAuth uses it.