Snowflake MCP Server
A Visual Studio Code extension that provides a Model Context Protocol (MCP) server for Snowflake data warehouses. This extension enables AI assistants like Claude to interact with your Snowflake databases through natural language queries.
Features
- 🚀 Easy Server Management: Start, stop, and restart the MCP server with simple commands
- 🔐 Secure Configuration: Store Snowflake credentials securely in VS Code settings
- 📊 Real-time Logging: Monitor server activity through the dedicated output channel
- 🔄 Auto-start Option: Automatically start the server when VS Code launches
- 🧪 Connection Testing: Verify your Snowflake configuration before use
- 🛠️ Rich Tool Set: Access to multiple Snowflake operations including:
- Database and schema exploration
- Table and column discovery
- Query execution and analysis
- Performance monitoring
- Data quality checks
- And more!
Requirements
Before using this extension, ensure you have:
- Python 3.8+ installed on your system
- Required Python packages:
pip install mcp snowflake-connector-python python-dotenv pandas
- Snowflake Account with appropriate credentials and permissions
- Snowflake Account Identifier (e.g.,
xy12345.us-east-1)
Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "Snowflake MCP Server"
- Click Install
From VSIX File
- Download the
.vsix file
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Click the "..." menu > "Install from VSIX..."
- Select the downloaded file
Configuration
After installation, configure your Snowflake connection:
- Open VS Code Settings (File > Preferences > Settings)
- Search for "Snowflake MCP"
- Configure the following settings:
Required Settings
- Account: Your Snowflake account identifier (e.g.,
xy12345.us-east-1)
- Username: Your Snowflake username
- Password: Your Snowflake password
Optional Settings
- Database: Default database to use
- Schema: Default schema to use
- Warehouse: Snowflake warehouse to use for queries
- Role: Snowflake role to assume
- Python Path: Path to Python executable (default:
python)
- Auto Start: Automatically start server on VS Code startup (default:
false)
Example Configuration (settings.json)
{
"snowflakeMCP.account": "xy12345.us-east-1",
"snowflakeMCP.username": "your_username",
"snowflakeMCP.password": "your_password",
"snowflakeMCP.database": "MY_DATABASE",
"snowflakeMCP.schema": "PUBLIC",
"snowflakeMCP.warehouse": "COMPUTE_WH",
"snowflakeMCP.role": "ANALYST",
"snowflakeMCP.autoStart": true
}
Security Note: For production use, consider storing sensitive credentials in environment variables rather than VS Code settings:
SNOWFLAKE_ACCOUNT
SNOWFLAKE_USER
SNOWFLAKE_PASSWORD
SNOWFLAKE_DATABASE
SNOWFLAKE_SCHEMA
SNOWFLAKE_WAREHOUSE
SNOWFLAKE_ROLE
Usage
Starting the Server
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run:
Snowflake MCP: Start Server
Or use the keyboard shortcut (if configured).
Available Commands
All commands are accessible via the Command Palette:
| Command |
Description |
Snowflake MCP: Start Server |
Start the MCP server |
Snowflake MCP: Stop Server |
Stop the running server |
Snowflake MCP: Restart Server |
Restart the server |
Snowflake MCP: Show Server Status |
Display current server status |
Snowflake MCP: Test Connection |
Verify Snowflake connection settings |
Monitoring
The extension provides a dedicated output channel for monitoring:
- View > Output (Ctrl+Shift+U / Cmd+Shift+U)
- Select "Snowflake MCP Server" from the dropdown
This shows:
- Server start/stop events
- Connection status
- Query execution logs
- Error messages
Once the server is running, the following tools are available through MCP-compatible AI assistants:
- ListDatabases: List all accessible databases
- ListSchemas: List schemas in a database
- ListTables: List tables in a schema
- DescribeTable: Get detailed table structure
- SearchTables: Search for tables by name pattern
- SearchColumns: Find columns across tables
- InspectSchema: Get comprehensive schema information
- GetTableSampleData: Retrieve sample rows from a table
- GetColumnStats: Get statistical information about columns
- AnalyzePerformance: Analyze query performance
- CheckDataQuality: Perform data quality checks
- GetWarehouseInfo: Get warehouse status and information
- CreateStoredProcedure: Create Snowflake stored procedures
- ProcessRequest: Execute custom SQL queries
Troubleshooting
Server Won't Start
Check Python Installation:
python --version
Should show Python 3.8 or higher
Verify Python Packages:
pip list | grep -E "mcp|snowflake|dotenv|pandas"
Check Output Channel: Look for error messages in "Snowflake MCP Server" output
Verify Python Path: Ensure snowflakeMCP.pythonPath is correctly set in settings
Connection Errors
- Test Your Credentials: Use
Snowflake MCP: Test Connection command
- Verify Account Identifier: Ensure it includes the region (e.g.,
xy12345.us-east-1)
- Check Firewall: Ensure your network allows connections to Snowflake
- Verify Permissions: Ensure your Snowflake user has necessary permissions
Common Issues
- "Module not found" errors: Install missing Python packages
- "Permission denied": Check Snowflake user permissions
- "Connection refused": Verify account identifier and network connectivity
- "Process exited with code 1": Check output channel for specific error
Development
To contribute or modify this extension:
# Clone the repository
git clone https://github.com/yourusername/snowflake-mcp-server.git
cd snowflake-mcp-server
# Install dependencies
npm install
# Open in VS Code
code .
# Press F5 to run in debug mode
Release Notes
0.0.1
- Initial release
- Basic MCP server integration
- Snowflake connection management
- 14 MCP tools for database operations
- Server lifecycle commands
- Configuration settings
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
License
This extension is licensed under the MIT License. See LICENSE file for details.
Support
Acknowledgments
This extension uses:
Enjoy using Snowflake MCP Server! 🎉
Following extension guidelines
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
Working with Markdown
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
- Split the editor (
Cmd+\ on macOS or Ctrl+\ on Windows and Linux).
- Toggle preview (
Shift+Cmd+V on macOS or Shift+Ctrl+V on Windows and Linux).
- Press
Ctrl+Space (Windows, Linux, macOS) to see a list of Markdown snippets.
Enjoy!