Provides comprehensive tools for managing Snowflake database objects, performing DDL/DML operations, and controlling warehouse settings and privileges.
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., "@Snowflake Developer MCP Serverlist the top 10 most recent records from the sales 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.
Snowflake Developer MCP Server π
A powerful Model Context Protocol (MCP) server that provides comprehensive Snowflake database operations, Cortex AI services, and data management tools for AI assistants like Claude.
π Features
π§ DDL Operations: Create and manage databases, schemas, tables, and other database objects
π DML Operations: Insert, update, delete, and query data with full SQL support
βοΈ Snowflake Operations: Manage warehouses, grants, roles, and show database objects
π Secure Authentication: Support for passwords and Programmatic Access Tokens (PAT)
π― Simple Connection Pattern: Per-operation connections for reliability and simplicity
π Quick Start
Prerequisites
Python 3.11+
UV package manager (install from https://github.com/astral-sh/uv)
Node.js and npm (for MCP inspector)
Snowflake account with appropriate permissions
Snowflake credentials (account identifier, username, password/PAT)
Installation
Clone the repository
git clone https://github.com/mcp-tg/snowflake-developer.git cd snowflake-developerSet up environment
# Copy environment template cp .env.example .env # Edit .env with your Snowflake credentials # Required: SNOWFLAKE_ACCOUNT, SNOWFLAKE_USER, SNOWFLAKE_PAT (or SNOWFLAKE_PASSWORD)Install UV (if not already installed)
# On macOS/Linux curl -LsSf https://astral.sh/uv/install.sh | sh # On Windows powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
π§ͺ Testing with MCP Inspector
The easiest way to test your setup is using the MCP Inspector:
# Run the development inspector script
./dev-inspector.shThis will:
β Create a virtual environment (if needed)
β Install all dependencies via UV
β Load your Snowflake credentials from .env
β Start the MCP Inspector web interface
β Open your browser to test tools interactively
Note: The script automatically handles UV package installation, so you don't need to manually install dependencies.
First Test: Verify Connection
In the Inspector, go to the Tools tab
Find
test_snowflake_connectionand click RunYou should see your account details and confirmation that the connection works
π Integration with AI Assistants
Claude Desktop
Option 1: Direct from GitHub (no local clone needed)
{
"mcpServers": {
"snowflake-developer": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/mcp-tg/snowflake-developer.git",
"main.py"
],
"env": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USER": "your-username",
"SNOWFLAKE_PAT": "your-pat-token"
}
}
}
}Option 2: Local installation
{
"mcpServers": {
"snowflake-developer": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/snowflake-developer",
"python",
"main.py"
],
"env": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USER": "your-username",
"SNOWFLAKE_PAT": "your-pat-token"
}
}
}
}Setup Instructions:
Clone the repository:
git clone https://github.com/mcp-tg/snowflake-developer.gitCreate the Claude Desktop config file:
~/Library/Application Support/Claude/claude_desktop_config.json(macOS)Add the configuration above, replacing
/path/to/snowflake-developerwith your actual pathReplace credential placeholders with your actual Snowflake credentials
Restart Claude Desktop
Cursor
Note: Cursor doesn't support environment variables in MCP configuration. You'll need to use the local installation option or set environment variables globally on your system.
Option 1: Direct from GitHub (requires global env vars)
{
"mcpServers": {
"snowflake-developer": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/mcp-tg/snowflake-developer.git",
"main.py"
]
}
}
}Requires setting SNOWFLAKE_ACCOUNT, SNOWFLAKE_USER, and SNOWFLAKE_PAT as system environment variables.
Option 2: Local installation (recommended for Cursor)
{
"mcpServers": {
"snowflake-developer": {
"command": "uv",
"args": ["run", "/path/to/snowflake-developer/main.py"]
}
}
}Use a local .env file in the project directory with your credentials.
π Available Tools (22 Total)
π§ DDL Tools (8 Tools)
Tools for managing database structure:
Tool | Description | Example in Inspector | Natural Language Query |
| Rename databases | database_name: new_name: | "Rename database OLD_DB to NEW_DB" |
| Rename or move schemas | schema_name: new_name: | "Rename OLD_SCHEMA to NEW_SCHEMA in TEST_DB" |
| Modify table structure | table_name: alter_type: column_name: data_type: | "Add a created_at timestamp column to TEST_DB.PUBLIC.USERS table" |
| Create a new database | database_name: | "Create a new database called TEST_DB" |
| Create a schema in a database | database_name: schema_name: | "Create a schema named ANALYTICS in TEST_DB database" |
| Create a table with columns | database_name: schema_name: table_name: columns: | "Create a USERS table in TEST_DB.PUBLIC with id as INT and email as VARCHAR(255)" |
| Drop any database object | object_type: object_name: | "Drop the table TEST_DB.PUBLIC.OLD_TABLE" |
| Run custom DDL SQL | ddl_statement: | "Create a view called ACTIVE_USERS that shows only active users" |
π DML Tools (6 Tools)
Tools for working with data:
Tool | Description | Example in Inspector | Natural Language Query |
| Delete rows from a table | table_name: where_clause: | "Delete all users with status 'deleted'" |
| Run custom DML SQL | dml_statement: | "Update the last login timestamp for user with id 1" |
| Insert rows into a table | table_name: data: | "Insert a new user with id 1, email john@example.com, and name John Doe into the USERS table" |
| Synchronize data between tables | target_table: source_table: merge_condition: match_actions: not_match_actions: | "Merge new users from staging table into production users table, updating existing records and inserting new ones" |
| Query data from tables | table_name: columns: where_clause: limit: | "Show me the first 10 active users with their id, email, and name" |
| Update existing rows | table_name: data: where_clause: | "Set status to inactive for all users who haven't logged in since January 2023" |
βοΈ Snowflake Operations Tools (8 Tools)
Tools for Snowflake-specific operations:
Tool | Description | Example in Inspector | Natural Language Query |
| Modify warehouse settings | warehouse_name: warehouse_size: auto_suspend: | "Change COMPUTE_WH to MEDIUM size and auto-suspend after 5 minutes" |
| Get object details | object_name: | "Describe the structure of TEST_DB.PUBLIC.USERS table" |
| Run any SQL query | query: | "Show me my current user and warehouse" |
| Grant permissions | privileges: on_type: on_name: to_type: to_name: | "Grant SELECT and INSERT on TEST_DB.PUBLIC.USERS table to ANALYST_ROLE" |
| Revoke permissions | privileges: on_type: on_name: from_type: from_name: | "Revoke SELECT on TEST_DB.PUBLIC.USERS table from ANALYST_ROLE" |
| Set database/schema/warehouse/role | context_type: context_name: | "Use TEST_DB as the current database" |
| List database objects | object_type: | "Show me all databases" |
| Test connection to Snowflake | (no parameters) | "Test my Snowflake connection" |
ποΈ Architecture
The server uses a simple per-operation connection pattern:
Each tool/resource call creates a fresh Snowflake connection
Connections are automatically closed after each operation
No connection pooling or persistence required
Credentials are read from environment variables
π‘οΈ Security Best Practices
Use Programmatic Access Tokens (PAT) instead of passwords when possible
Never commit
.envfiles to version controlUse least-privilege roles for your Snowflake user
Rotate credentials regularly
Consider using external secret management for production
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Troubleshooting
Connection Issues
Verify your account identifier format
Check that your user has appropriate permissions
Ensure your PAT token hasn't expired
Test network connectivity to Snowflake
Tool Errors
Check the error message in the Inspector console
Verify required parameters are provided
Ensure database objects exist before referencing them
Check SQL syntax for custom statements
π FastMCP Framework
This MCP server is built using FastMCP, a modern Python framework that simplifies building Model Context Protocol servers. FastMCP provides:
Why FastMCP?
π― Simple API: Decorator-based tool and resource registration
β‘ High Performance: Async/await support with efficient message handling
π§ Type Safety: Full TypeScript-style type hints and validation
π Auto Documentation: Automatic tool/resource documentation generation
π‘οΈ Error Handling: Built-in exception handling and response formatting
π MCP Compliance: Full compatibility with MCP protocol specification
FastMCP vs Traditional MCP
# Traditional MCP server setup
class MyMCPServer:
def __init__(self):
self.tools = {}
def register_tool(self, name, handler, schema):
# Manual registration and validation
pass
# FastMCP - Clean and Simple
from fastmcp import FastMCP
mcp = FastMCP("MyServer")
@mcp.tool()
def my_tool(param: str) -> str:
"""Tool with automatic type validation and documentation."""
return f"Result: {param}"
@mcp.resource("my://resource/{id}")
async def my_resource(id: str, ctx: Context) -> dict:
"""Resource with built-in async support and context."""
return {"data": f"Resource {id}"}Key FastMCP Features Used
Decorator Registration: Tools are registered using simple decorators
Type Validation: Automatic parameter validation using Python type hints
Context Management: Built-in context for progress reporting and logging
Resource Patterns: URI template matching for dynamic resource endpoints
Error Handling: Automatic exception catching and standardized error responses
FastMCP Installation
# Install FastMCP
pip install fastmcp
# Or with UV (recommended)
uv add fastmcpLearning FastMCP
Official Docs: FastMCP Documentation
Examples: Browse FastMCP example servers in the repository
TypeScript MCP SDK: MCP TypeScript SDK
π Additional Resources
Snowflake Resources
MCP Protocol & Tools
Development Tools
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.