home / mcp / local-snowflake-mcp-server

Local-Snowflake-MCP-Server

Provides an MCP server that lets Claude Desktop query Snowflake with natural-language SQL.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "asingh49-cmd-local-snowflake-mcp-server": {
      "command": "python",
      "args": [
        "server/snowflake_mcp_server.py"
      ],
      "env": {
        "SF_DB": "database_name",
        "SF_WH": "warehouse_name",
        "SF_USER": "username",
        "SF_SCHEMA": "schema_name",
        "SF_ACCOUNT": "account_name",
        "SF_PASSWORD": "password"
      }
    }
  }
}

You run a local MCP server that lets Claude Desktop talk to a Snowflake database using natural-language SQL. It keeps data access secure on your machine, translating your plain-language requests into SQL queries and returning results back to you. This setup enables rapid, AI-assisted data exploration without exposing credentials or external services.

How to use

Use the local MCP server as your bridge between Claude Desktop and Snowflake. You type natural-language questions or requests, and the server converts them into valid Snowflake SQL, executes them, and returns results. Common workflows include listing tables, inspecting schema details, fetching rows from a table, and asking for explanations or optimizations of a given SQL query.

How to install

Prerequisites: Python 3.x and pip must be available on your system.

Step 1: Clone the project repository.

git clone https://github.com/asingh49-cmd/local-snowflake-mcp-server.git

Step 2: Install dependencies.

pip install -r server/requirements.txt

Step 3: Create environment configuration for Snowflake access.

Create a file named .env with the following keys filled with your Snowflake credentials and preferences.

SNOWFLAKE_USER=your_user SNOWFLAKE_PASSWORD=your_password SNOWFLAKE_ACCOUNT=your_account SNOWFLAKE_WAREHOUSE=your_wh SNOWFLAKE_DATABASE=your_db SNOWFLAKE_SCHEMA=your_schema

Step 4: Run the MCP server.

python server/snowflake_mcp_server.py

Expected output indicates the server is ready to accept Claude Desktop connections.

Step 5: Configure Claude Desktop to connect to the local MCP server.

Add a block that points to the local stdio MCP server (see example below) and restart Claude so the tool appears automatically.

Example MCP connection configuration for Claude Desktop

{
  "mcpServers": {
    "snowflake": {
      "command": "python",
      "args": [
        "server/snowflake_mcp_server.py"
      ],
      "env": {
        "SF_ACCOUNT": "account_name",
        "SF_USER": "username",
        "SF_PASSWORD": "password",
        "SF_WH": "warehouse_name",
        "SF_DB": "database_name",
        "SF_SCHEMA": "schema_name"
      },
      "autoStart": true
    }
  }
}

Available tools

run_query

Executes a SQL query against the Snowflake database and returns the result set.

explain_query

Analyzes a given SQL query text and explains its purpose, performance, and potential optimizations.

show_rows

Retrieves a specified number of rows from a table or query result.

create_table

Creates a new table with a given schema and optional initial data.