Snowflake MCP Server
Provides secure, read-only access to Snowflake data warehouses, enabling AI assistants to explore schemas, write queries, and analyze data with SSO authentication and smart caching.
README
<div align="center"> <br /> <img src="assets/logo.png" alt="Snowflake MCP" width="200" /> <br /> <br />
<h1 align="center">Snowflake MCP Server</h1>
<p align="center"> <strong>Secure, read-only access to Snowflake with AI-powered query assistance</strong> </p>
<p align="center"> <a href="https://github.com/ncejda-g2/snowflake_mcp_server/releases"> <img src="https://img.shields.io/badge/version-v0.2.3-9b59b6" alt="Version" /> </a> <a href="./CHANGELOG.md"> <img src="https://img.shields.io/badge/changelog-Latest%20Changes-blue" alt="Changelog" /> </a> <a href="https://modelcontextprotocol.io"> <img src="https://img.shields.io/badge/MCP-Model%20Context%20Protocol-green" alt="MCP" /> </a> </p>
<p align="center"> <a href="#features">Features</a> • <a href="#-quick-start">Quick Start</a> • <a href="#configuration">Configuration</a> • <a href="#available-commands">Commands</a> • <a href="./docs">Documentation</a> </p> </div>
<br />
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.
<details> <summary><b>Demo</b></summary>
<div align="center"> <br /> <img src="assets/demo.gif" alt="Demo" width="800" /> <br /> <br /> </div>
</details>
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.md
Your agent will walk you through everything interactively — including installing prerequisites. No manual config editing required.
<details> <summary><b>Manual setup & from-source install</b></summary>
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.txt
</details>
Configuration
<details> <summary><b>Claude Code</b></summary>
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)
</details>
<details> <summary><b>Claude Desktop</b></summary>
One-click install: Download the latest .mcpb extension and double-click it. Claude Desktop will prompt you for your Snowflake credentials.
<details> <summary>Manual configuration (advanced)</summary>
Edit your configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.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.
</details>
</details>
<details> <summary><b>Cursor</b></summary>
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)
</details>
<details> <summary><b>OpenCode</b></summary>
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)
</details>
<details> <summary><b>Gemini CLI</b></summary>
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)
</details>
Available Commands
The server provides powerful tools for interacting with Snowflake:
| Tool | Description |
|---|---|
refresh_catalog |
Scan and cache all database schemas |
show_tables |
Browse database hierarchy with pattern filters (like SHOW TABLES) |
find_tables |
Search for tables by keyword across all databases |
describe_table |
View detailed column information (like DESCRIBE TABLE) |
execute_query |
Run read-only SQL queries |
execute_big_query_to_disk |
Stream large results to CSV |
save_last_query_to_csv |
Export query results |
📚 Documentation
- Changelog - Version history and updates
<div align="center"> <p> <strong>Built with ❄️ for the AI + Data community</strong> </p> <p> <a href="https://github.com/ncejda-g2/snowflake_mcp_server/issues">Report Bug</a> • <a href="https://github.com/ncejda-g2/snowflake_mcp_server/issues">Request Feature</a> </p> </div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。