FASTMCP_ prefix. Settings are loaded from environment variables and from a .env file.
.env file is loaded by setting the FASTMCP_ENV_FILE environment variable (defaults to .env). Because this controls which file is loaded, it must be set as an environment variable — it cannot be set inside a .env file itself.
Logging
Transport & HTTP
These control how the server listens when running with an HTTP transport.Error Handling
Client
CLI & Display
Telemetry
Tasks (Docket)
Task settings (theFASTMCP_DOCKET_ variables) moved to the optional fastmcp-tasks package. See server tasks for configuration.
Security
These control FastMCP’s SSRF protection for the outbound fetches it makes during authentication (OAuth client metadata and JWKS).
By default, FastMCP protects its OAuth and JWKS fetches against SSRF by resolving the target hostname, rejecting any address that maps to a private, loopback, link-local, or reserved IP, and then pinning the connection to that validated IP.
This breaks when a corporate
CONNECT proxy is the only egress path: the container often cannot resolve external DNS at all (only the proxy can), and even when it can, pinning to the IP makes TLS verification fail because public certificates list hostnames, not IP addresses.
Set FASTMCP_SSRF_TRUST_PROXY=true when a trusted proxy is your mandated egress. FastMCP then skips DNS resolution and the IP blocklist entirely and makes a single request to the hostname URL, explicitly routed through the proxy named by the standard HTTPS_PROXY / ALL_PROXY environment variables (checked in that order). The HTTPS-only and hostname checks still apply.

