Overview
Methods
getPrimary()
Get the primary auth provider.getAuthProviders()
Get all auth provider entries.Auth Modes
FrontMCP supports four authentication modes:Public
mode: 'public' — no authenticationTransparent
mode: 'transparent' — pass-through tokens validated against upstream JWKSLocal
mode: 'local' — built-in OAuth 2.1 authorization serverRemote
mode: 'remote' — OAuth 2.1 server proxying to an upstream IdPrequiresOrchestration (true for local/remote) so adapters know whether to mount OAuth routes.
Properties
requiresOrchestration
Whether the current configuration requires orchestration.detection
Auth provider detection result across apps in scope.Auth Provider Detection
The registry detects auth requirements across the scope hierarchy:Auth in Context Classes
Context classes that extendExecutionContextBase expose two auth surfaces:
Configuration Validation
The registry validates auth configuration:FrontMcpAuth API
The primary auth provider is an abstract base class:this.auth (a
FrontMcpAuthContext) inside execution contexts — see the section below.
Session Integration
Auth integrates with session management:Multi-App Auth
When multiple apps have different auth requirements:FrontMcpAuthContext
TheFrontMcpAuthContext is a request-scoped auth identity object available inside tool, resource, and prompt execution. It provides role, permission, and scope checks extracted from JWT claims.
Properties
Methods
Extension
Add custom typed fields via global interface augmentation:AuthContextPipe functions registered in your server config.
FrontMcpAuthContext vs Authorization:
FrontMcpAuthContext is request-scoped and provides roles, permissions, and scopes from JWT claims. The Authorization interface is transport-scoped and tracks authorized tools, prompts, apps, and provider tokens. Use FrontMcpAuthContext for role/permission checks; use Authorization for tool/app access control.