Snowflake
Use a Snowflake administrator account with ACCOUNTADMIN or a delegated role with global CREATE INTEGRATION. From the application or data owner, obtain the approved Cortex Agent’s database, schema, and name; the MCP server’s target database, schema, and name; the connecting role; the warehouse; and the grant set. The role that creates the MCP server needs CREATE MCP SERVER, USAGE on the target schema, a privilege on the parent database, and USAGE on the Cortex Agent. Sign in at https://app.snowflake.com.
Snowflake-managed MCP servers are unavailable in the People’s Republic of China and unsupported in government regions.
Open a Snowflake SQL workspace
- Select Projects > Workspaces.
- Select + beside a folder, or select + Add New on first use.
- Select SQL File.
- Select the administrator role as the execution context.
- Select an available warehouse as the execution context.
Create the Cortex Agent MCP server
-
Obtain the approved MCP server database, schema, and name; Cortex Agent database, schema, and name; tool name; title; and description from the application or data owner.
-
Form
<cortex_agent_fqn>as<agent_database>.<agent_schema>.<agent_name>. -
Run this statement after replacing each placeholder with its approved value:
USE DATABASE <database>;USE SCHEMA <schema>;CREATE MCP SERVER <server_name>FROM SPECIFICATION $$tools:- name: "<tool_name>"type: "CORTEX_AGENT_RUN"identifier: "<cortex_agent_fqn>"description: "<approved_description>"title: "<approved_title>"$$; -
Retain the exact database, schema, and server name for the MCP server URL.
Grant first-connection access
-
Have the security owner run this statement with the target database, target schema, and server name retained in the previous step:
GRANT USAGE ON MCP SERVER <database>.<schema>.<server_name>TO ROLE <mcp_access_role>; -
Have the security owner grant access to the Cortex Agent’s parent database:
GRANT USAGE ON DATABASE <agent_database>TO ROLE <mcp_access_role>; -
Have the security owner grant access to the Cortex Agent’s parent schema:
GRANT USAGE ON SCHEMA <agent_database>.<agent_schema>TO ROLE <mcp_access_role>; -
Have the security owner grant access to the Cortex Agent:
GRANT USAGE ON AGENT <agent_database>.<agent_schema>.<agent_name>TO ROLE <mcp_access_role>; -
Have the security owner grant the connecting role every downstream privilege the Agent needs.
-
Have the security owner run this statement to grant the connecting role access to the selected warehouse:
GRANT USAGE ON WAREHOUSE <warehouse_name> TO ROLE <mcp_access_role>; -
For each connecting user, have the security owner run this statement to assign the connecting role:
GRANT ROLE <mcp_access_role> TO USER <username>; -
After the role assignment and warehouse grant succeed, run this statement for that user:
ALTER USER <username>SET DEFAULT_ROLE = '<mcp_access_role>'DEFAULT_WAREHOUSE = '<warehouse_name>';
If authorization succeeds but initialization fails, confirm that DEFAULT_WAREHOUSE is set and its warehouse grants USAGE to the connecting role. If tools are unavailable, confirm that the user has DEFAULT_ROLE assigned and that role has all MCP server, Agent parent database and schema, Agent, and downstream privileges.
Create the OAuth integration
-
Obtain the organization’s approved integration name.
-
For a PrivateLink account, add
USE_PRIVATELINK_FOR_AUTHORIZATION_ENDPOINT = TRUEon a new line before the statement’s final semicolon. -
Run the statement:
CREATE SECURITY INTEGRATION <integration_name>TYPE = OAUTHOAUTH_CLIENT = CUSTOMENABLED = TRUEOAUTH_CLIENT_TYPE = 'CONFIDENTIAL'OAUTH_REDIRECT_URI = 'https://app.getgram.ai/mcp/remote_login_callback';
An unquoted integration name is stored in uppercase. Retain that case-sensitive uppercase name for the next step.
Copy the OAuth credentials
-
Run this statement with the uppercase integration name in single quotes:
SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('<INTEGRATION_NAME>'); -
Copy
oauth_client_idas Client ID. -
Copy
oauth_client_secretas Client Secret. -
Store both values in the approved password manager.
Do not use oauth_client_secret_2 for initial setup.
Record the MCP server URL
-
Open the account selector.
-
Select View account details.
-
In Account Details, copy Account/Server URL.
-
Remove
https://and any trailing slash so only the hostname remains. -
Combine the hostname with the database, schema, and server name you retained:
https://<account_url>/api/v2/databases/<database>/schemas/<schema>/mcp-servers/<name>
Use the public URL even for a PrivateLink account. Prefer Snowflake’s organization-account hostname. Some clients require hyphens instead of underscores in the hostname.
Example shape only: https://myorg-myaccount.snowflakecomputing.com/api/v2/databases/MY_DB/schemas/MY_SCHEMA/mcp-servers/MY_SERVER.
Add the server in Speakeasy
- In the Speakeasy AI Control Plane sidebar, under Connect, select Sources.
- Click Add Source.
- Choose 3rd-party server.
- On MCP Catalog, enter
Snowflakein Search MCP servers…. - Open the Snowflake result with View.
- Click Add.
- In Add to Project, click Add to Project.
This creates the hosted MCP server and opens its Overview page.
Connect your credentials
- From Overview, open Settings.
- Under Authentication, click Configure Manually.
- In Attach Remote Identity Provider, set Client Type to Manual.
- Confirm that Redirect URI, shown with a copy button, matches the
https://app.getgram.ai/mcp/remote_login_callbackvalue registered in Create the OAuth integration. - Paste the Client ID into Client ID.
- Paste the Client Secret into Client Secret (optional).
- Click Attach Identity Provider.
When a client first requests Snowflake access, Snowflake’s OAuth flow opens in a browser. Each user signs in with their own Snowflake credentials and approves the consent screen. The resulting session uses that user’s DEFAULT_ROLE.
This guide covers setup only. For anything beyond it — billing, tool behavior, limits — see Snowflake’s MCP documentation at https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents-mcp.