> ## Documentation Index
> Fetch the complete documentation index at: https://docs.incident.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Snowflake

> Answer how many customers an incident touched with a query against your own warehouse.

Connect Snowflake as a [connector](https://docs.incident.io/nexus/extensions/connectors.md) to let incident.io's agents query tables and run analytics in your data warehouse, such as counting the customers or orders an incident affected.

Snowflake offers two ways in:

* **[MCP server](#connect-the-mcp-server)** Recommended: You choose which tools it offers, such as running SQL or querying a Cortex Search service.
* **[HTTP API](#connect-the-http-api)**: Snowflake's SQL API, for running SQL statements directly.

**What you'll need:**

* Your Snowflake account identifier. Open your user menu in Snowsight and choose **Connect a tool to Snowflake** to find it in **Account Details**.
* A Snowflake user for agents, with a role that has access to the data they should query, and a programmatic access token for it.
* The **Manage Nexus sources** permission in incident.io.

## Create a programmatic access token

1. In Snowsight, go to **Governance & security → Users & roles** and select the user.
2. Under **Programmatic access tokens**, click **Generate new token**.
3. Restrict the token to the role agents should use, set an expiry, and copy the token.

To authenticate with the token, the user needs to be subject to a [network policy](https://docs.snowflake.com/en/user-guide/programmatic-access-tokens) that allows [incident.io's IP addresses](https://docs.incident.io/integrations/ip-allowlist.md).

## Connect the MCP server

Snowflake's MCP server is one you create in your account, so its URL includes the database, schema and name you give it.

1. In Snowflake, create the server with [`CREATE MCP SERVER`](https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents-mcp), choosing the tools it offers, and grant **USAGE** on it to the agent's role.
2. From [Extensions](https://app.incident.io/~/nexus/extensions), add a connector and choose **MCP server**.
3. Leave network access as **Public internet**, and give the connector a display name such as `Snowflake`.
4. Enter your server URL, and click **Check URL**. It takes the form `https://<account identifier>.snowflakecomputing.com/api/v2/databases/<database>/schemas/<schema>/mcp-servers/<name>`. Use hyphens, not underscores, in the account identifier.
5. Under **Authentication**, choose **Bearer token** and enter your programmatic access token.
6. Review which tools are enabled and the connector's [default policy](https://docs.incident.io/nexus/extensions/connectors.md#default-policy), then save.

## Connect the HTTP API

1. From [Extensions](https://app.incident.io/~/nexus/extensions), add a connector and choose **HTTP API**.
2. Paste Snowflake's [SQL API OpenAPI document](https://github.com/snowflakedb/snowflake-rest-api-specs/blob/main/specifications/sqlapi.yaml).
3. Enter `https://<account identifier>.snowflakecomputing.com` as the base URL, using your own account identifier.
4. Under authentication, choose **Bearer token** and enter your programmatic access token.
5. Test the connection, review which operations are enabled and the connector's [default policy](https://docs.incident.io/nexus/extensions/connectors.md#default-policy), then save.

Running SQL is a `POST`, so the SQL API's operations start under the Write policy, which is off by default. If the agent's role can only read, [re-class them](https://docs.incident.io/nexus/extensions/connectors.md#per-tool-overrides) as Read. See [Connectors](https://docs.incident.io/nexus/extensions/connectors.md#permissions) for how to control which tools agents can call, and from where.

## Pair it with a skill

Agents work best with a connector when it's paired with a [skill](https://docs.incident.io/nexus/extensions/plugins.md). For Snowflake, say which databases, schemas and tables hold what, which warehouse to use, and example queries for the questions you ask during incidents, such as how many customers saw errors.
