Class Definition
Properties
Factory Methods
bootstrap(options)
Create and start an HTTP server.createHandler(options)
Create a serverless handler without starting a server.createFetchHandler(options)
Create a Web-standardfetch handler, (request: Request) => Promise<Response>, for runtimes without Node req/res: Cloudflare Workers, Deno and Bun.
@FrontMcp(). A server the startup checks refuse (an approval or featureFlag field no installed plugin enforces, authorities without the authorities option, a missing secret) rejects here, as with createDirect(). On an edge isolate (Cloudflare Workers, Vercel Edge, Deno) the instance is built on the first request instead, because isolates forbid timers and I/O at module evaluation: the checks the config’s metadata settles still reject here, and a failed build is answered, never thrown: a configuration fault (a missing secret, a startup check, a config the schema refuses) with a 500 { "error": "server_misconfigured", "code", "message" } body, anything else (a remote that refused the connection, a package that failed to load) with a 503 { "error": "server_unavailable", "code": "SERVER_START_FAILED" } body and Retry-After. A failed build is kept until a retry delay passes (1 s, doubling up to 60 s); the first request after it builds again. Requests run through the same http:request flow as the Express host, with the same request context: the user agent, x-frontmcp-* headers, traceparent and the MCP 2026-07-28 _meta client info.
info.remoteAddr, Bun’s server.requestIP(request), or, only on Cloudflare Workers, the CF-Connecting-IP header.
The handler is stateless: session-based (2025-06-18) clients get no Mcp-Session-Id and every request stands alone. See Cloudflare Worker for stateful sessions with Durable Objects.
createDirect(options)
Create a DirectMcpServer for programmatic access.createForGraph(options)
Create an instance for introspection without starting server.runStdio(optionsOrClass)
Run the server over stdio (stdin/stdout JSON-RPC). No HTTP/TCP port is bound — the HTTP server is disabled for this entry point.@FrontMcp-decorated class or the same config object you pass to @FrontMcp().
Instance Methods
getConfig()
Get the server configuration.getScopes()
Get all initialized scopes.getPrimaryScope()
Get the scope that holds the server’s own apps.createDirect, createFetchHandler, runStdio and connect() serve
this scope.
standalone app, such as DashboardApp, gets a scope of its own that comes first in getScopes(), so the first
scope is not always the server’s. When no app shares the server’s scope (every app is standalone, or splitByApp),
this is the first scope.
Up to 1.8.2, those entry points served the first scope: with
DashboardApp in apps they served the dashboard’s
tools instead of the server’s.start()
Start the HTTP server (called internally by bootstrap).Initialization Sequence
Usage Examples
Development Server
Serverless (Vercel)
Testing
Claude Desktop Integration
Related
@FrontMcp
Server decorator
Scope
Registry access
DirectClient
Programmatic access
Deployment
Deployment guides