> ## Documentation Index
> Fetch the complete documentation index at: https://fastmcp-ts.docs.prefect.io/llms.txt
> Use this file to discover all available pages before exploring further.

# OAuthOptions

Defined in: [client/auth.ts:146](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/client/auth.ts#L146)

## Properties

### callbackPort?

```ts theme={null}
optional callbackPort?: number;
```

Defined in: [client/auth.ts:162](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/client/auth.ts#L162)

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?

```ts theme={null}
optional clientId?: string;
```

Defined in: [client/auth.ts:148](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/client/auth.ts#L148)

Pre-registered client ID. When set, Dynamic Client Registration is skipped.

***

### clientMetadataUrl?

```ts theme={null}
optional clientMetadataUrl?: string;
```

Defined in: [client/auth.ts:177](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/client/auth.ts#L177)

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?

```ts theme={null}
optional clientName?: string;
```

Defined in: [client/auth.ts:154](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/client/auth.ts#L154)

Client name used in Dynamic Client Registration. Default: "FastMCP Client".

***

### clientSecret?

```ts theme={null}
optional clientSecret?: string;
```

Defined in: [client/auth.ts:150](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/client/auth.ts#L150)

Pre-registered client secret.

***

### onRedirect?

```ts theme={null}
optional onRedirect?: (url) => void | Promise<void>;
```

Defined in: [client/auth.ts:167](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/client/auth.ts#L167)

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?

```ts theme={null}
optional scopes?: string | string[];
```

Defined in: [client/auth.ts:152](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/client/auth.ts#L152)

Requested OAuth scopes (space-separated string or array).

***

### store?

```ts theme={null}
optional store?: KeyValueStore;
```

Defined in: [client/auth.ts:156](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/client/auth.ts#L156)

Persistent key-value store for tokens, client info, and discovery state. Default: in-memory.
