Skip to main content
Defined in: server/FastMCP.ts:227

Properties

health?

Defined in: server/FastMCP.ts:255 Health endpoint on the HTTP listener run() starts — for Kubernetes liveness/readiness probes and load-balancer checks. Off unless supplied: true (or any object) enables it with defaults path: '/healthz', status: 200, body: 'ok' (text/plain); enabled: false (or false) forces it off. Served before MCP auth, CORS, and the DNS-rebinding guards, so probes need no credentials and may send a pod-IP Host header. Sugar over customRoute() — registering your own route on the same path is a startup error. Ignored on stdio (a malformed value still aborts startup, like stateless) and never served through fetch().

host?

Defined in: server/FastMCP.ts:230

path?

Defined in: server/FastMCP.ts:231

port?

Defined in: server/FastMCP.ts:229

stateless?

Defined in: server/FastMCP.ts:243 Serve the legacy (2025-era) HTTP transport statelessly: a fresh server and transport per request, no session registry, incoming mcp-session-id ignored, and no session id issued. Use this behind a load balancer or on serverless compute where consecutive requests reach different instances. Falls back to the FASTMCP_STATELESS_HTTP environment variable, then to false. A valid value is ignored for the stdio transport, but a malformed one still aborts stdio startup, deliberately. The modern (2026-07-28) era is already stateless and is unaffected.

stdin?

Defined in: server/FastMCP.ts:257 Custom stdin stream for the stdio transport. Defaults to process.stdin.

stdout?

Defined in: server/FastMCP.ts:259 Custom stdout stream for the stdio transport. Defaults to process.stdout.

transport?

Defined in: server/FastMCP.ts:228