Snowflake MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install -r requirements.txt
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "SNOWFLAKE_USER=${SNOWFLAKE_USER}" -e "SNOWFLAKE_PASSWORD=${SNOWFLAKE_PASSWORD}" -e "SNOWFLAKE_ACCOUNT=${SNOWFLAKE_ACCOUNT}" -e "SNOWFLAKE_WAREHOUSE=${SNOWFLAKE_WAREHOUSE}" -e "SNOWFLAKE_DATABASE=${SNOWFLAKE_DATABASE}" -e "SNOWFLAKE_SCHEMA=${SNOWFLAKE_SCHEMA}" snowflake-mcp -- bash -c "<FULL_PATH_TO_SNOWFLAKE_MCP>/dist/index.js"

Replace <FULL_PATH_TO_SNOWFLAKE_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:SNOWFLAKE_USERSNOWFLAKE_PASSWORDSNOWFLAKE_ACCOUNTSNOWFLAKE_WAREHOUSESNOWFLAKE_DATABASESNOWFLAKE_SCHEMA
README.md

Interact with your Snowflake data warehouse through natural language.

Snowflake MCP Server šŸŽæ

A Model Context Protocol (MCP) server that enables Claude to interact with your Snowflake data warehouse through natural language.

🌟 What is this?

Instead of logging into Snowflake UI and writing SQL manually, simply ask Claude in natural language and let it query your data warehouse for you!

This MCP server gives Claude the ability to:

  • āœ… Execute SQL queries on Snowflake
  • āœ… List tables in your schemas
  • āœ… Describe table structures
  • āœ… Check data freshness (when tables were last updated)

How It's Different

Traditional Approach With Snowflake MCP
Open Snowflake UI → Write SQL → Run → Copy results Ask Claude → Get insights instantly
Context switching between tools Everything in one conversation
Remember exact table/column names Claude helps you discover schema
Repetitive daily checks Automate monitoring workflows

šŸ“‹ Table of Contents

šŸš€ Quick Start

See QUICKSTART.md for a 5-minute setup guide!

# 1. Clone the repo
git clone https://github.com/Legolasan/snowflake_mcp.git
cd snowflake_mcp

# 2. Install dependencies
pip install -r requirements.txt

# 3. Configure credentials
cp .env.example .env
nano .env  # Add your Snowflake credentials

# 4. Test connection
python test_connection.py

# 5. Add to Claude Code (see Configuration section)

šŸ“¦ Installation

Prerequisites

  • Python 3.8 or higher
  • Snowflake account with access credentials
  • Claude Code CLI (for MCP integration) - Get it here

Note: You do NOT need a separate Claude API key! The MCP server runs locally and only requires Snowflake credentials. See FAQ for details.

Install Dependencies

pip install -r requirements.txt

This installs:

  • mcp - Model Context Protocol SDK
  • snowflake-connector-python - Snowflake database driver
  • python-dotenv - Environment variable management

āš™ļø Configuration

1. Snowflake Credentials

Copy the example environment file:

cp .env.example .env

Edit .env with your Snowflake credentials:

SNOWFLAKE_USER=your_username
SNOWFLAKE_PASSWORD=your_password
SNOWFLAKE_ACCOUNT=abc12345.us-east-1
SNOWFLAKE_WAREHOUSE=COMPUTE_WH
SNOWFLAKE_DATABASE=PROD_DB
SNOWFLAKE_SCHEMA=PUBLIC

Finding your account identifier:

  • Your Snowflake URL: https://abc12345.us-east-1.snowflakecomputing.com
  • Your account ID: abc12345.us-east-1

āš ļø Security: Never commit .env to git! It's protected by .gitignore.

2. Claude Code MCP Configuration

Add this to your Claude Code MCP settings:

File: ~/.config/claude-code/mcp.json

Option A: Using .env file (Recommended)

{
  "mcpServers": {
    "snowflake": {
      "command": "bash",
      "args": [
        "-c",
        "source /path/to/snowflake_mcp/.env && python /path/to/snowflake_mcp/server.py"
      ]
    }
  }
}

Option B: Direct environment variables

{
  "mcpServers": {
    "snowflake": {
      "command": "python",
      "args": ["/path/to/snowflake_mcp/server.py"],
      "env": {
        "SNOWFLAKE_USER": "your_username",
        "SNOWFLAKE_PASSWORD": "your_password",
        "SNOWFLAKE_ACCOUNT": "your_account",
        "SNOWFLAKE_WAREHOUSE": "COMPUTE_WH",
        "SNOWFLAKE_DATABASE": "your_database",
        "SNOWFLAKE_SCHEMA": "PUBLIC"
      }
    }
  }
}

3. Restart Claude Code

After updating the MCP configuration, restart Claude Code to load the server.

šŸ› ļø Available Tools

1. `query_snowflake`

Execute any SQL query on Snowflake and get formatted results.

Parameters:

  • sql (required): SQL query to execute
  • limit (optional): Max rows to return (default: 100)

Example prompts:

  • "Show me the top 10 customers by revenue"
  • "How many orders were placed yesterday?"
  • "What's the average order value this month?"

2. `list_tables`

List all tables in a schema with row counts.

Parameters:

  • schema (optional): Schema name (defaults to configured schema)

Example prompts:

  • "What tables are available?"
  • "List all tables in the ANALYTICS schema"

3. `describe_table`

Get detailed structure of a table (columns, types, constraints).

Parameters:

Tools (3)

query_snowflakeExecute any SQL query on Snowflake and get formatted results.
list_tablesList all tables in a schema with row counts.
describe_tableGet detailed structure of a table (columns, types, constraints).

Environment Variables

SNOWFLAKE_USERrequiredSnowflake username
SNOWFLAKE_PASSWORDrequiredSnowflake password
SNOWFLAKE_ACCOUNTrequiredSnowflake account identifier
SNOWFLAKE_WAREHOUSErequiredSnowflake warehouse name
SNOWFLAKE_DATABASErequiredSnowflake database name
SNOWFLAKE_SCHEMArequiredSnowflake schema name

Configuration

claude_desktop_config.json
{"mcpServers": {"snowflake": {"command": "bash", "args": ["-c", "source /path/to/snowflake_mcp/.env && python /path/to/snowflake_mcp/server.py"]}}}

Try it

→Show me the top 10 customers by revenue
→How many orders were placed yesterday?
→What tables are available in the current schema?
→Describe the structure of the users table
→What's the average order value this month?

Frequently Asked Questions

What are the key features of Snowflake MCP Server?

Execute SQL queries on Snowflake via natural language. List tables in schemas with row counts. Retrieve detailed table structure including columns and types. Check data freshness for monitoring workflows.

What can I use Snowflake MCP Server for?

Automating daily data monitoring checks. Quickly exploring database schemas without manual SQL. Generating business insights from data warehouses via chat. Streamlining data analysis workflows by reducing context switching.

How do I install Snowflake MCP Server?

Install Snowflake MCP Server by running: pip install -r requirements.txt

What MCP clients work with Snowflake MCP Server?

Snowflake MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Snowflake MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare