@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. Server-levelauthis disallowed; configure auth per app. (See Authentication → Overview.)
If you’re offering multiple products or tenants,
splitByApp: true gives clean separation and per-app auth.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.
Sessions & Transport IDs
-
sessionMode (default
'stateless'): -
'stateless'→ session data is carried in a signed/encrypted JWT. Simple, client-portable; no token refresh of nested providers. -
'stateful'→ server-side store (e.g., Redis). Minimal JWTs, safer for nested tokens, supports refresh. -
transportIdMode (default
'uuid'): -
'uuid'→ per-node, strict transport identity. -
'jwt'→ signed transport IDs for distributed setups; ties into session verification.
You can supply functions for
sessionMode / transportIdMode to decide per issuer.Logging
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
serve(default true): when true, importing the decorated class boots the server via@frontmcp/core.- Version safety: on boot, FrontMCP checks that all
@frontmcp/*packages are aligned and throws a clear “version mismatch” error otherwise.
If you disable
serve, you’re responsible for calling the core bootstrap yourself.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.