MetorialDocs

Set up Snowflake in Metorial for Claude, ChatGPT and Cursor

Share Snowflake with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or programmatic access token sign-in, 11 tools (1 read-only).

To give your team Snowflake in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Snowflake integration in a Metorial portal, and each person signs in to Snowflake with their own account. Agents can execute SQL statements and manage cloud data warehouse resources on Snowflake. The integration has 11 tools, 1 read-only, 9 write and 1 destructive, plus 3 triggers.

What you'll learn

  • How an admin shares Snowflake in a portal and how each person connects
  • The 4 OAuth scopes Snowflake can request, and what each one allows
  • How to keep the 1 read-only tools and reject the other 10

Before you start

Sign-in methods

MethodTypeWhat a person provides
Snowflake OAuth (default)OAuthSigns in to Snowflake after entering accountIdentifier
Programmatic Access TokenAPI tokentoken
Key Pair JWTAPI tokentoken

The portal and metorial setup use Snowflake OAuth unless someone picks another method.

Snowflake OAuth

Before the sign-in, setup asks for:

  • accountIdentifier: Snowflake account identifier (e.g. myorg-myaccount)

People sign in to Snowflake and approve the scopes you allow. The integration can request:

ScopeNameWhat it allows
refresh_tokenRefresh TokenRequest a refresh token for long-lived access
session:role:PUBLICPublic RoleUse the PUBLIC role for the session
session:role:SYSADMINSysadmin RoleUse the SYSADMIN role for the session
session:role:USERADMINUseradmin RoleUse the USERADMIN role for the session

Programmatic Access Token

To connect, a person enters:

  • token: Programmatic access token (PAT) generated via Snowsight or SQL

Key Pair JWT

To connect, a person enters:

  • token: JWT token generated using your RSA private key for key-pair authentication

Setup settings

Whichever method you pick, setup also asks for:

  • accountIdentifier: Snowflake account identifier in the format org_name-account_name (e.g. myorg-myaccount). Used to construct the base URL for API requests.
  • warehouse (optional): Default warehouse to use for SQL execution. Can be overridden per request.
  • role (optional): Default role to use for API requests. Can be overridden per request.

Use your own Snowflake OAuth app

With your own OAuth app, people see your company's name on the Snowflake consent screen, and the client ID and secret belong to you.

Start the credentials in Metorial

In the dashboard, select Settings, then Organization Settings. Under Integrations and MCP, select Provider Auth, then Create Auth Credentials. Choose Snowflake and copy the Redirect URI.

Register the app with Snowflake

Create an OAuth app or client in Snowflake and add the redirect URI from Metorial as its redirect or callback URL. The vendor documents this in OAuth documentation.

Finish in Metorial

Copy the app's client ID and client secret. Back in Metorial, enter a Name, the Client ID and the Client Secret, review Scopes, and select Create. Then pick these credentials for the Snowflake integration.

Admin: share Snowflake in a portal

In the dashboard

Open Shared Resources

Open Workforce, choose the portal, and select Shared Resources under Access.

Share a new integration

Select Share a Resource, then New Integration, and choose Snowflake. Under Auth Method, keep Snowflake OAuth or pick another. For how members connect, choose Each person connects, so everyone signs in to Snowflake as themselves.

Limit the tools

Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Snowflake.

Choose who gets it

Add the access groups that should see Snowflake. When a person asks for access from the portal, the request appears under Access Requests.

With the CLI

The CLI cannot create the per-user Snowflake integration. Once it exists, check which groups have it:

metorial-admin portals access list <portal-id> --type provider_template --search snowflake

Employee: connect Snowflake

In the portal

Open Snowflake in the catalog

Sign in to your portal and open Snowflake. The status reads Available.

Authenticate

Under Quick setup, select Authenticate. A Snowflake sign-in tab opens. Sign in and approve the permissions listed.

Confirm

The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.

With the CLI

metorial catalog search snowflake
metorial setup <catalog-item-id>

catalog search prints the catalog item ID. metorial setup uses Snowflake OAuth. To connect with Programmatic Access Token instead, find its ID with metorial catalog get <catalog-item-id> and add --auth-method <auth-method-id>.

Add it to your AI client

metorial install adds your Snowflake connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.

metorial list snowflake
metorial client list
metorial install <client-identifier> <integration-id>

For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.

Make it read-only

Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the read-only tool check_statement_status, and lose the 9 write tools, such as execute_sql or manage_role, and the destructive tool cancel_statement.

Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.

Check it worked

metorial list snowflake
metorial tools <integration-id>
metorial call <integration-id> check_statement_status -d '{"statementHandle":"<statement-handle>"}'

metorial tools lists the 11 tools, minus any you rejected. check_statement_status needs statementHandle, so replace the placeholders. It checks the execution status of a previously submitted SQL statement and retrieve its results.

To see every input a tool takes, run metorial schema <integration-id> <tool-key>.

Tools

Read-only tools (1)

  • check_statement_status: Check the execution status of a previously submitted SQL statement and retrieve its results. Needs statementHandle.

Write tools (9)

  • manage_task: Create, retrieve, list, execute, or delete Snowflake tasks. Needs action, databaseName and schemaName.
  • manage_warehouse: Create, retrieve, list, delete, resume, suspend, or abort queries on Snowflake virtual warehouses. Needs action.
  • manage_role: Create, retrieve, list, or delete Snowflake roles. Needs action.
  • manage_user: Create, retrieve, list, or delete Snowflake users. Needs action.
  • manage_grant: Grant or revoke privileges on Snowflake objects. Needs action, privileges, securableType, securableName and roleName.
  • manage_database: Create, retrieve, list, or delete Snowflake databases. Needs action.
  • execute_sql: Execute one or more SQL statements against Snowflake and return the results. Needs statement.
  • manage_table: Create, retrieve, list, or delete tables within a Snowflake database and schema. Needs action, databaseName and schemaName.
  • manage_schema: Create, retrieve, list, or delete schemas within a Snowflake database. Needs action and databaseName.

Destructive tools (1)

  • cancel_statement: Cancel a running or queued SQL statement. Needs statementHandle.

Triggers

Snowflake has 3 triggers, which fire on events in Snowflake:

  • inbound_webhook
  • query_completed: Triggers when SQL queries complete execution in the Snowflake account.
  • task_run_completed: Triggers when a scheduled Snowflake task completes a run.

Next steps