---
title: "What is an MCP gateway? Warehouse access for AI agents | Rig"
description: "An MCP gateway is a control point in front of your warehouse. Each person and agent gets a role, a token and a log in place of a shared database password."
canonical: "https://rig.so/blog/what-is-an-mcp-gateway"
format: markdown
---

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

# An MCP gateway is how you stop a server being a free-for-all

An MCP gateway is a control point between AI agents and the systems they query, and it speaks the Model Context Protocol. In front of a warehouse, it gives every person and agent a role, a token and a log in place of a shared database password. An MCP server exposes tools, and the gateway decides who may call them.

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-gateway)

## Key takeaways

- MCP is an open standard for connecting AI applications such as Claude, ChatGPT and Cursor to data and tools. An MCP server is what exposes those tools.
- An MCP gateway sits in front of one or more servers and adds identity, policy, limits and a log for every call.
- API gateway vendors such as Kong, TrueFoundry and Traefik now ship MCP gateway features for authentication and tool-level access. Those govern which tools an agent may call.
- For a warehouse, the gateway also has to reach datasets, columns, rows and certified metrics, and it has to log each query under the name of the agent that ran it.
- Keep warehouse RBAC as the base layer and use the gateway to give each agent an identity those grants can apply to.

1. 01**AI agents**
   
   Claude, Cursor, Notion agents
2. 02**MCP gateway**
   
   Role, token, call cap
3. 03**Warehouse**
   
   Policy-enforced query
4. 04**Query log**
   
   Every call, by name

Agents call the MCP gateway, which applies the agent's role, queries the warehouse and writes every call to the log.

## What is an MCP gateway?

The Model Context Protocol is an open-source standard for connecting AI applications to external systems. Claude, ChatGPT, Cursor and Visual Studio Code all support it, so a tool built once as an MCP server can be used from any of them.

An MCP gateway is the layer in front of those servers. Every agent connects to the gateway with its own credential, the gateway checks what that credential may do, passes allowed calls through and records the result. When you need to switch an agent off, rotate its token or see what it did last Tuesday, the gateway is where you go.

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

An MCP server exposes tools and data from one system: list tables, run a query, search documents. Most warehouses and SaaS tools now publish one. A server answers whoever connects with valid credentials, and on its own it has no view of which agent is behind those credentials or what that agent should be doing.

A gateway is about who is calling. It can sit in front of one server or many. It knows which agents exist and what each may reach, sets how often each one may call, and keeps the record of every call. Our explainer on MCP servers covers the server side in more detail.

## How is it different from an API gateway?

If you search for an MCP gateway today, most results come from API and AI gateway vendors. Kong says its AI Gateway can generate MCP tools and servers on top of Kong-managed APIs and enforce authentication for MCP server access. TrueFoundry describes a central registry of MCP servers, federated login through identity providers, RBAC policies per server and tracing of every call. Traefik describes task, tool and transaction-based access control that authorises each request down to individual tool arguments.

Those gateways govern traffic, meaning which agent may call which tool and with which arguments. That is the right control for HTTP APIs and SaaS tools. A warehouse needs one more layer, because a single tool such as "run a query" can return a public product list or every customer's salary depending on the SQL. The policy has to reach the data itself, down to datasets, columns, rows and certified metrics.

## What must an MCP gateway do for a warehouse?

For warehouse access, I would check a gateway against six things before trusting it with an agent.

- An identity for every agent, separate from the person who set it up, so the agent cannot inherit a person's access.
- A scope that reaches datasets, tables, columns and rows, with masking for personal and financial fields.
- Certified metrics and table context, so the agent asks for net revenue by name and gets the approved calculation.
- A call limit per agent, so a scheduled agent stuck in a loop cannot run up a warehouse bill overnight.
- A log a person can read, with the agent's name, the tool it used and whether the call was allowed or refused.
- A way to pause an agent or replace its token at once, without touching anyone else's access.

## Why do AI agents need a gateway at all?

The common default is to connect an agent with a shared warehouse login or with the login of whoever set it up. A Notion custom agent or a Slack bot shares one connection across everyone who talks to it, so every person using the agent sees what the person who connected it can see, including data their own role does not allow.

