snowflake-mcp
Enables AI agents to execute SQL queries against Snowflake databases, supporting schema discovery, table inspection, query execution with safety features, and multiple output formats.
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-mcpShow me the top 5 customers by sales this year"
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 MCP Server
A Model Context Protocol (MCP) server that enables AI agents to execute SQL queries against Snowflake databases.
Users can use natural language to query Snowflake databases, like:
"Get me the top 10 products by revenue"
"Show me the total revenue for the last 30 days"
"Describe the structure of the orders table"
"Explore the database and summarize what data is available"
"Build a query to find customers who haven't ordered in 90 days"
Features
Execute SQL queries directly from AI agents like Cursor, Claude Desktop, etc.
Schema Discovery: Browse databases, schemas, tables, and views
Table Inspection: Describe table structures, view sample data, check row counts
Query Safety: Readonly mode, row limits, and query timeouts
Multiple Output Formats: Table, JSON, or CSV
Query Explanation: Get execution plans for queries
MCP Prompts: Guided workflows for common tasks
Support for both password and SSO (browser-based) authentication
Configurable default warehouse, database, schema, and role
Prerequisites
Node.js 18 or later
Usage
Cursor
Add to your Cursor MCP settings (~/.cursor/mcp.json):
SSO Authentication (Recommended)
{
"mcpServers": {
"snowflake": {
"command": "npx",
"args": ["-y", "snowflake-mcp"],
"env": {
"SNOWFLAKE_ACCOUNT": "your-org-your-account",
"SNOWFLAKE_USERNAME": "your-username",
"SNOWFLAKE_AUTHENTICATOR": "externalbrowser",
"SNOWFLAKE_WAREHOUSE": "your-warehouse",
"SNOWFLAKE_DATABASE": "your-database",
"SNOWFLAKE_SCHEMA": "your-schema"
}
}
}
}A browser window will open for authentication on first query.
Password Authentication
{
"mcpServers": {
"snowflake": {
"command": "npx",
"args": ["-y", "snowflake-mcp"],
"env": {
"SNOWFLAKE_ACCOUNT": "your-org-your-account",
"SNOWFLAKE_USERNAME": "your-username",
"SNOWFLAKE_PASSWORD": "your-password",
"SNOWFLAKE_ROLE": "your-role",
"SNOWFLAKE_WAREHOUSE": "your-warehouse",
"SNOWFLAKE_DATABASE": "your-database",
"SNOWFLAKE_SCHEMA": "your-schema",
"SNOWFLAKE_READONLY": "true"
}
}
}
}Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"snowflake": {
"command": "npx",
"args": ["-y", "snowflake-mcp"],
"env": {
"SNOWFLAKE_ACCOUNT": "your-org-your-account",
"SNOWFLAKE_USERNAME": "your-username",
"SNOWFLAKE_AUTHENTICATOR": "externalbrowser"
}
}
}
}Configuration
Variable | Required | Default | Description |
| Yes | - | Your Snowflake account identifier (e.g., |
| Yes | - | Snowflake username |
| No |
| Authentication method: |
| Conditional | - | Required if authenticator is |
| No | - | Role to use for the session (uses account default if not set) |
| No | - | Warehouse to use (uses account default if not set) |
| No | - | Database to use (uses account default if not set) |
| No | - | Schema to use (uses account default if not set) |
| No |
| Set to |
Finding Your Connection Settings
You can find your connection settings in Snowsight (Snowflake's web interface):
Sign in to Snowsight
Click on your username in the bottom-left corner to open the user menu
Select Connect a tool to Snowflake
Open the
Config FiletabSelect the Warehouse, Database, Schema you want to use
Copy values from the generated config file
Available Tools
Query Execution
execute_query
Execute a SQL query against Snowflake.
Parameter | Type | Required | Default | Description |
| string | Yes | - | The SQL query to execute |
| number | No | 100 | Maximum number of rows to return |
| number | No | - | Query timeout in seconds |
| string | No | table | Output format: |
explain_query
Get the execution plan for a SQL query without running it.
Parameter | Type | Required | Description |
| string | Yes | The SQL query to explain |
Connection
test_connection
Test the connection to Snowflake and return connection info including current user, role, warehouse, database, schema, and version.
Schema Discovery
list_databases
List all accessible databases in Snowflake.
list_schemas
List all schemas in a database.
Parameter | Type | Required | Description |
| string | No | Database name (uses current if not specified) |
list_tables
List all tables in a schema.
Parameter | Type | Required | Description |
| string | No | Database name |
| string | No | Schema name |
list_views
List all views in a schema.
Parameter | Type | Required | Description |
| string | No | Database name |
| string | No | Schema name |
Table Inspection
describe_table
Get detailed information about a table's structure including columns, types, and constraints.
Parameter | Type | Required | Description |
| string | Yes | Table name (can include database.schema.table) |
get_table_sample
Get a sample of rows from a table to understand its data.
Parameter | Type | Required | Default | Description |
| string | Yes | - | Table name |
| number | No | 5 | Number of sample rows to return |
get_table_row_count
Get the total number of rows in a table.
Parameter | Type | Required | Description |
| string | Yes | Table name |
get_primary_keys
Get primary key columns for a table.
Parameter | Type | Required | Description |
| string | Yes | Table name |
MCP Resources
schema://current
Returns information about the current database schema, including:
Current database and schema names
List of all tables
List of all views
Access this resource to get a quick overview of the connected schema without running queries.
MCP Prompts
analyze_table
Analyze a table's structure, sample data, and get query suggestions.
Parameter | Type | Required | Description |
| string | Yes | The table to analyze |
explore_database
Explore and summarize the structure of a database.
Parameter | Type | Required | Description |
| string | No | Database to explore (uses current if not specified) |
query_builder
Help build a SQL query based on natural language description.
Parameter | Type | Required | Description |
| string | Yes | Natural language description of desired query |
| string | No | Comma-separated list of relevant tables |
Security Considerations
SSO authentication is recommended for production use as it avoids storing passwords in configuration files
Readonly mode (
SNOWFLAKE_READONLY=true) is recommended when you only need to query dataNever commit configuration files containing credentials to version control
Consider using environment variables or a secrets manager for sensitive values
The server executes queries with the permissions of the configured Snowflake user—ensure appropriate access controls are in place
The
max_rowsparameter helps prevent accidentally returning massive result sets
License
MIT License
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.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/faressoft/snowflake-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server