snowflake-mcp
Allows querying and interacting with Snowflake databases, including executing SELECT queries, listing databases, schemas, and tables, and describing table structures.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@snowflake-mcp show the first 10 rows from the customers table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Node-based Snowflake MCP
A TypeScript-based MCP (Model Context Protocol) server that enables Large Language Models (LLMs) like Claude to directly query and interact with Snowflake databases.
๐ Features
๐ Easy Integration - Simple setup with Claude Desktop, Cursor, or any MCP-compatible tool
๐ Secure - Multiple authentication methods including environment variables and key-pair authentication
๐ High Performance - Built with TypeScript and the native Snowflake Node.js driver
๐ Full Database Access - Query, explore schemas, list tables, and analyze data
๐ ๏ธ Developer Friendly - Comprehensive TypeScript types and error handling
Related MCP server: Snowflake MCP Server
๐ Prerequisites
Node.js 18 or higher
npm or yarn
Snowflake account with appropriate access permissions
MCP-compatible client (Claude Desktop, Cursor, Continue, etc.)
๐ Quick Start
Installation Options
Option 1: Install via MCPB Package (Recommended for Claude Desktop)
The easiest way to install this MCP server in Claude Desktop is using the pre-built MCPB package:
Download the latest release:
Go to Releases
Download the
snowflake-mcp-v1.0.0.mcpbfile
Install in Claude Desktop:
Open Claude Desktop
Navigate to Settings โ Developer โ MCP Servers
Click "Install from file"
Select the downloaded
.mcpbfileConfigure your Snowflake credentials when prompted
Option 2: Build MCPB Package from Source
# Clone the repository
git clone https://github.com/patrickfreyer/mcp-server-snowflake.git
cd mcp-server-snowflake
# Install dependencies
npm install
# Build the TypeScript server
npm run build
# Create the MCPB package
./build-mcpb.sh
# The package will be created as snowflake-mcp-v1.0.0.mcpb
# Install this file in Claude Desktop as described aboveOption 3: Manual Installation (For Development)
# Clone the repository
git clone https://github.com/patrickfreyer/mcp-server-snowflake.git
cd mcp-server-snowflake
# Install dependencies
npm install
# Build the server
npm run buildConfiguration
Configuration depends on your installation method:
For MCPB Package Users
When you install the MCPB package, Claude Desktop will automatically prompt you for:
Snowflake Account (e.g.,
your-account.region.provider)Warehouse name
Username (typically your email)
Password
Role (optional)
Database (optional)
Schema (optional)
These credentials are securely stored in Claude Desktop's configuration.
For Manual Installation
Set up environment variables:
# Copy the example environment file
cp .env.example .env
# Edit .env with your Snowflake credentials
SNOWFLAKE_ACCOUNT=your-account.region.provider
SNOWFLAKE_USER=your.email@company.com
SNOWFLAKE_PASSWORD=your-password
SNOWFLAKE_WAREHOUSE=YOUR_WAREHOUSE # Optional
SNOWFLAKE_DATABASE=YOUR_DATABASE # Optional
SNOWFLAKE_SCHEMA=YOUR_SCHEMA # Optional
SNOWFLAKE_ROLE=YOUR_ROLE # OptionalConfigure your MCP client:
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"snowflake": {
"command": "node",
"args": ["/absolute/path/to/mcp-server-snowflake/dist/index.js"],
"env": {
"SNOWFLAKE_ACCOUNT": "your-account.region.provider",
"SNOWFLAKE_USER": "your.email@company.com",
"SNOWFLAKE_PASSWORD": "your-password",
"SNOWFLAKE_WAREHOUSE": "YOUR_WAREHOUSE",
"SNOWFLAKE_DATABASE": "YOUR_DATABASE",
"SNOWFLAKE_SCHEMA": "YOUR_SCHEMA",
"SNOWFLAKE_ROLE": "YOUR_ROLE"
}
}
}
}Cursor
Add to Cursor settings:
{
"mcp.servers": {
"snowflake": {
"command": "node",
"args": ["/path/to/mcp-server-snowflake/dist/index.js"],
"env": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USER": "your-user",
"SNOWFLAKE_PASSWORD": "your-password"
}
}
}
}๐ Available Tools
The MCP server provides the following tools for interacting with Snowflake:
read_query
Execute SELECT queries on your Snowflake database.
// Example
{
"query": "SELECT * FROM customers LIMIT 10"
}list_databases
List all available databases in your Snowflake account.
list_schemas
List all schemas in a specific database.
// Example
{
"database": "MY_DATABASE" // Optional
}list_tables
List all tables in a specific schema.
// Example
{
"database": "MY_DATABASE", // Optional
"schema": "MY_SCHEMA" // Optional
}describe_table
Get detailed information about a table's structure.
// Example
{
"table_name": "DATABASE.SCHEMA.TABLE"
}๐ Security
Environment Variables
The recommended approach for credentials:
export SNOWFLAKE_ACCOUNT="your-account"
export SNOWFLAKE_USER="your-user"
export SNOWFLAKE_PASSWORD="your-password"Key-Pair Authentication (Production)
For production environments, we recommend using key-pair authentication:
Generate a key pair
Configure your Snowflake user with the public key
Update the server configuration to use the private key
File Permissions
Secure your configuration files:
chmod 600 ~/.env
chmod 600 ~/Library/Application\ Support/Claude/claude_desktop_config.json๐ฆ Building MCPB Packages
The MCPB (MCP Bundle) format allows for easy distribution and installation of MCP servers in Claude Desktop.
Building a Package
# Ensure the project is built
npm run build
# Create the MCPB package
./build-mcpb.shThis will create a snowflake-mcp-v1.0.0.mcpb file containing:
Compiled server code
Manifest with configuration schema
Production dependencies
Installation metadata
Package Contents
The MCPB package includes:
manifest.json- Defines configuration parameters and server entry pointdist/- Compiled TypeScript server codenode_modules/- Production dependencies onlyREADME.md- Package documentation
Manifest Configuration
The manifest.json file defines:
User configuration parameters (without default values for security)
Server entry point and environment variable mapping
Tool definitions for Snowflake operations
Package metadata (name, version, author, etc.)
๐งช Development
Setup Development Environment
# Install dependencies
npm install
# Run in development mode
npm run dev
# Run tests
npm test
# Lint code
npm run lint
# Type check
npm run type-checkProject Structure
mcp-server-snowflake/
โโโ src/
โ โโโ index.ts # Main server implementation
โโโ dist/ # Compiled JavaScript (generated)
โโโ tests/ # Test files
โโโ .env.example # Environment variable template
โโโ .github/
โ โโโ workflows/ # CI/CD workflows
โโโ manifest.json # MCPB package configuration
โโโ build-mcpb.sh # Script to build MCPB package
โโโ package.json # Node.js dependencies
โโโ tsconfig.json # TypeScript configuration
โโโ LICENSE # MIT License
โโโ CONTRIBUTING.md # Contribution guidelines
โโโ README.md # This file๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
How to Contribute
Fork the repository
Create your feature branch (
git checkout -b feature/AmazingFeature)Commit your changes (
git commit -m 'Add some AmazingFeature')Push to the branch (
git push origin feature/AmazingFeature)Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Support
If you encounter any issues or have questions:
Check the Troubleshooting section below
Search existing issues
Create a new issue
๐ง Troubleshooting
Common Issues
"Missing required Snowflake configuration"
Ensure all required environment variables are set
Check for typos in variable names
Verify the .env file is in the correct location
Connection Failed
Verify your Snowflake account format:
account.region.providerCheck network connectivity and firewall settings
Ensure your IP is whitelisted in Snowflake network policies
Permission Denied
Verify your Snowflake role has necessary permissions
Check warehouse access rights
Ensure database and schema permissions are granted
Debug Mode
Enable verbose logging:
export DEBUG=mcp:*
node dist/index.js๐ Roadmap
Add support for write operations (INSERT, UPDATE, DELETE)
Implement connection pooling
Add support for Snowflake stored procedures
Create a web-based configuration UI
Add support for multiple Snowflake accounts
Implement query result caching
Add data visualization capabilities
๐ฅ Authors
Patrick Freyer - Initial work
๐ Acknowledgments
Anthropic for the MCP protocol specification
Snowflake for their excellent Node.js SDK
The open-source community for continuous support and contributions
๐ Stats
Made with โค๏ธ by Patrick Freyer
Available Tools
5 toolsdescribe_tableB
Get table schema information
Inputs: table_name (required).
list_databasesA
List all available databases
Inputs: no named parameters.
list_schemasB
List all schemas in a database
Inputs: database.
list_tablesB
List all tables in a schema
Inputs: database, schema.
read_queryB
Execute a SELECT query on Snowflake
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: browsing databases, schemas, tables, describing table schema, and executing SELECT queries. No overlap or ambiguity.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., list_databases, describe_table, read_query), making them predictable and easy for an agent to interpret.
With 5 tools, the server is well-scoped for exploring a Snowflake database and executing queries. The count is neither too few nor excessive.
The tools cover the core workflow of discovering database objects and querying them. Missing operations like listing views or running DDL are minor gaps, but the set feels complete for typical read-only exploration.
Maintenance
Related MCP Connectors
Query, explore, and manage your databases through natural conversation.
Query Postgres, MySQL, SQL Server, Oracle, BigQuery, ClickHouse and Redshift from your AI client.
Query BigQuery, Snowflake, Redshift & Azure Synapse with natural language
Work with your database from AI tools: ask, export, approved changes, and scheduled jobs.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables interaction with Snowflake databases through SQL queries, schema exploration, and data analysis. Supports read/write operations, table management, and automatic insight tracking for comprehensive database operations through natural language.7GPL 3.0
- AlicenseAqualityNot gradedmaintenanceEnables AI assistants to securely connect to Snowflake data warehouses and execute SQL queries through natural language interactions. Supports multiple authentication methods and provides formatted query results with built-in security controls.12MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform comprehensive Snowflake database operations including DDL, DML, and warehouse management. It allows users to query data, manage database objects, and configure permissions using natural language commands.MIT
- AlicenseAqualityDmaintenanceEnables AI agents to execute SQL queries and explore Snowflake databases using natural language, with schema discovery, table inspection, and readonly mode.11152 npmMIT