The Snowflake Query Integration for Claude is a Model Context Protocol (MCP) server designed to facilitate secure, read-only operations against Snowflake databases. This tool enables Claude to query Snowflake data without modifying any information, ensuring data integrity and security.
The server offers the following tools for querying Snowflake:
- list_databases: Lists all accessible Snowflake databases.
- list_views: Lists all views in a specified database and schema.
- describe_view: Provides detailed information about a specific view, including columns and SQL definition.
- query_view: Queries data from a view with an optional row limit.
- execute_query: Executes custom read-only SQL queries (SELECT only) with results formatted as markdown tables.
bash
git clone https://github.com/yourusername/mcp-server-snowflake.git
cd mcp-server-snowflakebash
uv pip install -e ..env file based on .env.example with your Snowflake credentials:env
SNOWFLAKE_ACCOUNT=youraccount.region
SNOWFLAKE_USER=your_service_account_username
SNOWFLAKE_PRIVATE_KEY_PATH=/absolute/path/to/your/rsa_key.p8
SNOWFLAKE_WAREHOUSE=your_warehouse
SNOWFLAKE_DATABASE=your_database
SNOWFLAKE_SCHEMA=your_schema
SNOWFLAKE_ROLE=your_roleAfter installation, start the server with:
uv run snowflake-mcp
uv executable:yaml
"snowflake-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/<path-to-code>/mcp-server-snowflake",
"run",
"snowflake-mcp"
]
}uv path by running which uv in your terminal.When using with Claude, you can ask questions like:
- "Can you list all the databases in my Snowflake account?"
- "List all views in the MARKETING database."
- "Describe the structure of the CUSTOMER_ANALYTICS view in the SALES database."
- "Show me sample data from the REVENUE_BY_REGION view in the FINANCE database."
- "Run this SQL query: SELECT customer_id, SUM(order_total) as total_spend FROM SALES.ORDERS GROUP BY customer_id ORDER BY total_spend DESC LIMIT 10."
- "Query the MARKETING database to find the top 5 performing campaigns by conversion rate."
⚠️ Important: Keep your .env file secure and never commit it to version control. The .gitignore file is configured to exclude it.
mypy mcp_server_snowflake/
ruff check .
ruff format .
Contributions are welcome! Please feel free to submit a Pull Request.
This project uses:
- Snowflake Connector Python for connecting to Snowflake.
- MCP (Model Context Protocol) for interacting with Claude.
- Pydantic for data validation.
- python-dotenv for environment variable management.
MCP Server for connecting to Snowflake.