This server provides comprehensive Snowflake database integration through MCP tools for SQL execution, metadata discovery, and data analysis.
Core Capabilities:
SQL Execution - Execute arbitrary SQL queries with results in structured format or markdown, with configurable read-only mode enforcement
Metadata Discovery - List and explore warehouses, databases, schemas, tables, and views with detailed information
View Operations - Query views with row limiting, describe view structures including columns and SQL definitions
Advanced Features - Validate SQL syntax, explain query execution plans, show query history, get warehouse status, and extract sample data
Configuration & Deployment:
Flexible Configuration - Customize behavior through YAML config files with environment variable overrides, controlling logging, query limits, timeouts, and MCP features
Multiple Deployment Options - Run locally, in Docker containers, or integrate with Claude Desktop and VS Code
Advanced MCP Protocol Support - Real-time resource subscriptions, dynamic resource discovery, and comprehensive error handling
Key Tools:
execute-snowflake-sql/execute-query- SQL execution with different output formatslist-snowflake-warehouses/list-databases/list-views- Metadata explorationdescribe-view/query-view- View analysis and querying
The server supports experimental MCP features like resource subscriptions and completion support, with detailed debugging capabilities through MCP Inspector.
Supports configuration through environment variables loaded from .env files, allowing users to store Snowflake credentials and connection parameters securely.
Formats query results in Markdown format, making the data more readable and structured when displayed in supported interfaces.
Provides tools for interacting with Snowflake databases, including executing SQL queries, listing warehouses, databases, and views, describing view details, and querying views with options for read-only mode and formatted results.
Click on "Install 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., "@Simple Snowflake MCPshow me the first 10 rows from the sales_data 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.
Simple Snowflake MCP server
Enhanced Snowflake MCP Server with comprehensive configuration system and full MCP protocol compliance.
A production-ready MCP server that provides seamless Snowflake integration with advanced features including configurable logging, resource subscriptions, and comprehensive error handling. Designed to work seamlessly behind corporate proxies.
Tools
The server exposes comprehensive MCP tools to interact with Snowflake:
Core Database Operations:
execute-snowflake-sql: Executes a SQL query on Snowflake and returns the result (list of dictionaries)
execute-query: Executes a SQL query in read-only mode (SELECT, SHOW, DESCRIBE, EXPLAIN, WITH) or not (if
read_onlyis false), result in markdown formatquery-view: Queries a view with an optional row limit (markdown result)
Discovery and Metadata:
list-snowflake-warehouses: Lists available Data Warehouses (DWH) on Snowflake
list-databases: Lists all accessible Snowflake databases
list-schemas: Lists all schemas in a specified database
list-tables: Lists all tables in a database and schema
list-views: Lists all views in a database and schema
describe-table: Gives details of a table (columns, types, constraints)
describe-view: Gives details of a view (columns, SQL)
Advanced Operations:
get-table-sample: Gets sample data from a table
explain-query: Explains the execution plan of a SQL query
show-query-history: Shows recent query history
get-warehouse-status: Gets current warehouse status and usage
validate-sql: Validates SQL syntax without execution
🆕 Configuration System (v0.2.0)
The server now includes a comprehensive YAML-based configuration system that allows you to customize all aspects of the server behavior.
Configuration File Structure
Create a config.yaml file in your project root:
Using Custom Configuration
You can specify a custom configuration file using the CONFIG_FILE environment variable:
Windows:
Linux/macOS:
Configuration Override Priority
Configuration values are resolved in this order (highest to lowest priority):
Environment variables (e.g.,
LOG_LEVEL,MCP_READ_ONLY)Custom configuration file (via
CONFIG_FILE)Default
config.yamlfileBuilt-in defaults
Related MCP server: mcprouter
🚀 Installation Rapide
Méthode 1 : Installation avec uvx (Recommandé)
Méthode 2 : Installation depuis le code source
Méthode 3 : Développement
Configuration Claude Desktop
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
Docker Setup
Prerequisites
Docker and Docker Compose installed on your system
Your Snowflake credentials
Quick Start with Docker
Clone the repository
git clone <your-repo> cd simple_snowflake_mcpSet up environment variables
cp .env.example .env # Edit .env with your Snowflake credentialsBuild and run with Docker Compose
# Build the Docker image docker-compose build # Start the service docker-compose up -d # View logs docker-compose logs -f
Docker Commands
Using Docker Compose directly:
Using the provided Makefile (Windows users can use make with WSL or install make for Windows):
Docker Configuration
The Docker setup includes:
Dockerfile: Multi-stage build with Python 3.11 slim base image
docker-compose.yml: Service definition with environment variable support
.dockerignore: Optimized build context
Makefile: Convenient commands for Docker operations
Environment Variables
All Snowflake configuration can be set via environment variables:
Required:
SNOWFLAKE_USER: Your Snowflake usernameSNOWFLAKE_PASSWORD: Your Snowflake passwordSNOWFLAKE_ACCOUNT: Your Snowflake account identifier
Optional:
SNOWFLAKE_WAREHOUSE: Warehouse nameSNOWFLAKE_DATABASE: Default databaseSNOWFLAKE_SCHEMA: Default schemaMCP_READ_ONLY: Set to "TRUE" for read-only mode (default: TRUE)
Configuration System (v0.2.0):
CONFIG_FILE: Path to custom configuration file (default: config.yaml)LOG_LEVEL: Override logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
Development Mode
For development, use the development profile which mounts your source code:
This allows you to make changes to the code without rebuilding the Docker image.
Développement
Installation des dépendances
Build et Publication
Debugging avec MCP Inspector
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm with this command:
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
New Feature: Snowflake SQL Execution
The server exposes an MCP tool execute-snowflake-sql to execute a SQL query on Snowflake and return the result.
Usage
Call the MCP tool execute-snowflake-sql with a sql argument containing the SQL query to execute. The result will be returned as a list of dictionaries (one per row).
Example:
The result will be returned in the MCP response.
Installation et configuration dans VS Code
Cloner le projet et installer les dépendances
git clone https://github.com/YannBrrd/simple_snowflake_mcp cd simple_snowflake_mcp # Installer avec uv (crée automatiquement un venv) uv sync --all-extrasConfigurer l'accès Snowflake
Copier
.env.examplevers.envet remplir vos credentials :SNOWFLAKE_USER=... SNOWFLAKE_PASSWORD=... SNOWFLAKE_ACCOUNT=... # SNOWFLAKE_WAREHOUSE Optionnel: Nom du warehouse Snowflake # SNOWFLAKE_DATABASE Optionnel: Nom de la base par défaut # SNOWFLAKE_SCHEMA Optionnel: Nom du schéma par défaut # MCP_READ_ONLY=true|false Optionnel: true/false pour forcer le mode lecture seule
Configurer le serveur (v0.2.0)
Le serveur créera automatiquement un fichier
config.yamlpar défaut au premier lancementPersonnalisez le logging, les limites et les fonctionnalités MCP en éditant
config.yamlUtilisez
CONFIG_FILE=custom_config.yamlpour spécifier un fichier de configuration différent
Configurer VS Code pour le debugging MCP
Le fichier
.vscode/mcp.jsonest déjà présent :{ "servers": { "simple-snowflake-mcp": { "type": "stdio", "command": "uv", "args": ["run", "simple-snowflake-mcp"] } } }Ouvrir la palette de commandes (Ctrl+Shift+P), taper
MCP: Start Serveret sélectionnersimple-snowflake-mcp.
Utilisation
Les outils MCP exposés vous permettent d'interroger Snowflake (list-databases, list-views, describe-view, query-view, execute-query, etc.).
Pour plus d'exemples, voir la documentation du protocole MCP : https://github.com/modelcontextprotocol/create-python-server
Enhanced MCP Features (v0.2.0)
Advanced MCP Protocol Support
This server now implements comprehensive MCP protocol features:
🔔 Resource Subscriptions
Real-time notifications when Snowflake resources change
Automatic updates for database schema changes
Tool availability notifications
📋 Enhanced Resource Management
Dynamic resource discovery and listing
Detailed resource metadata and descriptions
Support for resource templates and prompts
⚡ Performance & Reliability
Configurable query limits and timeouts
Comprehensive error handling with detailed error codes
Connection pooling and retry mechanisms
🔧 Development Features
Multiple output formats (JSON, Markdown, CSV)
SQL syntax validation without execution
Query execution plan analysis
Comprehensive logging with configurable levels
MCP Capabilities Advertised
The server advertises these MCP capabilities:
✅ Tools: Full tool execution with comprehensive schemas
✅ Resources: Dynamic resource discovery and subscriptions
✅ Prompts: Enhanced prompts with resource integration
✅ Notifications: Real-time change notifications
🚧 Completion: Ready for future MCP versions (configurable)
Supported MCP Functions
The server exposes comprehensive MCP tools to interact with Snowflake:
Core Database Operations:
execute-snowflake-sql: Executes a SQL query and returns structured results
execute-query: Advanced query execution with multiple output formats
query-view: Optimized view querying with result limiting
validate-sql: SQL syntax validation without execution
Discovery and Metadata:
list-snowflake-warehouses: Lists available Data Warehouses with status
list-databases: Lists all accessible databases with metadata
list-schemas: Lists all schemas in a specified database
list-tables: Lists all tables with column information
list-views: Lists all views with definitions
describe-table: Detailed table schema and constraints
describe-view: View definition and column details
Advanced Analytics:
get-table-sample: Sample data extraction with configurable limits
explain-query: Query execution plan analysis
show-query-history: Recent query history with performance metrics
get-warehouse-status: Real-time warehouse status and usage
get-account-usage: Account-level usage statistics
For detailed usage examples and parameter schemas, see the MCP protocol documentation.
🚀 Getting Started Examples
Basic Usage
Advanced Configuration
Debugging and Troubleshooting
Enable Debug Logging:
Common Issues:
Connection errors: Check your Snowflake credentials and network connectivity
Permission errors: Ensure your user has appropriate Snowflake privileges
Query limits: Adjust
default_query_limitin config.yaml for large result setsMCP compatibility: Update to latest MCP client version for full feature support