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
- A portal with at least one access group
- An account with Snowflake for each person who connects
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in methods
| Method | Type | What a person provides |
|---|---|---|
| Snowflake OAuth (default) | OAuth | Signs in to Snowflake after entering accountIdentifier |
| Programmatic Access Token | API token | token |
| Key Pair JWT | API token | token |
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:
| Scope | Name | What it allows |
|---|---|---|
refresh_token | Refresh Token | Request a refresh token for long-lived access |
session:role:PUBLIC | Public Role | Use the PUBLIC role for the session |
session:role:SYSADMIN | Sysadmin Role | Use the SYSADMIN role for the session |
session:role:USERADMIN | Useradmin Role | Use 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:
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
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.
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 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. NeedsstatementHandle.
Write tools (9)
manage_task: Create, retrieve, list, execute, or delete Snowflake tasks. Needsaction,databaseNameandschemaName.manage_warehouse: Create, retrieve, list, delete, resume, suspend, or abort queries on Snowflake virtual warehouses. Needsaction.manage_role: Create, retrieve, list, or delete Snowflake roles. Needsaction.manage_user: Create, retrieve, list, or delete Snowflake users. Needsaction.manage_grant: Grant or revoke privileges on Snowflake objects. Needsaction,privileges,securableType,securableNameandroleName.manage_database: Create, retrieve, list, or delete Snowflake databases. Needsaction.execute_sql: Execute one or more SQL statements against Snowflake and return the results. Needsstatement.manage_table: Create, retrieve, list, or delete tables within a Snowflake database and schema. Needsaction,databaseNameandschemaName.manage_schema: Create, retrieve, list, or delete schemas within a Snowflake database. NeedsactionanddatabaseName.
Destructive tools (1)
cancel_statement: Cancel a running or queued SQL statement. NeedsstatementHandle.
Triggers
Snowflake has 3 triggers, which fire on events in Snowflake:
inbound_webhookquery_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
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use Snowflake there
- Create custom OAuth credentials: the Provider Auth screens in more detail
- Tool permissions: tool filters and what employees see
- Snowflake on metorial.com: the integration overview