Provides secure access to Snowflake data warehouses, enabling AI assistants to execute SQL queries, analyze data, and retrieve insights through natural language interactions with configurable security controls and authentication methods.
General-Purpose Snowflake MCP Server
A secure Model Context Protocol (MCP) server that provides AI assistants with safe, efficient access to your Snowflake data warehouse. Execute SQL queries, analyze data, and get insights through natural language interactions.
For more detail information and example usages, reference the Blog.
Key Features
š Multiple Authentication: Password, private key, and SSO support
š”ļø Security First: Environment-based config, no hard-coded credentials
ā” Performance Optimized: Configurable limits and efficient query execution
š Smart Error Handling: Detailed messages with troubleshooting guidance
š Rich Query Results: Formatted tables with metadata and row counts
š§ AI-Ready: Natural language to SQL through MCP protocol
šļø Universal Compatibility: Works with any MCP-compatible AI client
Quick Start
1. Install
2. Configure
3. Test
Configuration
Environment Variables
Required:
Authentication (choose one):
Optional:
Private Key Setup (Recommended)
Generate key pair:
Add public key to Snowflake:
AI Tool Integration
Connect the MCP server to your AI assistant for natural language database interactions.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Cursor
Option 1: Project-specific in Cursor Settings ā Tools & Integration ā MCP tools
Option 2: Global config in ~/.cursor/mcp.json
Example Usage
Once connected, you can interact with your Snowflake data using natural language:
The server handles:
Query execution with proper formatting and metadata
Error handling with helpful troubleshooting suggestions
Security logging for dangerous operations
Performance limits to prevent resource exhaustion
Security Best Practices
ā ļø IMPORTANT SECURITY NOTICE: This server executes raw SQL queries on your Snowflake instance. Always follow these security practices:
Use private key authentication instead of passwords
Create dedicated Snowflake user with minimal permissions:
Secure private keys:
chmod 600 /path/to/rsa_key.p8Use environment variables - never hard-code credentials
Use project-specific configurations for sensitive environments
ā ļø SQL Injection Risk: This server executes any SQL query provided by AI assistants. Ensure:
Your Snowflake user has minimal required permissions
No admin or elevated privileges for the MCP user
Consider using read-only access for sensitive environments
Monitor query logs for unexpected operations
Network Security: Ensure proper firewall rules and VPN access if required
Troubleshooting
Common Issues
Environment Variables Not Set:
Check
.envfile format (no quotes, no spaces around=)Set variables in shell profile for global access
Connection Errors:
Verify account identifier format (include region if needed)
Check network connectivity and warehouse status
Verify credentials and permissions
Authentication Failures:
For private key: Ensure public key is set in Snowflake
For SSO: Test browser login first
Check if user account is locked
Path Issues:
Use absolute paths in configuration files
Verify paths with
which uvorwhich python
Debug Mode
Server Logs:
Client Logs:
Claude Desktop:
~/Library/Logs/Claude/mcp*.logCursor: Output panel ā "MCP Logs"
License
MIT License - see LICENSE file for details.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables 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.