---
title: "What is an MCP server, for a warehouse? | Rig"
description: "An MCP server exposes tools and data to AI clients. For a warehouse, run each call as a named agent, against certified metrics, with a log of every call."
canonical: "https://rig.so/blog/what-is-an-mcp-server"
format: markdown
---

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

# Please stop giving agents the warehouse password

An MCP server is a program that exposes tools, resources and prompts to AI applications such as Claude or Cursor through the Model Context Protocol, an open standard. For a warehouse, the useful version runs each call as a named agent with its own role, against certified metrics, with a log. A server holding one shared warehouse login is the wrong default.

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%2Fwhat-is-an-mcp-server)

## Key takeaways

- MCP is an open protocol. An AI application acts as the host, creates one client per server, and each server exposes tools, resources and prompts.
- A warehouse MCP server usually offers tools to search tables, read definitions and run SQL, so the model can answer data questions by itself.
- If that server uses one shared service account, every agent and every person gets the same access, and the warehouse's query history cannot tell them apart.
- Each agent should have its own identity and role, row-level limits, a call limit and an audit trail that names it.
- Snowflake and Databricks ship managed MCP servers with their own permission models. A gateway adds per-agent control across every tool you connect.

1. 01**AI agent**
   
   Claude, Cursor or Codex calls a tool
2. 02**MCP server**
   
   Lists tools and forwards the call
3. 03**Gateway**
   
   Runs it under the named agent's role
4. 04**Warehouse**
   
   Returns rows the policies allow
5. 05**Audit trail**
   
   Records the agent, tool and query

The agent calls a tool, the server forwards it, and Gateway runs the query under that agent's own role before logging it.

## What is the Model Context Protocol?

The Model Context Protocol (MCP) is an open-source standard for connecting AI applications to external systems. Its documentation describes three participants. The host is the AI application, such as Claude Code or Claude Desktop, and it creates a client for each server it connects to. The server is the program that provides context to that client.

A shared standard means you build a server once and any MCP-capable application can use it. The project lists Claude, ChatGPT, Visual Studio Code and Cursor among the applications that support it, which is why so many company systems now offer an MCP server.

## What does an MCP server do, in plain language?

A server tells the AI application what it can do and then does it when asked. The protocol defines three kinds of thing a server can expose. Tools are functions the model can call, such as running a query. Resources are data the application can read, such as a table schema. Prompts are reusable templates. The client lists the server's tools, passes them to the model, and calls the ones the model picks.

Servers run locally over standard input and output, or remotely over Streamable HTTP. Remote servers can authenticate with bearer tokens, API keys or custom headers, and the MCP documentation recommends OAuth for obtaining tokens. For a warehouse, that authentication choice decides who the warehouse thinks is asking.

## What should a warehouse MCP server do?

Warehouse servers tend to offer the same handful of tools: search tables and columns, read a table's description, look up a metric definition, test a query and run it. The model uses them to work out where the data is and then fetch it. If the server also exposes certified metrics, the model can ask for net revenue last quarter and get the agreed calculation instead of writing its own SQL.

The useful form of a warehouse server looks like this:

- Each call runs as a named agent, with a role that limits the schemas and tables it can read
- Row-level rules still apply, so an agent acting for one sales rep sees that rep's rows
- Metric questions go to certified definitions before the model writes free SQL
- Each agent has a daily call limit and can be switched off without touching the others
- Every call is logged with the agent's name, the tool and the query

## What goes wrong with a generic server and a shared login?

The quickest way to get an MCP server talking to a warehouse is to create a service user, give it a broad role, paste the credentials into the server config and share the config with the team. It works on the first afternoon, which is why it is so common.

The problems arrive together. Everyone using that config has the same access, usually more than any of them needs. The query history shows the service user and cannot tell you which agent or which person asked. Rotating the credential breaks everyone at once, and row policies keyed on the user only ever see one user. When an agent pulls salary data into a chat, nobody can say who allowed it.

Warehouse RBAC still applies under MCP. A shared login gives it one identity for everyone, so the per-person controls you already built have nothing to act on.

## How should an agent connect to the warehouse?

This is the order we follow when we connect agents for a client.

1. Give each agent its own identity, started from a base role and narrowed to the datasets it needs.
2. Issue it a token of its own, shown once, with a daily call limit and a named owner.
3. Point it at certified metrics and described tables first, so common questions get agreed answers.
4. Keep row-level rules keyed to the person the agent works for.
5. Read the audit trail every week to see which agents ran which queries and which ones hit their limits.

## Why do AI agents make governed access more urgent?

A person with a shared login runs a few queries a day and has a rough idea of what they should see. An agent can make hundreds of calls in an afternoon, follows instructions from documents it reads, and has no sense of what it should leave alone.

Cleo's case study gives a sense of the volume. One Growth Specialist's AI agents made 8,023 requests to company data in 30 days, on metrics Cleo's data team certifies. At that rate, a role per agent and a log of every call are the only practical way to know what happened.

## How is an MCP server different from an MCP gateway?

