Skip to main content
FrontMCP’s four authentication modes address different deployment scenarios. Understanding when to use each mode is critical for both security and developer experience.

Mode Overview

The auth.mode literal accepts one of four values: 'public', 'transparent', 'local', 'remote'.

Mode Comparison


Public Mode

No authentication required. All requests receive an anonymous session.

How It Works

Configuration Options

Use Cases

Development

Rapid prototyping without auth setup overhead

Public APIs

Endpoints that don’t require user identity
Do NOT use public mode when you need:
  • User identity tracking
  • Audit trails
  • Access control per user
  • Compliance requirements

Transparent Mode

Pass-through tokens from an external identity provider. FrontMCP validates tokens but doesn’t issue them.

How It Works

Configuration Options

Claim validation

A valid signature only proves the IdP’s key signed the token — not that the token was minted for this server. Because every service behind the same IdP shares the same signing keys, FrontMCP enforces two claims on top of the signature:
  • Issuer (iss) — must equal provider (matched with or without a trailing slash) or one of providerConfig.additionalIssuers. Enabled by default. This stops a token minted by the same IdP for a different issuer from being replayed here.
  • Audience (aud) — if the token carries an aud, it must match expectedAudience (or the derived resource URL). This stops a token issued for service A from being replayed against service B. Tokens with no aud claim are accepted for IdP compatibility; set expectedAudience and issue audience-bound tokens for the strictest posture.
providerConfig.verifyIssuer: false disables issuer validation entirely. Any token signed by a key in the provider JWKS is then accepted regardless of its iss. Only use it for a trusted gateway that re-mints tokens under an issuer you cannot enumerate with additionalIssuers, and always pair it with a strict expectedAudience. Whenever the issuer set is known, prefer additionalIssuers over disabling the check.

Provider Examples

Use Cases

Existing IdP Integration

Your organization already uses Auth0, Okta, or similar

Single Provider

All users authenticate through one identity provider
Do NOT use transparent mode when you need:
  • Multiple identity providers
  • Progressive authorization (add apps over time)
  • Server-side token storage with silent refresh
  • Custom token claims

Local Mode

FrontMCP acts as a full OAuth 2.1 authorization server with a built-in login form. Self-contained auth server with built-in user management.
Local mode signs the tokens it issues with HS256 using the JWT_SECRET environment variable (no RSA/EC key pair). See Local OAuth for token signing, persistent tokenStorage (memory / sqlite / redis), the requireEmail / anonymousSubject single-operator options, and tunnel/issuer configuration. Local mode also orchestrates multiple upstream OAuth providers out of the box. Declare a providers array (GitHub, Slack, Jira, …) and FrontMCP federates them at /oauth/authorize, refuses to mint a JWT until federatedAuth.minProviders (default 1) are linked, stores each provider’s tokens encrypted server-side, and exposes them to tools via this.orchestration.getToken(id):
See Multi-Provider Orchestration for the full provider schema, the minProviders / requiredProviders gate, and the this.orchestration tool API.
The built-in login page accepts any email format without validation and is intended for development. Replace with a real identity provider for production use.

Remote Mode

FrontMCP acts as an OAuth 2.1 authorization server that proxies user authentication to an upstream IdP. End users never submit credentials to FrontMCP directly — they’re redirected to the upstream IdP, and FrontMCP exchanges the resulting upstream code/tokens before issuing its own session token to the MCP client.

How It Works

Configuration Options

When consent.enabled is true, the local flow renders an interactive tool-selection screen after login and enforces the selection at call time: the chosen tool ids are embedded in the token’s consent claim and a tools/call to an unselected tool is rejected with TOOL_NOT_CONSENTED (JSON-RPC -32003). The flags groupByApp, showDescriptions, allowSelectAll, requireSelection, customMessage, excludedTools, and defaultSelectedTools are all honored. See Local OAuth → Consent for the full table.
Tokens minted without consent (consent disabled, or created via the test/programmatic factory) carry no consent claim and are unaffected — all tools remain callable. rememberConsent (default true) persists each user’s per-client selection and reuses it on the next login, re-prompting only when a NEW tool appears; set it false to always re-show the screen.

Incremental Authorization

Federated Authentication Configuration

Configure how multi-provider (federated) authentication is gated and validated.

OAuth Endpoints

Local and remote modes expose standard OAuth endpoints:

Use Cases

Multi-Provider Federation

Combine multiple IdPs under one session (Slack + GitHub + custom)

Progressive Authorization

Users authorize apps incrementally as needed

Full Token Control

Custom token lifetimes, scopes, and refresh behavior

Tool-Authorization Enforcement

Gate tools via the interactive consent picker (shipped) and enforce the selection at call time
Do NOT use local or remote mode when:
  • You only have one IdP and don’t need federation (use transparent instead)
  • You want to minimize auth complexity
  • Running multiple instances without Redis

Mode Selection Flowchart


Security Comparison


Token Verification Flow


Next Steps

Remote OAuth

Configure upstream IdP integration

Local OAuth

Set up self-contained authentication

Progressive Authorization

Implement incremental app authorization

Production Deployment

Security checklist for production