MCP authentication
Last reviewed against the app on 24 September 2026
The MCP server accepts two kinds of credential: an OAuth 2.1 access token, obtained through dynamic client registration, or a claribi_mcp_ API key. Both are sent as Authorization: Bearer ... on every request.
OAuth or API key
| OAuth 2.1 | MCP API key | |
|---|---|---|
| Setup | Automatic in clients that support MCP authorization | Paste into the client's config |
| Acts as | The user who approved the consent screen | The user who minted the key |
| Lifetime | Access token 1 hour, refresh token 30 days | No expiry; valid until revoked |
| Permissions | Chosen on the consent screen | A default set (see Scopes) |
| Revoke | A token or the whole client | The key |
Both need an organization on Trial, Starter, Professional or Enterprise with an active subscription.
API keys
Mint a key
- Sign in and open Settings > Developer, section MCP Server (LLM clients).
- Enter a name, for example "Claude Desktop", and click Mint MCP API key.
- Copy the key. It starts with
claribi_mcp_and is shown once; clariBI keeps only a hash.
Use it
For a client that takes a URL and headers:
{
"mcpServers": {
"claribi": {
"url": "https://claribi.com/mcp/v1/",
"headers": { "Authorization": "Bearer claribi_mcp_..." }
}
}
}Client-specific steps: Claude Desktop, Cursor. Behind the scenes clariBI exchanges the key for a short-lived internal token (15 minutes) and records calls against that token.
MCP keys only work with the MCP server; the REST API rejects them and uses its own keys.
Revoke it
Click Revoke next to the key in Settings > Developer. The next request with that key fails.
OAuth 2.1 with dynamic client registration
Clients discover the endpoints from the metadata documents:
| Endpoint | Standard |
|---|---|
GET /.well-known/oauth-authorization-server | RFC 8414 authorization server metadata |
GET /.well-known/oauth-protected-resource | RFC 9728 protected resource metadata (resource https://claribi.com/mcp/v1/) |
POST /mcp/v1/oauth/register | RFC 7591 dynamic client registration |
GET /mcp/v1/oauth/authorize | Authorization and consent |
POST /mcp/v1/oauth/token | Code exchange and refresh |
POST /mcp/v1/oauth/revoke | RFC 7009 revocation |
The metadata documents are also served under /mcp/v1/.well-known/.
Register a client
POST /mcp/v1/oauth/register
Content-Type: application/json
{
"client_name": "My agent",
"redirect_uris": ["https://agent.example.com/oauth/callback"],
"grant_types": ["authorization_code", "refresh_token"],
"response_types": ["code"],
"token_endpoint_auth_method": "none",
"scope": "dashboards:read reports:read analysis:run"
}The response contains a client_id (prefix claribi_mcp_cli_). A confidential client (any token_endpoint_auth_method other than none) also gets a client_secret, shown only in this response.
Authorization code flow
- Create a PKCE verifier and an S256 challenge. PKCE is required for public clients and only S256 is accepted.
- Send the user to
/mcp/v1/oauth/authorizewithresponse_type=code,client_id,redirect_uri,scope,state,code_challengeandcode_challenge_method=S256. - The user signs in to clariBI if needed, reviews the requested permissions and approves.
- clariBI redirects to
redirect_uriwithcodeand yourstate. The code is single-use and valid for 60 seconds. - Exchange it at
/mcp/v1/oauth/token:
POST /mcp/v1/oauth/token
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&code=...&redirect_uri=https://agent.example.com/oauth/callback
&client_id=claribi_mcp_cli_...&code_verifier=...{
"access_token": "claribi_mcp_tok_...",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "...",
"scope": "dashboards:read reports:read analysis:run"
}Refresh and revoke
Refresh with grant_type=refresh_token, your refresh_token and client_id. Each refresh revokes the old token and returns a new pair; refresh tokens expire after 30 days. To revoke, post a token to /mcp/v1/oauth/revoke, or revoke the token or the whole client in the Developer Portal's MCP tab.
Scopes
| Scope | Allows |
|---|---|
dashboards:read | List and view dashboards |
dashboards:write | Create and update dashboards (no tool uses it yet) |
reports:read | List and view reports |
reports:write | Generate reports |
data-sources:read | List data sources and read their columns |
data-sources:write | Upload data, load data from a URL, start OAuth connections |
analysis:run | Ask questions (uses AI credits) |
usage:read | Read credit usage and plan |
billing:read | Read subscription status |
billing:write | Create checkout links |
account:write | Update the account or organization profile (no tool uses it yet) |
forecasts:read | List forecasts and read results |
forecasts:write | Create forecasts |
forecasts:run | Run forecasts and rewrite their summaries (uses AI credits) |
Keys minted in Settings, and the key returned by signup from an assistant, get this default set: dashboards:read reports:read data-sources:read data-sources:write usage:read analysis:run forecasts:read. For other permissions (generating reports, creating or running forecasts, billing) connect with OAuth and grant them on the consent screen.
Rate limits
| What | Limit |
|---|---|
JSON-RPC requests to /mcp/v1/ | 600 per minute per IP address |
Account signups with register_account | 5 per hour per IP address, and one pending code per email at a time |
| Client registration | Rate-limited per IP address |
Over the limit, the server answers with HTTP 429 and JSON-RPC error -32003.
Security notes
- Keys, access tokens and client secrets are stored as SHA-256 hashes.
redirect_urimust match a registered URI exactly.- The organization's subscription is checked on every request: suspended or cancelled organizations are refused.
- If the person who minted a key is deactivated or leaves the organization, the key stops working.