An MCP server exposes tools. An MCP gateway sits in front of one or more servers and decides who may call which tool, under which identity, how often, and with what recorded. Some products combine the two jobs in one place.

Our post on MCP gateways covers that control point in detail, and is written to be read alongside this one.

## How Rig does it

Gateway is Rig's access product: RBAC for people and AI agents, plus warehouse access, including MCP. In Gateway's Agents section you create an agent, choose the tool it runs in, start it from a base role such as analyst or viewer, pick the tools it may use, set a daily call cap and name an owner. The agent's role starts as a copy of the base role, and you can take datasets away from it in the Access Matrix. Its token appears once.

Every MCP call the agent makes appears in the audit log under the agent's name, next to admin actions such as token rotations. Row scoping applies as well, so user-scoped tables limit each person to their own records, their reports or their team.

Rig Map supplies what the agent reads: certified metrics, table descriptions, usage rules and gold-star tables. Claude, Claude Code, Cursor and Codex connect to Rig through MCP from the setup panel. Novakid's commercial team investigates its own numbers in Claude this way, on a warehouse of more than 5,000 tables narrowed to the tables the team trusts.

## Tools and approaches

[Model Context Protocol](https://modelcontextprotocol.io/docs/learn/architecture)

The open specification, SDKs and reference servers for MCP. The architecture and security pages explain hosts, clients, servers, transports and authorization.

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

A schema-level object created with CREATE MCP SERVER. It can expose Cortex Analyst over semantic views, Cortex Search, Cortex Agents, SQL execution and custom functions. Access to the server does not grant access to its tools, because each tool needs its own grant. Snowflake recommends OAuth over hard-coded tokens.

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

Hosted MCP endpoints for Genie, SQL on a SQL warehouse, AI Search indexes and Unity Catalog functions. Permissions come from Unity Catalog and the underlying resources.

[dbt MCP server](https://docs.getdbt.com/docs/use-dbt-semantic-layer/dbt-semantic-layer)

Lets Claude and ChatGPT query metrics from the dbt Semantic Layer, so their answers use governed metrics from the dbt project.

## Common questions

Is an MCP server the same as an MCP gateway?

A server exposes tools to AI applications. A gateway controls who can call those tools, under which identity and with what logged. You can run a server without a gateway, and a warehouse server without one usually ends up with a shared login.

Can I point Claude or Cursor at Snowflake with an MCP server?

Yes. Snowflake offers a managed MCP server, and Claude and Cursor are MCP clients. Give each agent its own role and use OAuth or a least-privileged token, so the warehouse knows which agent is asking.

Does an MCP server replace warehouse RBAC?

The server should pass an identity that warehouse RBAC and row policies can act on. With a shared login the warehouse still enforces that one account’s role, but it cannot tell one agent or person from another, so per-identity grants and row policies never apply, and nothing visibly breaks.

Who should own the server?

Usually the data or platform team, because it already owns warehouse access. Business teams own the agents and decide what each one is for, while IT and data teams control the definitions and the roles.

Do I need to write my own MCP server?

Usually not. Warehouse vendors, dbt and platforms such as Rig ship servers already. Write your own when you need tools that none of them expose.

## Related reading

[Data context and governance](https://rig.so/use-cases/data-context-and-governance)[Rig Map](https://rig.so/products/rig-map)[Gateway](https://rig.so/products/gateway)[An MCP gateway is how you stop a server being a free-for-all](https://rig.so/blog/what-is-an-mcp-gateway)[Who is Claude logged in as, once you've connected it to Snowflake?](https://rig.so/blog/how-to-connect-ai-agents-to-your-data-warehouse)[Snowflake MCP: named agents, logged calls](https://rig.so/mcp/snowflake)[Databricks MCP: named agents, logged calls](https://rig.so/mcp/databricks)[AI agent governance](https://rig.so/use-cases/agent-data-governance)[Agent roles](https://rig.so/guides/agent-roles)[Cleo case study](https://rig.so/case-studies/cleo)[Novakid case study](https://rig.so/case-studies/novakid)

## Sources

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

- [What is the Model Context Protocol? (MCP docs)](https://modelcontextprotocol.io/docs/getting-started/intro)
- [Architecture overview (MCP docs)](https://modelcontextprotocol.io/docs/learn/architecture)
- [Snowflake-managed MCP server (Snowflake docs)](https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents-mcp)
- [Managed MCP servers (Databricks docs)](https://docs.databricks.com/aws/en/generative-ai/mcp/managed-mcp)
- [dbt Semantic Layer (dbt docs)](https://docs.getdbt.com/docs/use-dbt-semantic-layer/dbt-semantic-layer)

## 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%2Fwhat-is-an-mcp-server)[Book a call with an architect](https://rig.so/book-demo?offer=architect_call&from=%2Fblog%2Fwhat-is-an-mcp-server)

---

- [This page as HTML](https://rig.so/blog/what-is-an-mcp-server)
- [Site map for language models](https://rig.so/llms.txt)
- [API and agent documentation](https://rig.so/developers)