The audit trail suffers too. If three agents and a dashboard share a service account, the warehouse log shows one user running thousands of queries, and nobody can say which agent pulled the customer list. A gateway fixes both problems by giving each agent its own role and recording every call against it.

## Do you still need warehouse RBAC?

Yes. Warehouse grants, row access policies and masking are the base layer, and the warehouse vendors are building MCP access on top of them. Snowflake's managed MCP server uses role-based access control to decide which tools a client can discover and invoke. Databricks describes its managed MCP servers as Unity Catalog securables, and its Databricks SQL server uses the caller's Unity Catalog and warehouse permissions.

These work well when the caller is a person signed in as themselves. A gateway adds what the warehouse cannot infer: an identity for an agent that has no person behind it, a scope that is narrower than its owner's, and the same rules applied across every warehouse and tool you connect.

## How Rig does it

Gateway is Rig's RBAC layer for people and AI agents, and it serves your warehouse over MCP. People connect from Claude, ChatGPT, Cursor, Codex or Claude Code with their own sign-in and see exactly what their role allows. Agents get their own role, copied from a role you already trust and then narrowed, plus a token that is nobody's personal login and a daily call cap (1,000 by default). Agents cannot sign in to Rig, and no agent can be given owner-level access.

You set what each role reaches in the Access Matrix, add table, column and row rules and PII masking, and test a role by running SQL as it before anyone uses it. Every agent call appears in the audit log with the agent's name and tool, including refused calls. Rig Map supplies the certified metrics and table context the agent reads, so the gateway and the definitions stay in one place. One Cleo Growth Specialist's agents made 8,023 requests to company data in 30 days, on metrics Cleo's data team certifies.

## Tools and approaches

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

The open standard itself, with documentation for building servers and clients and a page on security best practices.

[Kong AI Gateway](https://konghq.com/products/kong-ai-gateway)

An API and AI gateway that can generate MCP tools and servers from Kong-managed APIs and enforce authentication for MCP server access.

[TrueFoundry MCP Gateway](https://www.truefoundry.com/mcp-gateway)

A registry of MCP servers with federated login through Okta, Azure AD and other identity providers, RBAC policies per server and tracing of calls.

[Traefik Hub MCP Gateway](https://traefik.io/solutions/mcp-gateway)

Task, tool and transaction-based access control down to tool arguments, OAuth token validation and policies kept as YAML in version control.

[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 RBAC deciding which tools a client can discover and invoke.

[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, each a Unity Catalog securable.

## Common questions

Is an MCP gateway the same as Kong or another API gateway?

They overlap. API gateways with MCP features control which agents can call which tools. A gateway for warehouse access also controls which datasets, columns, rows and metrics come back, and logs each query under the agent's name.

Do I still need warehouse RBAC?

Yes. Keep your warehouse grants and policies. The gateway gives each agent an identity so those rules, and your own narrower agent rules, apply to it.

Can one gateway cover Snowflake, Databricks and BigQuery?

It can if the gateway connects to each of them. Rig connects to Snowflake, BigQuery, Databricks, Redshift, Postgres and other warehouses, and applies the same roles and audit log across them.

Is an MCP gateway the same as an MCP server?

No. A server exposes tools from one system, and a gateway sits in front of one or more servers to decide who may call them, how often, and what gets recorded.

How do you control which agents can call warehouse tools?

Give each agent its own role and token, limit its tools and daily calls, and narrow the datasets, columns and rows its role reaches. Then check the audit log for refused calls and adjust.

## 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)[Please stop giving agents the warehouse password](https://rig.so/blog/what-is-an-mcp-server)[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)[Agent roles](https://rig.so/guides/agent-roles)[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)
- [Kong AI Gateway](https://konghq.com/products/kong-ai-gateway)
- [TrueFoundry MCP Gateway](https://www.truefoundry.com/mcp-gateway)
- [Traefik MCP Gateway](https://traefik.io/solutions/mcp-gateway)
- [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)

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

---

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