> ## 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.

# ClientCredentials

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

An auth provider that acquires a token asynchronously and injects it as a
request header per request. ClientCredentials, [JwtBearerAuth](/api/client/classes/JwtBearerAuth),
and [EnterpriseManagedAuth](/api/client/classes/EnterpriseManagedAuth) all implement it. The transport recognizes
these by their `kind` discriminant and injects `getHeaders()` on every
request via a custom fetch wrapper (unlike static `BearerAuth`, whose header
never changes, or interactive `OAuth`, which the SDK transport drives itself).

## Implements

* [`AsyncHeaderAuth`](/api/client/interfaces/AsyncHeaderAuth)

## Constructors

### Constructor

```ts theme={null}
new ClientCredentials(options): ClientCredentials;
```

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

#### Parameters

##### options

[`ClientCredentialsOptions`](/api/client/type-aliases/ClientCredentialsOptions)

#### Returns

`ClientCredentials`

## Properties

### kind

```ts theme={null}
readonly kind: "client_credentials";
```

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

#### Implementation of

[`AsyncHeaderAuth`](/api/client/interfaces/AsyncHeaderAuth).[`kind`](/api/client/interfaces/AsyncHeaderAuth#kind)

## Methods

### getHeaders()

```ts theme={null}
getHeaders(): Promise<Record<string, string>>;
```

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

#### Returns

`Promise`\<`Record`\<`string`, `string`>>

#### Implementation of

[`AsyncHeaderAuth`](/api/client/interfaces/AsyncHeaderAuth).[`getHeaders`](/api/client/interfaces/AsyncHeaderAuth#getheaders)
