MCP Snowflake Server NSP
You can use this MCP Snowflake server to inspect Snowflake metadata, run read-only SELECT queries, and record insights.
List all available databases.
List schemas in a specified database.
List tables in a specified database and schema.
Describe a table’s schema using a fully qualified
database.schema.tablename.Execute
SELECTqueries.Append discovered insights to the memo resource.
Note: write/create tools are not exposed in this schema and are disabled by default.
Connect AI assistants to Snowflake — enabling SQL queries, schema exploration, and data insights directly from your LLM client.
•
•
•
•
Test |
|
Lint |
|
Meta |
|
Security |
|
Best Practices |
|
Documentation |
Snowflake MCP Server NSP
A Model Context Protocol (MCP) server / MCP server that connects AI assistants to Snowflake — enabling SQL queries, schema exploration, and data insights directly from your LLM client.
Highlights:
Multiple authentication methods: password, key-pair, external browser, OAuth 2.0 (client credentials & bearer token), TOML connection files
TOML multi-connection config — manage
production,staging, anddevelopmentenvironments in one fileWrite tools are disabled by default;
read_queryapplies a conservative SQL filterExclusion patterns — filter out databases, schemas, or tables from discovery
--exclude-json-resultsflag — reduces LLM context window usageSelective tool exclusion via
--exclude_toolsPrefetch mode — pre-load table schema as MCP resources
Docker support with hardened image (DHI, nonroot user, no shell in runtime)
Table of Contents
Related MCP server: CentralMind/Gateway
Quick Start
The fastest way to try it — using uvx with a TOML connection file:
# 1. Create a connections file
cat > ~/snowflake_connections.toml << 'EOF'
[myconn]
account = "your_account"
user = "your_user"
password = "your_password"
warehouse = "COMPUTE_WH"
database = "MY_DB"
schema = "PUBLIC"
role = "MYROLE"
EOF
# 2. Run the server
uvx --python=3.13 --from mcp-snowflake-server-nsp mcp_snowflake_server \
--connections-file ~/snowflake_connections.toml \
--connection-name myconnClaude Code
Add to your MCP client config (e.g. claude_desktop_config.json) using snowflake_connections.toml:
"mcpServers": {
"snowflake": {
"command": "uvx",
"args": [
"--python=3.13",
"--from", "mcp-snowflake-server-nsp",
"mcp_snowflake_server",
"--connections-file", "/absolute/path/to/snowflake_connections.toml",
"--connection-name", "myconn"
]
}
}Visual Studio Code (VSCode)
uvx —
Docker —
Or add manually to your MCP client config (e.g. .vscode/mcp.json) using .env file (see Authentication):
"snowflake": {
// Snowflake MCP server
"type": "stdio",
"command": "uvx",
"args": [
"--from", "mcp-snowflake-server-nsp",
"--python=3.13",
"mcp_snowflake_server"
],
"envFile": "${workspaceFolder}/.env"
}OpenCode
Add to your MCP client config (e.g. opencode.jsonc) with .env file (see Authentication):
"snowflake": {
"type": "local",
"command": [
"uvx",
"--from",
"mcp-snowflake-server-nsp",
"--python=3.13",
"mcp_snowflake_server",
],
"enabled": true,
"timeout": 300000,
}Components
Resources
URI | Description |
| A continuously updated memo aggregating data insights appended via |
| (Prefetch mode only) Per-table schema summaries including columns and comments. |
Tools
Query Tools
Tool | Description | Requires |
| Execute | — |
| Execute |
|
| Execute |
|
read_query accepts one SELECT statement, including SELECT CTEs, and only the
unqualified built-in functions listed in READ_FUNCTIONS in
write_detector.py. Unknown,
qualified, quoted, and dynamically resolved function calls are rejected, as are
sequence NEXTVAL references. This policy also applies when --allow_write is set.
Some legitimate queries and UDFs therefore require a different access path.
Security: The SQL filter is defense in depth, not a security boundary or a
guarantee that a SELECT has no side effects. sqlparse does not validate
Snowflake SQL, and functions or views may execute behavior not visible in the
query. Use a dedicated Snowflake identity with only the required read privileges;
review all granted and secondary roles, function and view permissions, and stage
access. Do not grant write or administrative privileges to a read-only identity.
Snowflake can still permit users to cancel their own queries and consume compute.
Before deployment, verify the identity's effective grants and active secondary
roles in Snowflake, and test the policy with a dedicated least-privilege account.
Schema Tools
Tool | Description | Input |
| List all databases in the Snowflake instance. | — |
| List all schemas within a database. |
|
| List all tables within a database and schema. |
|
| Describe columns of a table (name, type, nullability, default, comment). |
|
Analysis Tools
Tool | Description | Input |
| Add a data insight to the |
|
Authentication
Password
Set credentials via environment variables or CLI flags (see Configuration Reference):
SNOWFLAKE_USER="user@example.com"
SNOWFLAKE_ACCOUNT="myaccount"
SNOWFLAKE_AUTHENTICATOR="snowflake"
SNOWFLAKE_PASSWORD="secret"
SNOWFLAKE_WAREHOUSE="COMPUTE_WH"
SNOWFLAKE_DATABASE="MY_DB"
SNOWFLAKE_SCHEMA="PUBLIC"
SNOWFLAKE_ROLE="MYROLE"Key-Pair
Both RSA (RS256) and ECDSA (ES256, ES384, ES512) private keys are supported (requires snowflake-connector-python ≥ 4.5.0 for ECDSA).
SNOWFLAKE_USER="user@example.com"
SNOWFLAKE_ACCOUNT="myaccount"
SNOWFLAKE_AUTHENTICATOR="snowflake_jwt"
SNOWFLAKE_PRIVATE_KEY_FILE="/absolute/path/to/key.p8"
SNOWFLAKE_PRIVATE_KEY_FILE_PWD="passphrase" # Optional — only if key is encrypted
SNOWFLAKE_WAREHOUSE="COMPUTE_WH"
SNOWFLAKE_DATABASE="MY_DB"
SNOWFLAKE_SCHEMA="PUBLIC"
SNOWFLAKE_ROLE="MYROLE"Or via CLI: --private_key_file /path/to/key.p8 --private_key_file_pwd passphrase
External Browser
SNOWFLAKE_AUTHENTICATOR="externalbrowser"Or in a TOML connection entry: authenticator = "externalbrowser"
OAuth 2.0 Client Credentials
Use the OAuth 2.0 client credentials flow to authenticate with a client ID and secret (no user interaction required):
SNOWFLAKE_AUTHENTICATOR="oauth_client_credentials"
SNOWFLAKE_ACCOUNT="myaccount"
SNOWFLAKE_OAUTH_CLIENT_ID="your_client_id"
SNOWFLAKE_OAUTH_CLIENT_SECRET="your_client_secret"
SNOWFLAKE_OAUTH_TOKEN_REQUEST_URL="https://your-idp.example.com/oauth/token"
SNOWFLAKE_OAUTH_SCOPE="session:role:MY_ROLE" # Optional
SNOWFLAKE_WAREHOUSE="COMPUTE_WH"
SNOWFLAKE_DATABASE="MY_DB"
SNOWFLAKE_SCHEMA="PUBLIC"
SNOWFLAKE_ROLE="MYROLE"OAuth Bearer Token
Use a pre-fetched OAuth bearer token:
SNOWFLAKE_AUTHENTICATOR="oauth"
SNOWFLAKE_ACCOUNT="myaccount"
SNOWFLAKE_TOKEN="eyJhbGciOiJSUzI1NiJ9..."
SNOWFLAKE_WAREHOUSE="COMPUTE_WH"
SNOWFLAKE_DATABASE="MY_DB"
SNOWFLAKE_SCHEMA="PUBLIC"
SNOWFLAKE_ROLE="MYROLE"TOML Connection File (Recommended)
Manage multiple environments in a single file. See example_connections.toml for a full template.
[production]
account = "your_account"
user = "your_user"
password = "your_password"
authenticator = "snowflake"
warehouse = "COMPUTE_WH"
database = "PROD_DB"
schema = "PUBLIC"
role = "PROD_READ_ROLE"
[development]
account = "your_account"
user = "dev_user"
authenticator = "externalbrowser"
warehouse = "DEV_WH"
database = "DEV_DB"
schema = "PUBLIC"
role = "DEVELOPER"
[reporting]
account = "your_account"
user = "reporting_user"
authenticator = "snowflake_jwt"
private_key_file = "/path/to/private_key.pem"
private_key_file_pwd = "passphrase" # Optional
warehouse = "REPORTING_WH"
database = "REPORTING_DB"
schema = "REPORTS"
role = "REPORTING_ROLE"
[analytics_oauth]
account = "your_account"
authenticator = "oauth_client_credentials"
oauth_client_id = "your_client_id"
oauth_client_secret = "your_client_secret"
oauth_token_request_url = "https://your-idp.example.com/oauth/token"
oauth_scope = "session:role:ANALYTICS_ROLE" # Optional
warehouse = "ANALYTICS_WH"
database = "ANALYTICS_DB"
schema = "PUBLIC"
role = "ANALYTICS_ROLE"Pass the file with --connections-file and select a profile with --connection-name. Both flags are required together.
Installation
The package is published on PyPI as mcp-snowflake-server-nsp.
Contributing or running from source? See
CONTRIBUTING.mdfor local development setup, test commands, formatting, and building the Docker image from source.
Via UVX
"mcpServers": {
"snowflake_production": {
"command": "uvx",
"args": [
"--python=3.13",
"--from", "mcp-snowflake-server-nsp",
"mcp_snowflake_server",
"--connections-file", "/path/to/snowflake_connections.toml",
"--connection-name", "production"
// Optional flags — see Configuration Reference
]
},
"snowflake_staging": {
"command": "uvx",
"args": [
"--python=3.13",
"--from", "mcp-snowflake-server-nsp",
"mcp_snowflake_server",
"--connections-file", "/path/to/snowflake_connections.toml",
"--connection-name", "staging"
]
}
}"mcpServers": {
"snowflake": {
"command": "uvx",
"args": [
"--python=3.13",
"--from", "mcp-snowflake-server-nsp",
"mcp_snowflake_server",
"--account", "your_account",
"--warehouse", "your_warehouse",
"--user", "your_user",
"--password", "your_password",
"--role", "your_role",
"--database", "your_database",
"--schema", "your_schema"
// Optional: "--private_key_file", "/absolute/path/key.p8"
// Optional: "--private_key_file_pwd", "passphrase"
// Optional flags — see Configuration Reference
]
}
}Via Docker Hub
The image is published on Docker Hub — no build step required:
docker pull nsphung/mcp-snowflake-server-nspNote:
-i(--interactive) is required to keep stdin open for the MCP stdio transport. Do not use-d(detach).
With .env file (see Authentication):
"mcpServers": {
"snowflake": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"--env-file", "/absolute/path/to/.env",
"nsphung/mcp-snowflake-server-nsp"
]
}
}With TOML connections file:
"mcpServers": {
"snowflake": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-v", "/path/to/snowflake_connections.toml:/app/snowflake_connections.toml:ro",
"nsphung/mcp-snowflake-server-nsp",
"--connections-file", "/app/snowflake_connections.toml",
"--connection-name", "production"
]
}
}With .env file:
"snowflake": {
"type": "stdio",
"command": "docker",
"args": [
"run", "--rm", "-i",
"nsphung/mcp-snowflake-server-nsp"
],
"envFile": "${workspaceFolder}/.env"
}With TOML connections file:
"snowflake": {
"type": "stdio",
"command": "docker",
"args": [
"run", "--rm", "-i",
"-v", "/path/to/snowflake_connections.toml:/app/snowflake_connections.toml:ro",
"nsphung/mcp-snowflake-server-nsp",
"--connections-file", "/app/snowflake_connections.toml",
"--connection-name", "production"
]
}"snowflake": {
"type": "local",
"command": [
"docker", "run", "--rm", "-i",
"--env-file", "/absolute/path/to/.env",
"nsphung/mcp-snowflake-server-nsp"
],
"enabled": true,
"timeout": 300000
}Configuration Reference
All connection parameters can also be set as environment variables (SNOWFLAKE_<PARAM_UPPER>).
Flag | Env var | Default | Description |
|
| — | Snowflake account identifier |
|
| — | Snowflake username |
|
| — | Password (not required for key-pair / SSO) |
|
| — | Virtual warehouse to use |
|
| (required) | Default database |
|
| (required) | Default schema |
|
| — | Role to assume |
|
| — | Absolute path to RSA or ECDSA (ES256/384/512) private key file ( |
|
| — | Passphrase for encrypted private key |
| — | — | Path to TOML connections file |
| — | — | Connection profile name in TOML file (required with |
| — |
| Enable |
| — |
| Pre-load table schema as |
| — |
| Space-separated list of tool names to disable |
| — |
| Omit embedded JSON resources from responses (reduces context window usage) |
| — |
| Truncate data tool results after N rows, with a |
| — |
| Approximate serialized row budget for data tool results ( |
| — | — | Directory for log file output |
| — |
| Log verbosity: |
The limits apply to read_query and the schema discovery tools, not write tools or prefetching.
The byte budget sums individually JSON-serialized rows and is halved when embedded JSON is enabled;
it is not a hard limit on the complete YAML, JSON, or MCP response. Snowflake executes the original
query and results are fetched in batches, so these limits do not bound query compute or batch memory.
Use SQL LIMIT or filters to reduce query work. Discovery exclusions are applied after truncation,
so fewer rows than the limit may be returned.
Exclusion Patterns
Edit runtime_config.json to exclude databases, schemas, or tables from all discovery tools. Patterns are matched case-insensitively as substrings.
{
"exclude_patterns": {
"databases": ["temp"],
"schemas": ["temp", "information_schema"],
"tables": ["temp"]
}
}The server loads this file automatically at startup from the working directory.
License
This project is licensed under the MIT License. See the LICENSE file for the full text.
Fork and Attribution
This repository is a fork of isaacwasserman/mcp-snowflake-server.
Upstream authors and contributors retain copyright for their contributions.
Fork-specific changes are maintained by
nsphung.A summary of notable modifications is tracked in
NOTICE.
Available Tools
6 toolsappend_insightB
Add a data insight to the memo
Inputs: insight (required).
describe_tableA
Get the schema information for a specific table
Inputs: table_name (required).
list_databasesA
List all available databases in Snowflake
Inputs: no named parameters.
list_schemasB
List all schemas in a database
Inputs: database (required).
list_tablesB
List all tables in a specific database and schema
Inputs: schema (required), database (required).
read_queryA
Execute a SELECT query. Large results are truncated (see truncated/notice); use LIMIT, WHERE or fewer columns.
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
The list_databases/list_schemas/list_tables hierarchy is clearly distinct, and describe_table vs. read_query is understandable. append_insight is somewhat ambiguous because it references an unspecified memo and has no corresponding read/clear operation.
All tools follow a consistent snake_case verb_noun pattern: list_*, read_query, append_insight, describe_table. The convention is predictable throughout.
Six tools is well-scoped for a Snowflake exploration/query server. Each tool has a distinct role and none feel redundant.
Core read-only exploration is covered: databases, schemas, tables, table schema, and SELECT queries. However, append_insight has no way to retrieve or manage the memo, and the surface lacks common Snowflake operations like listing views, warehouses, or any write/DDL capabilities.
Maintenance
Related MCP Connectors
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Remote data science agents for Snowflake, Databricks & BigQuery in Claude/Cursor via MCP
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
Related MCP Servers
- AlicenseAqualityDmaintenanceSnowflake integration implementing read and (optional) write operations as well as insight tracking6185GPL 3.0
- AlicenseNot gradedqualityDmaintenanceMCP-Server from your Database optimized for LLMs and AI-Agents. Supports PostgreSQL, MySQL, ClickHouse, Snowflake, MSSQL, BigQuery, Oracle Database, SQLite, ElasticSearch, DuckDB550Apache 2.0
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables natural language interaction with Snowflake databases through AI guidance, supporting core database operations, warehouse management, and AI-powered data analysis features.133MIT
- FlicenseNot gradedqualityNot gradedmaintenancePersonal MCP server for Snowflake and Tableau integration, enabling SQL queries and database/table listing as well as Tableau workbook, view, datasource management.-