Skip to main content
Defined in: client/auth.ts:146

Properties

callbackPort?

Defined in: client/auth.ts:162 Port for the local OAuth callback server. Default: 8765. The port must be consistent across calls because it is registered as the redirect_uri during Dynamic Client Registration.

clientId?

Defined in: client/auth.ts:148 Pre-registered client ID. When set, Dynamic Client Registration is skipped.

clientMetadataUrl?

Defined in: client/auth.ts:177 Client ID Metadata Document URL (SEP-991 / CIMD) — an HTTPS URL, with a non-root path, that serves this client’s metadata document. When the authorization server advertises client_id_metadata_document_supported, the SDK’s auth() orchestrator uses this URL directly as the client_id and skips Dynamic Client Registration entirely. Falls back to normal DCR (or clientId, if set) when the server doesn’t support CIMD. Validated eagerly in the constructor.

clientName?

Defined in: client/auth.ts:154 Client name used in Dynamic Client Registration. Default: “FastMCP Client”.

clientSecret?

Defined in: client/auth.ts:150 Pre-registered client secret.

onRedirect?

Defined in: client/auth.ts:167 Override how the authorization URL is opened. When not provided the system browser is launched. Inject a no-op or mock here for testing.

Parameters

url
URL

Returns

void | Promise<void>

scopes?

Defined in: client/auth.ts:152 Requested OAuth scopes (space-separated string or array).

store?

Defined in: client/auth.ts:156 Persistent key-value store for tokens, client info, and discovery state. Default: in-memory.