Area: Best Practices
Sub-Area: MCP Server Authentication, Authorization, and Rate Limiting
Applies to: Cloud
Issue
You want many people or agents to use the DataHub Cloud managed MCP server from AI clients such as Claude, Cursor, ChatGPT, Snowflake or Databricks. You need to know how each user should authenticate, and what limits apply to MCP tool calls.
Don't use one shared access token for everyone. Every request then runs as that one identity. Each user's own DataHub permissions no longer apply, and you can't tell who did what.
You Might Be Asking
- What is the recommended way to authenticate many users to the DataHub MCP server?
- Should I create one personal access token per user, or is there a better approach?
- Does the managed MCP server support OAuth, and how does that differ from a token?
- What should I use for unattended jobs and agents?
- Are there token limits or rate limits on MCP tool calls?
- Can I keep the MCP server read only?
Solution
1. Interactive users: OAuth (recommended)
On DataHub Cloud v1.0.2 and later, the managed MCP server supports OAuth2 with Dynamic Client Registration (DCR). See Connecting to Managed MCP Server with OAuth.
- Point your MCP client at
https://mcp.datahub.com/mcp. On first connection, enter your DataHub domain (for example<tenant>forhttps://<tenant>.acryl.io). You can also use your tenant URL directly:https://<tenant>.acryl.io/mcp. - You don't enter a client ID, a client secret or OAuth endpoints. The client finds the authorization server, registers itself and opens a browser login.
- Each user signs in with their own DataHub login, including SSO through the identity provider set up for your tenant.
- Tokens belong to the signed-in user and refresh automatically. MCP tools run with that user's DataHub permissions.
For example, with Claude Code:
claude mcp add --transport http datahub https://mcp.datahub.com/mcp
The MCP feature guide has setup steps for Claude, Claude Code, Cursor, ChatGPT, Snowflake and Databricks. Databricks needs your tenant URL (https://<tenant>.acryl.io/mcp), not mcp.datahub.com.
2. When to use access tokens instead
Use a token when OAuth doesn't fit. See When to Use PAT Auth Instead:
- Service accounts and unattended workflows (CI/CD, scheduled jobs, autonomous agents).
- DataHub Cloud versions before v1.0.2.
- MCP clients that don't support OAuth for remote MCP servers.
For a person, each user creates their own personal access token under Settings > Access Tokens. They need the Generate Personal Access Tokens or Manage All Access Tokens privilege. The managed server then runs each request with the caller's own token, so tools see only what that user can see in DataHub.
Connect to https://<tenant>.acryl.io/mcp and send the token in the Authorization header:
Authorization: Bearer <token>
Don't put the token in the URL. A request with a ?token= query parameter gets 400 Bad Request. If your client can't set headers, use mcp-remote with --header, as the MCP guide shows.
For unattended jobs and agents, use a service account, not a person's token. Create it under Settings > Users & Groups > Service Accounts, generate a token for it, and use that token in the MCP connection. See Service Accounts for Agentic Workflows. You can also set a Default View on the service account. All MCP searches with its token are then limited to that view.
3. BigQuery plugin for Ask DataHub
The BigQuery plugin belongs to Ask DataHub Plugins, which is a private beta. It isn't part of the MCP server that external AI clients connect to. After an admin creates the plugin, each user goes to Settings > My AI Settings, finds the BigQuery plugin and clicks Connect. Each user signs in with their own Google account, and BigQuery IAM controls what data they can query. See the BigQuery Plugin guide.
4. Usage limits
-
Response size: By default the server caps each MCP tool response at about 80,000 tokens. When results would go over that, it returns fewer results. Schema fields are capped at about 16,000 tokens per entity, and the server leaves out fields past that budget. To stay under these caps, use the
searchtool's filters and pagination, and uselist_schema_fieldswith a keyword filter for wide tables. -
HTTP 429: When a rate limit or write throttle applies, DataHub's API returns HTTP
429with aRetry-Afterheader. Your client or agent should wait at least that long and then retry, with backoff.
5. Recommended practices
- Give every person and every agent its own identity. Use OAuth for people and service account tokens for automation. Never share a token.
- Start read only. Mutation (write) tools are off by default. They are a server setting, not something your MCP client can switch on. On DataHub Cloud, if you need them, contact DataHub Support. In the request, include your tenant URL and what your agents need to write (for example tags, descriptions or ownership). Each write tool is marked
readOnlyHint: false, so clients that support it can ask for confirmation first. - To limit what an agent can see or do, use scoped MCP servers (Context add-on). Admins with the Manage platform settings privilege create them under Settings > AI > MCP Servers. Each one gets its own URL, its own selected tools and an optional View.
- Handle
429and5xxresponses with retry and backoff in your agent or orchestration layer.