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

Properties

callbackPort?

optional callbackPort?: number;
Defined in: client/auth.ts:130 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?

optional clientId?: string;
Defined in: client/auth.ts:116 Pre-registered client ID. When set, Dynamic Client Registration is skipped.

clientName?

optional clientName?: string;
Defined in: client/auth.ts:122 Client name used in Dynamic Client Registration. Default: “FastMCP Client”.

clientSecret?

optional clientSecret?: string;
Defined in: client/auth.ts:118 Pre-registered client secret.

onRedirect?

optional onRedirect?: (url) => void | Promise<void>;
Defined in: client/auth.ts:135 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?

optional scopes?: string | string[];
Defined in: client/auth.ts:120 Requested OAuth scopes (space-separated string or array).

store?

optional store?: KeyValueStore;
Defined in: client/auth.ts:124 Persistent key-value store for tokens, client info, and discovery state. Default: in-memory.