Snowflake MCP Server
Provides secure read-only access to Snowflake, enabling schema exploration, query execution, and data analysis through AI assistants.
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 MCP Serverlist all tables in the sales schema"
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.
What is Snowflake MCP?
Snowflake MCP Server bridges the gap between your Snowflake data warehouse and AI assistants like Claude. It provides a secure, read-only interface that lets AI help you explore schemas, write queries, and analyze dataβall while maintaining enterprise-grade security through SSO authentication.
Features
π Strict Read-Only Access: Multiple layers of protection against write operations
π Flexible Authentication: Browser-based SSO or headless key-pair auth via credential file
πΎ Smart Caching: 5-day schema cache for fast metadata access, reducing generic Snowflake schema queries and credit usage
π CSV Export: Export query results directly to CSV files
π‘οΈ Query Validation: Comprehensive SQL validation before execution
π― Responsible Token Management: Lightweight outputs to minimize token usage
π Easy Setup For LLM Agents
Already in Claude Code, OpenCode, Cursor, or another AI coding agent? Paste this into your agent:
Set up the Snowflake MCP server for me by following this guide:
https://raw.githubusercontent.com/ncejda-g2/snowflake_mcp_server/main/docs/guide/agent-setup.mdYour agent will walk you through everything interactively β including installing prerequisites. No manual config editing required.
uvx (Recommended β no Node.js required)
Just configure your MCP client using the examples in the Configuration section below.
Requires uv (curl -LsSf https://astral.sh/uv/install.sh | sh).
npx (requires Node.js)
Just configure your MCP client using the examples in the Configuration section below.
From Source
git clone git@github.com:ncejda-g2/snowflake_mcp_server.git
cd snowflake_mcp_server
python3 -m venv snowflake_mcp_env
source snowflake_mcp_env/bin/activate # On Windows: snowflake_mcp_env\Scripts\activate
pip install -r requirements.txtConfiguration
Edit your ~/.claude.json file:
Using uvx (Recommended):
{
"mcpServers": {
"snowflake-readonly": {
"command": "uvx",
"args": ["snowflake-readonly-mcp"],
"env": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USERNAME": "your-email@company.com",
"SNOWFLAKE_WAREHOUSE": "YOUR_WAREHOUSE",
"SNOWFLAKE_ROLE": "YOUR_ROLE",
"SNOWFLAKE_CREDENTIAL_FILE": "/path/to/credentials.json" // optional β omit to use browser SSO
}
}
}
}Using npx:
{
"mcpServers": {
"snowflake-readonly": {
"command": "npx",
"args": ["-y", "snowflake-readonly-mcp"],
"env": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USERNAME": "your-email@company.com",
"SNOWFLAKE_WAREHOUSE": "YOUR_WAREHOUSE",
"SNOWFLAKE_ROLE": "YOUR_ROLE",
"SNOWFLAKE_CREDENTIAL_FILE": "/path/to/credentials.json" // optional β omit to use browser SSO
}
}
}
}Using local clone:
{
"mcpServers": {
"snowflake-readonly": {
"command": "/path/to/snowflake_mcp_server/snowflake_mcp_env/bin/python",
"args": ["/path/to/snowflake_mcp_server/main.py"],
"env": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USERNAME": "your-email@company.com",
"SNOWFLAKE_WAREHOUSE": "YOUR_WAREHOUSE",
"SNOWFLAKE_ROLE": "YOUR_ROLE",
"SNOWFLAKE_CREDENTIAL_FILE": "/path/to/credentials.json" // optional β omit to use browser SSO
}
}
}
}Replace:
/path/to/snowflake_mcp_server: Absolute path to your cloned repository (local clone only)your-account: Your Snowflake account identifier (e.g.,xy12345.us-east-1)your-email@company.com: Your Snowflake usernameYOUR_WAREHOUSE: Your Snowflake warehouse nameYOUR_ROLE: Your Snowflake role (e.g.,ANALYST,PUBLIC)SNOWFLAKE_CREDENTIAL_FILE(optional): Path to a JSON credential file for headless key-pair auth (omit to use browser SSO)
One-click install: Download the latest .mcpb extension and double-click it. Claude Desktop will prompt you for your Snowflake credentials.
Edit your configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/claude/claude_desktop_config.json
{
"mcpServers": {
"snowflake-readonly": {
"command": "uvx",
"args": ["snowflake-readonly-mcp"],
"env": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USERNAME": "your-email@company.com",
"SNOWFLAKE_WAREHOUSE": "YOUR_WAREHOUSE",
"SNOWFLAKE_ROLE": "YOUR_ROLE"
}
}
}
}Requires uv.
Edit your Cursor settings:
Using uvx (Recommended):
{
"mcpServers": {
"snowflake-readonly": {
"command": "uvx",
"args": ["snowflake-readonly-mcp"],
"env": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USERNAME": "your-email@company.com",
"SNOWFLAKE_WAREHOUSE": "YOUR_WAREHOUSE",
"SNOWFLAKE_ROLE": "YOUR_ROLE",
"SNOWFLAKE_CREDENTIAL_FILE": "/path/to/credentials.json" // optional β omit to use browser SSO
}
}
}
}Using npx:
{
"mcpServers": {
"snowflake-readonly": {
"command": "npx",
"args": ["-y", "snowflake-readonly-mcp"],
"env": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USERNAME": "your-email@company.com",
"SNOWFLAKE_WAREHOUSE": "YOUR_WAREHOUSE",
"SNOWFLAKE_ROLE": "YOUR_ROLE",
"SNOWFLAKE_CREDENTIAL_FILE": "/path/to/credentials.json" // optional β omit to use browser SSO
}
}
}
}Using local clone:
{
"mcpServers": {
"snowflake-readonly": {
"command": "/path/to/snowflake_mcp_server/snowflake_mcp_env/bin/python",
"args": ["/path/to/snowflake_mcp_server/main.py"],
"env": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USERNAME": "your-email@company.com",
"SNOWFLAKE_WAREHOUSE": "YOUR_WAREHOUSE",
"SNOWFLAKE_ROLE": "YOUR_ROLE",
"SNOWFLAKE_CREDENTIAL_FILE": "/path/to/credentials.json" // optional β omit to use browser SSO
}
}
}
}Replace:
/path/to/snowflake_mcp_server: Absolute path to your cloned repository (local clone only)your-account: Your Snowflake account identifier (e.g.,xy12345.us-east-1)your-email@company.com: Your Snowflake usernameYOUR_WAREHOUSE: Your Snowflake warehouse nameYOUR_ROLE: Your Snowflake role (e.g.,ANALYST,PUBLIC)SNOWFLAKE_CREDENTIAL_FILE(optional): Path to a JSON credential file for headless key-pair auth (omit to use browser SSO)
Edit your ~/.config/opencode/opencode.json file (global) or opencode.json in your project root (project-level):
Note: OpenCode uses
"mcp"(not"mcpServers"),"command"as a single array (not separatecommand/args), and"environment"(not"env").
Using uvx (Recommended):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"snowflake-readonly": {
"type": "local",
"command": ["uvx", "snowflake-readonly-mcp"],
"environment": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USERNAME": "your-email@company.com",
"SNOWFLAKE_WAREHOUSE": "YOUR_WAREHOUSE",
"SNOWFLAKE_ROLE": "YOUR_ROLE",
"SNOWFLAKE_CREDENTIAL_FILE": "/path/to/credentials.json" // optional β omit to use browser SSO
}
}
}
}Using npx:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"snowflake-readonly": {
"type": "local",
"command": ["npx", "-y", "snowflake-readonly-mcp"],
"environment": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USERNAME": "your-email@company.com",
"SNOWFLAKE_WAREHOUSE": "YOUR_WAREHOUSE",
"SNOWFLAKE_ROLE": "YOUR_ROLE",
"SNOWFLAKE_CREDENTIAL_FILE": "/path/to/credentials.json" // optional β omit to use browser SSO
}
}
}
}Using local clone:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"snowflake-readonly": {
"type": "local",
"command": ["/path/to/snowflake_mcp_server/snowflake_mcp_env/bin/python", "/path/to/snowflake_mcp_server/main.py"],
"environment": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USERNAME": "your-email@company.com",
"SNOWFLAKE_WAREHOUSE": "YOUR_WAREHOUSE",
"SNOWFLAKE_ROLE": "YOUR_ROLE",
"SNOWFLAKE_CREDENTIAL_FILE": "/path/to/credentials.json" // optional β omit to use browser SSO
}
}
}
}Replace:
/path/to/snowflake_mcp_server: Absolute path to your cloned repository (local clone only)your-account: Your Snowflake account identifier (e.g.,xy12345.us-east-1)your-email@company.com: Your Snowflake usernameYOUR_WAREHOUSE: Your Snowflake warehouse nameYOUR_ROLE: Your Snowflake role (e.g.,ANALYST,PUBLIC)SNOWFLAKE_CREDENTIAL_FILE(optional): Path to a JSON credential file for headless key-pair auth (omit to use browser SSO)
Edit your ~/.gemini/settings.json file:
Using uvx (Recommended):
{
"mcpServers": {
"snowflake-readonly": {
"command": "uvx",
"args": ["snowflake-readonly-mcp"],
"env": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USERNAME": "your-email@company.com",
"SNOWFLAKE_WAREHOUSE": "YOUR_WAREHOUSE",
"SNOWFLAKE_ROLE": "YOUR_ROLE",
"SNOWFLAKE_CREDENTIAL_FILE": "/path/to/credentials.json" // optional β omit to use browser SSO
}
}
}
}Using npx:
{
"mcpServers": {
"snowflake-readonly": {
"command": "npx",
"args": ["-y", "snowflake-readonly-mcp"],
"env": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USERNAME": "your-email@company.com",
"SNOWFLAKE_WAREHOUSE": "YOUR_WAREHOUSE",
"SNOWFLAKE_ROLE": "YOUR_ROLE",
"SNOWFLAKE_CREDENTIAL_FILE": "/path/to/credentials.json" // optional β omit to use browser SSO
}
}
}
}Using local clone:
{
"mcpServers": {
"snowflake-readonly": {
"command": "/path/to/snowflake_mcp_server/snowflake_mcp_env/bin/python",
"args": ["/path/to/snowflake_mcp_server/main.py"],
"env": {
"SNOWFLAKE_ACCOUNT": "your-account",
"SNOWFLAKE_USERNAME": "your-email@company.com",
"SNOWFLAKE_WAREHOUSE": "YOUR_WAREHOUSE",
"SNOWFLAKE_ROLE": "YOUR_ROLE",
"SNOWFLAKE_CREDENTIAL_FILE": "/path/to/credentials.json" // optional β omit to use browser SSO
}
}
}
}Replace:
/path/to/snowflake_mcp_server: Absolute path to your cloned repository (local clone only)your-account: Your Snowflake account identifier (e.g.,xy12345.us-east-1)your-email@company.com: Your Snowflake usernameYOUR_WAREHOUSE: Your Snowflake warehouse nameYOUR_ROLE: Your Snowflake role (e.g.,ANALYST,PUBLIC)SNOWFLAKE_CREDENTIAL_FILE(optional): Path to a JSON credential file for headless key-pair auth (omit to use browser SSO)
Available Commands
The server provides powerful tools for interacting with Snowflake:
Tool | Description |
| Scan and cache all database schemas |
| Browse database hierarchy with pattern filters (like SHOW TABLES) |
| Search for tables by keyword across all databases |
| View detailed column information (like DESCRIBE TABLE) |
| Run read-only SQL queries |
| Stream large results to CSV |
| Export query results |
π Documentation
Changelog - Version history and updates
Maintenance
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/ncejda-g2/snowflake_mcp_server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server