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

# What is the MCP credentials page?

> How to enable the opt-in MCP credentials page to mint long-lived RS512-signed JWT bearer tokens for MCP clients, including token lifetime configuration, token generation, and security considerations.

> [!NOTE]
>
> ### Atoti Intelligence SDK
>
> This is part of the Atoti Intelligence SDK offer.

The MCP credentials page, available from Atoti Server 6.2.0, is a built-in browser interface that mints long-lived JWT bearer tokens for use with MCP clients.
Instead of embedding a username and password in every MCP client configuration, a signed-in user generates a token once. The user then pastes the token into the client.
The MCP credentials page is opt-in and disabled by default.

## Prerequisites

Before the MCP credentials page is available, ensure the following conditions are met:

* The Atoti application has a valid AI license
* The `starter-ai-mcp-server` dependency is included in the project
* The `atoti.mcp.credentials.enabled` property is set to `true` (see [How to enable the credentials page](#how-to-enable-the-credentials-page))

## How to enable the credentials page

The credentials page is disabled by default.

> [!WARNING]
>
> Enable this feature deliberately. The page allows any authenticated Atoti user to mint long-lived tokens. Review access controls before enabling in production environments.

To enable the credentials page, add the following to the application configuration:

```yaml theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
atoti:
  mcp:
    credentials:
      enabled: true
```

The equivalent environment variable is `ATOTI_MCP_CREDENTIALS_ENABLED=true`.

When this property is absent or set to `false`, no beans for the credentials page load and the `/mcp-credentials/**` path is not handled.

## What optional configuration is available?

The following property controls the maximum token lifetime a user can request:

| Property | Type | Default | Description |
| - | - | - | - |
| `atoti.mcp.credentials.max-lifetime` | Duration | `P365D` | Upper bound on the requested expiration date. Requests beyond this limit return `400 Bad Request`. |

Example — restrict token lifetime to 30 days:

```yaml theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
atoti:
  mcp:
    credentials:
      max-lifetime: P30D
```

## How to generate a token

The MCP credentials page is available at `/mcp-credentials` once the property is enabled.

If the session is not authenticated, Spring Security redirects to `/login/index.html?redirectUrl=/mcp-credentials`. It returns to the credentials page after a successful login.

To generate a token:

1. Navigate to `/mcp-credentials` in a browser while signed in to the Atoti application.
2. Select an expiration preset: **7 days**, **30 days**, **60 days**, **90 days**, **1 year**, or **Custom date**.
3. For a custom date, select a date within the configured maximum lifetime.
4. Click **Generate token**.
5. Copy the displayed token immediately.

> [!WARNING]
>
> Atoti does not store the token after it is displayed. If the token is lost, generate a new one.

## How to use the token with an MCP client

Pass the token as a bearer authorization header in the MCP client configuration.

The following example shows how to configure Claude Desktop with a bearer token. Replace `9090` with the application port and `<jwt>` with the generated token:

> [!NOTE]
>
> This example uses the Streamable HTTP transport at `POST /mcp`, which the starter configures by
> default. The older server-sent events transport at `/sse` is deprecated for removal in Spring AI
> 2.0.0. See [MCP transport](https://docs.activeviam.com/atoti-intelligence/6.2/developer-guide/mcp-server/setup/configure-oauth2-self-issued.md#which-mcp-transport-does-self-issued-mode-use).

```json theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
{
  "mcpServers": {
    "my-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://localhost:9090/mcp",
        "--transport",
        "http-only",
        "--header",
        "Authorization: Bearer <jwt>"
      ]
    }
  }
}
```

The same bearer token can be used in any MCP-compatible client that accepts custom HTTP headers.

## What the token contains

The token is a standard RS512-signed JWT. It contains the following claims:

| Claim | Description |
| - | - |
| `sub` | The authenticated user's username |
| `iss` | `activeviam` |
| `iat` | Issued-at timestamp |
| `nbf` | Not-before timestamp |
| `exp` | Expiration timestamp matching the selected date |
| `jti` | Unique token identifier |
| `authorities` | The user's roles at the time of minting |

## What are the security considerations?

* **Tokens are not persisted.** The server does not store tokens after issuing them. There is no server-side revocation list.
* **Expiration is the only revocation mechanism.** If a token needs to be invalidated before its expiration date, the only option is to rotate the RSA key used to sign tokens. Rotating the key invalidates all existing tokens.
* **Losing a token is not recoverable.** Generate a new token from the credentials page.
* **Token authorities are fixed at mint time.** If the user's roles change after the token is minted, the token still carries the original authorities until it expires.
* **The page is opt-in.** It is disabled by default to follow the principle of least privilege.

## Related reading

* [How the Atoti MCP Server works](https://docs.activeviam.com/atoti-intelligence/6.2/developer-guide/mcp-server/setup/how-it-works.md) for the endpoint, the license tier, and how a client authenticates
* [How to connect with Claude](https://docs.activeviam.com/atoti-intelligence/6.2/developer-guide/mcp-server/setup/connect-with-claude.md) for Claude Desktop configuration examples
* [How to connect with Postman](https://docs.activeviam.com/atoti-intelligence/6.2/developer-guide/mcp-server/setup/connect-with-postman.md) for testing with Postman
