Skip to main content

Overview

Methods

getPrimary()

Get the primary auth provider.
Example:

getAuthProviders()

Get all auth provider entries.
Example:

Auth Modes

FrontMCP supports four authentication modes:

Public

mode: 'public' — no authentication

Transparent

mode: 'transparent' — pass-through tokens validated against upstream JWKS

Local

mode: 'local' — built-in OAuth 2.1 authorization server

Remote

mode: 'remote' — OAuth 2.1 server proxying to an upstream IdP
See the Authentication overview for full mode semantics. The registry exposes requiresOrchestration (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 extend ExecutionContextBase expose two auth surfaces:

Configuration Validation

The registry validates auth configuration:

FrontMcpAuth API

The primary auth provider is an abstract base class:
For request-scoped role/permission/scope checks, use 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

The FrontMcpAuthContext 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:
Custom fields are populated by 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.