Skip to content

Authentication

Headless MCP supports two authentication options. Both options use a bearer token.

The Headless MCP server does not support static API keys. Every token is short-lived.

The MCP server adds no extra permissions. The client sees only the data that its identity can access in the DataPlatform.

Warning

The permissions of the signed-in user or the API client determine which tools can be used and which data is in scope. Some tools require further permissions. To change the permissions, see View and Edit User for users and API Client for API clients. Data that the tools return is usually processed by the AI model and its provider. Make sure that this complies with your AI policy.

Option Suited for Identity Browser required Token renewal
Interactive User Login AI applications used by a human Signed-in user yes Client refreshes the token
API Client Token Agents and services without a user interface API Client no Client requests a new token

Interactive User Login

Use this option for AI applications with a custom remote connector that a human operates. The user signs in with their own account.

The MCP client of your application must support these standards:

  • OAuth 2.1 with the Authorization Code flow
  • Proof Key for Code Exchange (PKCE)
  • Dynamic Client Registration (DCR)

The client must follow the MCP Authorization specification, version 2026-07-28. MCP SDKs and MCP client libraries typically support it.

The user must sign in with a browser to authenticate. The permissions of the signed-in user determine which data the client, and therefore the AI model, can access.

The client sends the header Authorization: Bearer <token> with each request and refreshes the token.

To connect, add a custom remote connector in the AI application:

  1. Enter the URL of the MCP server. The URL must include /mcp.
  2. Sign in with your DataPlatform account in the browser window that opens.

API Client Token

Use this option for agents and backend services that run without a user interface and without a human who can sign in.

  1. Create an API Client and note the client_id and client_secret.
  2. Request a token from the DataPlatform API with the OAuth 2.0 Client Credentials flow: send client_id and client_secret to the endpoint POST /auth/token. For the request format, see the token endpoint documentation.
  3. Send the header Authorization: Bearer <token> with each request to the MCP server.

The permissions of the API client decide which data the client can access.

Renew the Token

The token has a limited lifetime and there is no refresh token. The client must request a new token before the token expires, or after an HTTP 401 response with the error invalid_token.