Server configuration

Covers FrontMCP 1.12.2 as of

This section covers a FrontMCP server as a whole: how apps combine into one server, including apps loaded from npm or another MCP server, where settings come from, the MCP revisions it speaks, background tasks, logging and tracing, and the request flows hooks attach to. Read it once a server has more than one app or is about to run somewhere other than your machine; @FrontMcp and @App list each option, and these pages show how the options work together. Start with Apps, discovery and splitting.

@FrontMcp({
  info,
  apps: [HelpDeskApp, App.esm(specifier, options?), App.remote(url, options?)], // your apps, a package's, another server's
  splitByApp?, logging?, observability?, metrics?, health?,
  tasks?, transport?: { defaultProtocolVersion? },                             // background tasks; requests that name no MCP revision
  plugins: [ConfigPlugin.init({ schema, loadYaml: true })],                     // your own settings, as this.config
})

Composing a server

PageCovers
Apps, discovery and splittingHow a server is built from apps, what clients see and discover, what happens when two apps use the same name, and how standalone and splitByApp give apps endpoints and auth of their own
Loading apps from npm (ESM)App.esm(): a package's tools, resources and prompts, loaded from npm when the server starts and run in your server's process
Remote serversApp.remote(): another MCP server mounted as an app, so its tools, resources and prompts appear on your server and calls are forwarded to it

Settings and environment

PageCovers
Configuration filesEvery place a server takes settings from: the @FrontMcp options, the environment variables FrontMCP reads, .env and YAML files through ConfigPlugin, and the frontmcp.config file the CLI reads, and which one wins
Environment awarenessavailableWhen, which offers a tool, resource or prompt only on some runtimes, platforms or deployments, and this.runtimeContext, which branches on where the server runs

Talking to clients

PageCovers
Protocol versionsThe MCP revisions the server speaks on one endpoint, from 2024-11-05 to 2026-07-28, how it picks one for each request, and what 2026-07-28 changed
Background tasksSlow tools that run as MCP tasks: the client gets a task id at once, polls it for the result, answers the tool's questions, and can cancel it

Watching it run

PageCovers
LoggingThe server's own log: levels, where lines go, custom transports, request tags, and the line that matches an error ID
Observability and telemetryOpenTelemetry traces for every request, your own spans and counters, /metrics, and health checks

Inside a request

PageCovers
Flows and stagesThe named flows every request runs through, each a fixed plan of stages, the state each stage sets, how flows nest in one request, and how to write your own

Which page for which task

You want toRead
Split one product into areas, like tickets and billingComposition patterns
Fix two apps that use the same tool nameHandling name clashes
Give one app its own URL and its own authGiving an app its own endpoint
Serve another MCP server's tools next to your ownMounting a remote server
Add tools that a team published to npmLoading a package
Give the server settings of your own, read with this.configReading your own settings
Keep those settings' defaults in a YAML fileKeeping defaults in a YAML file
Look up an environment variable FrontMCP readsEnvironment variables
See which MCP revisions the server speaksAsking which revisions a server speaks
Serve clients that send plain JSON-RPC, with no protocol versionServing requests that name no revision
Let a slow tool answer at once and finish in the backgroundLetting a tool run as a task
Offer a tool only on Node, or only in productionOffering a tool only where it works
Find the log line for an error ID a user reportedFinding the line for an error ID
Send the log somewhere other than the consoleWriting a transport
Follow a request across services with OpenTelemetryFollowing a request across services
Count things and serve them to PrometheusCounting things
Pick the stage a hook should attach toStages of the request flows

Report a docs issue · Report a security concern privately