Home / MCP / Snowflake MCP Server

Snowflake MCP Server

Provides Claude access to Snowflake databases with automatic connection management and safe query execution.

python
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "snowflake": {
            "command": "C:\\\\Users\\\\K\\\\anaconda3\\\\envs\\\\regular310\\\\python.exe",
            "args": [
                "D:\\\\tools\\\\mcp-snowflake\\\\server.py"
            ],
            "env": {
                "SNOWFLAKE_USER": "your_username",
                "SNOWFLAKE_PASSWORD": "your_password",
                "SNOWFLAKE_ACCOUNT": "NRB18479.US-WEST-2",
                "SNOWFLAKE_DATABASE": "your_database",
                "SNOWFLAKE_WAREHOUSE": "your_warehouse"
            }
        }
    }
}

This MCP server lets Claude access Snowflake databases through a dedicated Model Context Protocol connection. It handles automatic database connections, safely executes queries, and returns results or errors to Claude, so you can query Snowflake data from your Claude workflows with minimal setup.

How to use

You connect Claude to Snowflake via a local MCP server. The Claude Desktop client will manage the MCP server lifecycle for you, and you can start issuing SQL queries against Snowflake once the server is running. If you need to test things manually, you can start the server on its own to verify the connection and query flow.

How to install

# Prerequisites: Node.js for Smithery (optional) and Python for development

# Option A: Install via Smithery (automatic via Claude client)
npx -y @smithery/cli install @datawiz168/mcp-service-snowflake --client claude
# Option B: Manual installation

# 1. Clone the repository
git clone https://github.com/datawiz168/mcp-snowflake-service.git

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

Additional configuration and usage notes

Configure the MCP client to load the Snowflake MCP server. Create or edit your Claude Desktop configuration to include the Snowflake MCP server entry.

{
  "mcpServers": {
    "snowflake": {
      "command": "C:\\Users\\K\\anaconda3\\envs\\regular310\\python.exe",
      "args": ["D:\\tools\\mcp-snowflake\\server.py"]
    }
  }
}

Snowflake configuration

SNOWFLAKE_USER=your_username
SNOWFLAKE_PASSWORD=your_password
SNOWFLAKE_ACCOUNT=NRB18479.US-WEST-2
SNOWFLAKE_DATABASE=your_database
SNOWFLAKE_WAREHOUSE=your_warehouse

Connection management

The server automatically manages the database connection lifecycle: it creates the connection when the first query arrives, maintains the connection and reconnects on timeout, and closes the connection when the server stops.

Usage flow

Normal operation starts when Claude Desktop loads the Snowflake MCP server configuration. You can rely on automatic startup and shutdown managed by the Claude client. For development testing, you can start the server manually with Python to verify behavior.

python server.py

Security and access control

Access to Snowflake is controlled through the Snowflake user accounts you provide in the environment file. If you only need read access, assign a user with read-only permissions.

Notes on development and contribution

If you plan to contribute code or report issues, follow standard development practices for Python projects. Ensure any changes are tested with your Claude setup and Snowflake environment.

Notes on environment and troubleshooting

Keep the Snowflake credentials secure. Store them in a .env file at the project root and avoid exposing them in version control. If you encounter connection issues, verify network access to Snowflake and confirm that the Snowflake account, database, and warehouse names are correct.

Available tools

executeQuery

Executes a SQL query against the connected Snowflake database and returns the results or an error.

manageConnection

Automatically initializes, maintains, and reconnects the Snowflake connection as needed.

handleResults

Processes query results and converts them into a format suitable for Claude.

performDatabaseOps

Performs safe database operations with proper error handling and resource management.