Area: Ingestion Issues
Sub-Area: Snowflake MCP / OAuth Integration Configuration
Applies to: Cloud
Issue
You connect Snowflake Cortex Agents to the DataHub MCP Server as an External MCP Server. You create the API integration and the external MCP server in Snowflake. Then DataHub does not show up in the Connectors list in Snowflake CoWork (formerly Snowflake Intelligence), or it shows up but the OAuth sign in never starts. The agent can't use DataHub tools until the connector is in the Connected state.
You Might Be Asking
- Why doesn't DataHub show up in the CoWork Connectors list after I created the external MCP server?
- What value do I use for
OAUTH_RESOURCE_URLin the Snowflake API integration? - Do I need to register a Snowflake callback URL with DataHub for OAuth to work?
- Where do I add the DataHub connector to my agent?
Cause
There are three common causes:
- The roles that use the agent have no
USAGEgrant on the external MCP server and its API integration. By default only account admins can use the MCP server. Snowflake hides objects a role isn't allowed to use, and it gives no error. This is the most common reason the connector never appears in CoWork. - The connector was never added to the agent. An admin must add it in Snowsight before users see it in CoWork.
- The API integration has the wrong syntax or the wrong
OAUTH_RESOURCE_URL. In this case the connector is listed, but the OAuth flow does not start.OAUTH_RESOURCE_URLmust match theresourcevalue DataHub advertises at/.well-known/oauth-protected-resource. That value is the origin only, with no/mcppath.
Solution
The full setup is in the Snowflake Cortex Agents guide. Check each step below.
- Create the API integration as
ACCOUNTADMIN. UseAPI_PROVIDER = external_mcp, and putOAUTH_RESOURCE_URLinside theAPI_USER_AUTHENTICATIONblock:
CREATE API INTEGRATION datahub_mcp_api_integration
API_PROVIDER = external_mcp
API_ALLOWED_PREFIXES = ('https://mcp.datahub.com')
API_USER_AUTHENTICATION = (
TYPE = OAUTH_DYNAMIC_CLIENT,
OAUTH_RESOURCE_URL = 'https://mcp.datahub.com'
)
ENABLED = TRUE;
To point at your tenant instead of the global endpoint, use https://<tenant>.acryl.io for both API_ALLOWED_PREFIXES and OAUTH_RESOURCE_URL. Don't mix the two endpoints.
- Create the external MCP server. It is a schema level object, so create it in a database and schema your agent users can reach. The
URLuses the full endpoint, with/mcp:
CREATE EXTERNAL MCP SERVER <db>.<schema>.datahub_mcp_server
WITH DISPLAY_NAME = 'DataHub'
URL = 'https://mcp.datahub.com/mcp'
API_INTEGRATION = datahub_mcp_api_integration;
If you use your tenant, set URL = 'https://<tenant>.acryl.io/mcp'.
- Grant
USAGEon both objects to every role that uses the agent:
GRANT USAGE ON EXTERNAL MCP SERVER <db>.<schema>.datahub_mcp_server TO ROLE <role>;
GRANT USAGE ON INTEGRATION datahub_mcp_api_integration TO ROLE <role>;
If you recreate either object, run these grants again.
- Check the grants. Sign in with the role your agent users use, and run:
SHOW EXTERNAL MCP SERVERS IN ACCOUNT;
If the DataHub server is not in the result, that role has no grant. Go back to step 3.
-
Add the connector to your agent. In Snowsight, go to AI & ML, then Agents, and select your agent. Choose MCP Connectors, select DataHub from Available Connectors, and select Add to agent. You can also do this with
ALTER AGENT ... MODIFY LIVE VERSION SET SPECIFICATIONand anmcp_serversentry. The Snowflake Cortex Agents guide shows the SQL. -
Connect and sign in. Open Snowflake CoWork and select your agent. Open the sources panel, select Connectors, then select Connect next to DataHub. Each user goes through the DataHub OAuth flow once. The connector shows as Connected when it is ready.
-
If the connector is listed but the OAuth flow does not start, run:
SELECT SYSTEM$START_USER_OAUTH_FLOW('datahub_mcp_api_integration');
This returns an authorization URL. If it returns an error, OAUTH_RESOURCE_URL is wrong. Fix it as shown in step 1.
Additional Notes
You don't need to register a Snowflake callback URL with DataHub, and you don't need a Snowflake SECURITY INTEGRATION for this setup. DataHub's OAuth server supports Dynamic Client Registration, so Snowflake registers itself and supplies its own callback URL. DataHub has no redirect URI allowlist to configure for this.
Each user signs in with their own DataHub account. If the agent returns empty results, check that the user can see the entities in the DataHub UI.