---
title: "How to connect AI agents to your data warehouse | Rig"
description: "Connect Claude, ChatGPT or Cursor to Snowflake, BigQuery or Databricks over MCP, with certified metrics, a role for each agent and a log of every query."
canonical: "https://rig.so/blog/how-to-connect-ai-agents-to-your-data-warehouse"
format: markdown
---

[Data context and governance](https://rig.so/blog/data-context)

# Who is Claude logged in as, once you've connected it to Snowflake?

To connect AI agents to your data warehouse, put a governed MCP gateway in front of it and give each agent its own role and token. Agents then query certified metrics in your semantic layer, and every query is logged under the agent's name. MCP is the usual protocol for the connection, and Claude, ChatGPT and Cursor all support it, so one setup serves all three.

By [Toby Mather](https://rig.so/blog/authors/toby-mather) · Published 20 November 2026

[Request an architecture diagram for your stack](https://rig.so/book-demo?offer=architecture_diagram&from=%2Fblog%2Fhow-to-connect-ai-agents-to-your-data-warehouse)

## Key takeaways

- The common default, a shared warehouse login or the setup person's own sign-in, gives everyone who uses the agent that login's access and leaves a log that cannot name the agent.
- Let people connect with their own sign-in, and give each shared or scheduled agent a token, role and owner of its own.
- Point agents at certified metrics and table descriptions, so they ask for revenue by name and stop guessing joins over raw tables.
- Snowflake, Databricks and BigQuery each publish managed MCP servers that use the warehouse's own permissions, which works well for people signed in as themselves.
- To expose governed business metrics to Claude and Cursor, serve the certified definitions over MCP through a gateway that applies each caller's role.

1. 01**Agent**
   
   Asks as a named agent
2. 02**Gateway**
   
   Applies the agent's role
3. 03**Warehouse**
   
   Policy-enforced result
4. 04**Answer and log**
   
   Every query recorded

The agent asks as itself, the gateway queries with the agent's role, the warehouse enforces policy, and the call is logged before the answer goes back.

## What is the wrong default?

The quickest way to connect Claude to Snowflake is to hand it a warehouse login. Often that is a service account the BI tool already uses, or the analyst setting it up signs in with their own account. It works on the first try, which is why it spreads.

Then the agent gets shared. A Notion custom agent or a Slack bot uses one connection for everyone who talks to it, so a new starter asking the agent a question sees what the analyst who connected it can see. The warehouse log shows the analyst running every query, at all hours, and when someone asks which agent pulled the customer list last week, nobody can say. So the honest answer to the headline is usually "as whoever set it up".

## What does a governed connection look like?

The pattern has four parts, and each one fixes a specific failure of the shared login.

1. A gateway in front of the warehouse that speaks MCP, so every AI tool connects to the same place under the same rules.
2. An identity per caller: people sign in as themselves, and each shared or scheduled agent gets its own role, token and named owner, with access narrower than the owner's.
3. Certified metrics and table context, so the agent asks for net revenue by name and gets the calculation your finance team approved.
4. A log of every call under the caller's name, including refused calls, plus a daily call limit per agent so a stuck loop cannot run all night.

## Why is MCP the usual protocol?

The Model Context Protocol is an open standard for connecting AI applications to data and tools, and Claude, ChatGPT, Cursor and Visual Studio Code all support it. You set up one MCP endpoint, and every tool your team uses can reach it.

MCP defines how the agent and the server talk. It leaves the questions of who the agent is and what it may see to you, which is why the gateway matters. Our explainers on MCP servers and MCP gateways cover the two halves.

## What does this look like on Snowflake, Databricks and BigQuery?

On Snowflake, the Snowflake-managed MCP server can serve Cortex Analyst, Cortex Search, Cortex Agents, custom tools and SQL execution. Clients authenticate with Snowflake OAuth or with External OAuth through your identity provider, and role-based access control decides which tools a client can discover and invoke. Semantic views give agents a metric definition to query.

On Databricks, managed MCP servers in the system.ai schema cover Genie, Databricks SQL and external services, and the Databricks SQL server uses the caller's Unity Catalog and warehouse permissions. Metric views in Unity Catalog hold the definitions. For Genie itself, see our Genie how-to.

On BigQuery, Google documents a remote MCP server for running queries, reading metadata and listing resources. It uses OAuth 2.0 with IAM, and callers need permissions such as bigquery.jobs.create and bigquery.tables.getData.

All three work well for a person signed in as themselves. The gap is the same on each: an agent with no person behind it needs an identity, a scope and a log of its own, and teams running more than one warehouse want one set of rules across them.

## How do you expose governed business metrics to Claude and Cursor?

Put the definitions where both tools can query them by name. Certify each business metric once, with its SQL, description and owner, in a semantic layer that sits over the warehouse. Serve that layer over MCP, so Claude and Cursor see the metric library, table descriptions and joins alongside the raw schema.

Then put the gateway in front, so each caller gets their own role. An engineer in Cursor and a sales manager in Claude can ask for the same metric and get the same definition, filtered to the rows each is allowed to see. Novakid's sales managers and sales ops work this way, investigating their own numbers in Claude on a warehouse narrowed to the tables the team trusts.

## How Rig does it

Rig serves your warehouse over MCP from one workspace URL. People add it to Claude, ChatGPT, Cursor, Codex, Claude Code or Cowork and sign in with OAuth, and every tool sees exactly what that person's role allows. Rig Map gives those tools live metadata (tables, joins, sample values and certified metrics), so the AI guesses less and stays current as schemas change.

For agents, Gateway creates an identity of its own. Each agent gets a role copied from one you trust and narrowed for that agent, a token to paste into Notion, Viktor, Claude Tag or any MCP client, and a daily call cap, 1,000 by default. Its role controls datasets, columns, rows and PII masking, and every call shows in the audit log with the agent's name. You can pause an agent or replace its token at once. One Cleo Growth Specialist's agents made 8,023 requests to company data in 30 days, on the certified metrics and rules Cleo's data team reviews.

## Tools and approaches

[Model Context Protocol](https://modelcontextprotocol.io/docs/getting-started/intro)

The open standard for connecting AI applications to data and tools, supported by Claude, ChatGPT, Cursor and Visual Studio Code.

[Snowflake-managed MCP server](https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents-mcp)

Serves Cortex Analyst, Cortex Search, Cortex Agents, custom tools and SQL execution, with Snowflake OAuth or External OAuth and RBAC over tools.

[Databricks managed MCP servers](https://docs.databricks.com/aws/en/generative-ai/mcp/managed-mcp)

MCP servers in the system.ai schema for Genie, Databricks SQL and external services, governed as Unity Catalog securables.

[BigQuery MCP server](https://docs.cloud.google.com/bigquery/docs/use-bigquery-mcp)

A remote MCP server for queries, metadata and listing resources, using OAuth 2.0 with IAM.

## Common questions

How do I expose governed business metrics to Claude and Cursor?

Certify each metric once in a semantic layer over your warehouse, serve it over MCP, and put a gateway in front that applies each caller's role. Both tools then query the same definitions, and each person or agent sees only their own rows.

Can I use a vendor MCP server on its own?

Yes, for people who sign in as themselves, and it is a good starting point. Shared and scheduled agents need their own identity, scope and log, which a gateway adds.

Does this work with ChatGPT, Claude and Cursor?

Yes. All three support MCP. Rig's setup panel covers Claude, Claude Code, Cursor, Codex and Cowork, and ChatGPT connects through its developer mode for custom MCP servers.

How do I see what an agent queried yesterday?

Open the audit log and filter by the agent. Each call carries the agent's name and tool, and refused calls show as errors.

Should an agent use a shared warehouse login?

No. A shared login gives everyone using the agent the login's access, and the log cannot tell the agent apart from anything else using that login.

## Related reading

[Data context and governance](https://rig.so/use-cases/data-context-and-governance)[Gateway](https://rig.so/products/gateway)[Rig Map](https://rig.so/products/rig-map)[MCP for your data warehouse](https://rig.so/uses/mcp)[Snowflake MCP: named agents, logged calls](https://rig.so/mcp/snowflake)[Databricks MCP: named agents, logged calls](https://rig.so/mcp/databricks)[BigQuery MCP: named agents, logged calls](https://rig.so/mcp/bigquery)[Please stop giving agents the warehouse password](https://rig.so/blog/what-is-an-mcp-server)[An MCP gateway is how you stop a server being a free-for-all](https://rig.so/blog/what-is-an-mcp-gateway)[Connect ai tools](https://rig.so/guides/connect-ai-tools)[Novakid case study](https://rig.so/case-studies/novakid)[Cleo case study](https://rig.so/case-studies/cleo)

## Sources

Vendor documentation checked on 20 November 2026. Confirm current features and terms with the vendor.

- [What is the Model Context Protocol?](https://modelcontextprotocol.io/docs/getting-started/intro)
- [Snowflake-managed MCP server](https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents-mcp)
- [Databricks managed MCP servers](https://docs.databricks.com/aws/en/generative-ai/mcp/managed-mcp)
- [Use the BigQuery MCP server](https://docs.cloud.google.com/bigquery/docs/use-bigquery-mcp)
- [Snowflake semantic views overview](https://docs.snowflake.com/en/user-guide/views-semantic/overview)
- [Databricks metric views](https://docs.databricks.com/aws/en/uc-semantics/metric-views/)

## About the author

[Toby Mather](https://rig.so/blog/authors/toby-mather), Co-founder and CEO, Rig. Toby co-founded Rig after seeing how hard it was for business teams and AI to work with complex internal data. He was previously co-founder and CEO of Lingumi and CPO at Novakid.

Talk to Rig

## See your stack drawn as one diagram

An architect drafts a one-page diagram of your warehouse, sources and access path, then offers a 30-minute walkthrough.

[Request an architecture diagram for your stack](https://rig.so/book-demo?offer=architecture_diagram&from=%2Fblog%2Fhow-to-connect-ai-agents-to-your-data-warehouse)[Book a call with an architect](https://rig.so/book-demo?offer=architect_call&from=%2Fblog%2Fhow-to-connect-ai-agents-to-your-data-warehouse)

---

- [This page as HTML](https://rig.so/blog/how-to-connect-ai-agents-to-your-data-warehouse)
- [Site map for language models](https://rig.so/llms.txt)
- [API and agent documentation](https://rig.so/developers)
