Snowflake MCP Server

A Snowflake MCP server connects AI assistants to your data warehouse. Ask business questions in plain English, and the AI writes the SQL, runs it against Snowflake, and returns the results — no writing queries, no BI tool, no waiting for the data team.

What it does

Your data warehouse holds the answers to most business questions. The problem is getting them out. Snowflake's UI is built for analysts. BI tools need dashboards pre-built. A Snowflake MCP server lets anyone ask ad-hoc questions and get immediate answers.

  • "What was our revenue by product line last quarter?" — queries the revenue tables, aggregates by product, returns a clean breakdown
  • "How does this month's churn compare to the same month last year?" — pulls historical data, calculates rates, compares
  • "Which customers have increased their usage by more than 50% in the last 90 days?" — queries usage data, calculates growth, filters
  • "Show me the data model for the sales schema" — lists tables, columns, and relationships
  • "What's the average time from first touch to closed-won?" — joins marketing and sales data, calculates the cycle

Why this matters

Most companies pay for a data warehouse they underuse. The data is there, but access is bottlenecked through a small data team or pre-built dashboards that only answer last quarter's questions.

An MCP server democratizes access. Product managers, sales leaders, and finance teams can ask their own questions without filing a ticket. The data team focuses on modeling and infrastructure instead of running ad-hoc queries.

The AI also helps with the hardest part of Snowflake queries: knowing what tables exist and how they join together. It explores the schema first, understands the relationships, then writes correct SQL.

How to set it up

Several Snowflake MCP servers are available. A common setup uses the community-built server:

{
  "mcpServers": {
    "snowflake": {
      "command": "npx",
      "args": ["-y", "snowflake-mcp-server"],
      "env": {
        "SNOWFLAKE_ACCOUNT": "your-account",
        "SNOWFLAKE_USER": "mcp_reader",
        "SNOWFLAKE_PASSWORD": "your-password",
        "SNOWFLAKE_WAREHOUSE": "COMPUTE_WH",
        "SNOWFLAKE_DATABASE": "ANALYTICS",
        "SNOWFLAKE_SCHEMA": "PUBLIC"
      }
    }
  }
}

Create a read-only role

Don't give the MCP server your admin credentials. Create a dedicated read-only role:

CREATE ROLE mcp_reader;
GRANT USAGE ON WAREHOUSE COMPUTE_WH TO ROLE mcp_reader;
GRANT USAGE ON DATABASE ANALYTICS TO ROLE mcp_reader;
GRANT USAGE ON SCHEMA ANALYTICS.PUBLIC TO ROLE mcp_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA ANALYTICS.PUBLIC TO ROLE mcp_reader;
GRANT SELECT ON FUTURE TABLES IN SCHEMA ANALYTICS.PUBLIC TO ROLE mcp_reader;

CREATE USER mcp_user PASSWORD='secure-password' DEFAULT_ROLE=mcp_reader;
GRANT ROLE mcp_reader TO USER mcp_user;

What tools are available

  • query — execute SQL and return results
  • list_databases — show available databases
  • list_schemas — show schemas within a database
  • list_tables — show tables within a schema
  • describe_table — return column definitions and types

The AI typically calls list_tables and describe_table first to understand your data model, then writes and executes the query.

Cost awareness

Snowflake charges for compute time. Every query the AI runs costs money. A few things to keep in mind:

  • Use a small warehouse (X-SMALL) for MCP queries — most ad-hoc questions don't need heavy compute
  • Set auto-suspend to 60 seconds so the warehouse shuts down between questions
  • Monitor usage — if the AI is running expensive queries, review what's being asked
  • The AI is generally good at writing efficient queries, but complex questions can generate heavy joins

Security considerations

  • Read-only role is mandatory — never give MCP write access to your data warehouse
  • Limit to specific schemas — only expose the data the AI needs to see
  • PII and sensitive data — if your warehouse contains customer PII, consider creating views that mask sensitive columns
  • Query history — Snowflake logs all queries. Review the MCP user's query history periodically.

Related guides