@FrontMcp({ ... }). This page shows the minimal config and then every top-level option you can use. Deep dives live in the pages listed under Servers.
Minimal server
info.name(string)info.version(string)apps(at least one app)
Full configuration (at a glance)
Composition mode
FrontMCP can host many apps. Choose how they’re exposed:-
Multi-App (default):
splitByApp: falseOne server scope. You may configure server-levelauthand all apps inherit it (apps can still override with app-level auth). -
Split-By-App:
splitByApp: trueEach app is isolated under its own scope/base path (for example/billing). Streamable HTTP, the/messageSSE endpoint, and OAuth issuers reuse that scope automatically. Server-levelauthis disallowed; configure auth per app. (See Authentication → Overview.)
HTTP transport
- Port: listening port for Streamable HTTP.
- entryPath: your MCP JSON-RPC entry (
''or'/mcp'). Must align with discovery. - hostFactory: advanced — provide/construct a custom host implementation.
- Split-by-app scopes: when
splitByAppis enabled, clients hit<entryPath>/<appId>(for example/mcp/billing) and subscribe via<entryPath>/<appId>/message; FrontMCP handles the prefixing.
Transport
New in v0.6: Transport configuration has moved from
auth.transport and session to a dedicated top-level transport property. This separates transport/session lifecycle concerns from authentication. See Migration below.transport config controls session lifecycle, protocol switches, and session persistence. Configure it at the server level or per-app when using splitByApp: true.
Session Lifecycle
Protocol Switches
Choose which MCP transports to enable based on your deployment:Session Persistence
Enable Redis-backed session persistence for distributed deployments or session recovery:Session persistence uses the top-level
redis config. Configure redis once and reference it from both transport.persistence and auth.tokenStorage.splitByApp: true. Sensitive apps stay stream-only with strict session IDs, while demo or health-check apps can enable stateful/stateless HTTP for easier automation.
Redis
New in v0.6: Redis configuration has moved to a dedicated top-level
redis property, shared by both transport.persistence and auth.tokenStorage.Usage with Features
Theredis config is automatically used by:
- Session persistence (
transport.persistence) — stores session state for recovery - Token storage (
auth.tokenStorage: { type: 'redis' }) — stores refresh tokens securely
Migration from auth.transport
FrontMCP automatically migrates old configs at runtime with a deprecation warning. Update your config manually to remove the warning:
Migration Mapping
Logging
Use custom log transports for shipping logs to external systems; console remains on by default.
Global providers
GLOBAL, SESSION, REQUEST).
Authentication (server level)
Server-levelauth sets the default auth for all apps (unless splitByApp: true, where auth must be per-app).
Remote OAuth (encapsulated external IdP)
Local OAuth (built-in AS)
Apps can also define their own
auth (and mark themselves standalone) to expose an isolated auth surface — useful
when mixing public and private apps under one server.Bootstrapping & discovery
- Version safety: on boot, FrontMCP checks that all
@frontmcp/*packages are aligned and throws a clear “version mismatch” error otherwise.
Common starting points
- Single app, default everything: minimal sample above.
- Multiple apps, shared auth: omit
splitByApp, set server-levelauth. - Isolated apps with per-app auth: set
splitByApp: true, configureauthin each app.
Best Practices
Do:- Start with minimal config and add options as needed
- Use
splitByApp: truefor multi-tenant deployments - Use top-level
transportconfig (notauth.transportorsession) - Configure
redisat top-level for shared use across features - Use
statefulsession mode with Redis for production deployments - Enable
persistencefor distributed or high-availability setups - Set log level to
Infoor higher in production
- Configure server-level
authwhen usingsplitByApp: true - Use deprecated
auth.transportorsession— migrate totransport - Disable
serveunless you’re managing bootstrap manually - Use
statelesssession mode with short-lived upstream tokens - Enable
enableStatelessHttpin production without trust boundaries - Leave
enableConsole: truein containerized production (use transports)
Next up: learn how to structure Apps, Tools, Resources, and Prompts in the Core Components section.