Snowflake

by datawiz168

27 stars
336 downloads
Not rated
GitHub

About

Integration with Snowflake databases, enabling execution of SQL queries and analysis of enterprise data.

Details

Author
datawiz168
Repository
datawiz168/mcp-snowflake-service
GitHub stars
27
Downloads
336
License
MIT License
Categories
Database, Other, Design, Developer Tools, AI, Infrastructure, Cloud Service
Tags
#integration

- Execute SQL queries on Snowflake databases
- Automatic connection lifecycle management (connect, reconnect, close)
- Robust error handling and result processing
- Secure database access via Snowflake user credentials
- Supports both read-only and write operations based on database user permissions

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Snowflake
    Command (node, npx, python, etc.) /usr/bin/python3
    Arguments
    • Argument 1 /path/to/mcp-snowflake/server.py
    Environment
    • SNOWFLAKE_USER your_username
    • SNOWFLAKE_ACCOUNT NRB18479.US-WEST-2
    • SNOWFLAKE_DATABASE your_database
    • SNOWFLAKE_PASSWORD your_password
    • SNOWFLAKE_WAREHOUSE your_warehouse

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

To install mcp-service-snowflake for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @datawiz168/mcp-service-snowflake --client claude

1. Clone this repository / 克隆此仓库

git clone https://github.com/datawiz168/mcp-snowflake-service.git

2. Install dependencies / 安装依赖

pip install -r requirements.txt

Add the following configuration to claude_desktop_config.json / 在 claude_desktop_config.json 中添加配置:

{
  "mcpServers": {
    "snowflake": {
      "command": "C:\\Users\\K\\anaconda3\\envs\\regular310\\python.exe",
      "args": ["D:\\tools\\mcp-snowflake\\server.py"]
    }
  }
}

Configuration parameters / 配置参数说明:
- command: Full path to your Python interpreter. Please modify this according to your Python installation location. / Python 解释器的完整路径,请根据您的 Python 安装位置进行修改。
- args: Full path to the server script. Please modify this according to where you cloned the repository. / 服务器脚本的完整路径,请根据您克隆仓库的位置进行修改。

Example paths for different operating systems / 不同操作系统的路径示例:

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "snowflake": {
            "env": {
                "SNOWFLAKE_USER": "your_username",
                "SNOWFLAKE_ACCOUNT": "NRB18479.US-WEST-2",
                "SNOWFLAKE_DATABASE": "your_database",
                "SNOWFLAKE_PASSWORD": "your_password",
                "SNOWFLAKE_WAREHOUSE": "your_warehouse"
            },
            "args": [
                "/path/to/mcp-snowflake/server.py"
            ],
            "command": "/usr/bin/python3"
        }
    }
}

Linux

{
    "env": {
        "SNOWFLAKE_USER": "your_username",
        "SNOWFLAKE_ACCOUNT": "NRB18479.US-WEST-2",
        "SNOWFLAKE_DATABASE": "your_database",
        "SNOWFLAKE_PASSWORD": "your_password",
        "SNOWFLAKE_WAREHOUSE": "your_warehouse"
    },
    "args": [
        "/path/to/mcp-snowflake/server.py"
    ],
    "command": "/usr/bin/python3"
}

Macos

{
    "env": {
        "SNOWFLAKE_USER": "your_username",
        "SNOWFLAKE_ACCOUNT": "NRB18479.US-WEST-2",
        "SNOWFLAKE_DATABASE": "your_database",
        "SNOWFLAKE_PASSWORD": "your_password",
        "SNOWFLAKE_WAREHOUSE": "your_warehouse"
    },
    "args": [
        "/path/to/mcp-snowflake/server.py"
    ],
    "command": "/usr/bin/python3"
}

Windows

{
    "env": {
        "SNOWFLAKE_USER": "your_username",
        "SNOWFLAKE_ACCOUNT": "NRB18479.US-WEST-2",
        "SNOWFLAKE_DATABASE": "your_database",
        "SNOWFLAKE_PASSWORD": "your_password",
        "SNOWFLAKE_WAREHOUSE": "your_warehouse"
    },
    "args": [
        "D:\\tools\\mcp-snowflake\\server.py"
    ],
    "command": "C:\\Users\\K\\anaconda3\\envs\\regular310\\python.exe"
}

A Model Context Protocol (MCP) server that provides Claude access to Snowflake databases. / 一个为 Claude 提供 Snowflake 数据库访问能力的 MCP (模型上下文协议) 服务器。

This server implements the Model Context Protocol to allow Claude to:

- Execute SQL queries on Snowflake databases
- Automatically handle database connection lifecycle (connect, reconnect on timeout, close)
- Handle query results and errors
- Perform database operations safely

- 在 Snowflake 数据库上执行 SQL 查询
- 自动管理数据库连接生命周期(连接创建、超时重连、连接关闭)
- 处理查询结果和错误
- 安全地执行数据库操作

To install mcp-service-snowflake for Claude Desktop automatically viaSmithery:

npx -y @smithery/cli install @datawiz168/mcp-service-snowflake --client claude
git clone https://github.com/datawiz168/mcp-snowflake-service.git

MCP Client Configuration Example / MCP 客户端配置示例

Add the following configuration toclaude_desktop_config.json/ 在claude_desktop_config.json中添加配置:

{ "mcpServers": { "snowflake": { "command": "C:\\Users\\K\\anaconda3\\envs\\regular310\\python.exe", "args": ["D:\\tools\\mcp-snowflake\\server.py"] } } }

- command: Full path to your Python interpreter. Please modify this according to your Python installation location. / Python 解释器的完整路径,请根据您的 Python 安装位置进行修改。
- args: Full path to the server script. Please modify this according to where you cloned the repository. / 服务器脚本的完整路径,请根据您克隆仓库的位置进行修改。

Example paths for different operating systems / 不同操作系统的路径示例:

{ "mcpServers": { "snowflake": { "command": "C:\\Users\\YourUsername\\anaconda3\\python.exe", "args": ["C:\\Path\\To\\mcp-snowflake\\server.py"] } } }
{ "mcpServers": { "snowflake": { "command": "/usr/bin/python3", "args": ["/path/to/mcp-snowflake/server.py"] } } }

Create a.envfile in the project root directory and add the following configuration / 在项目根目录下创建.env文件,添加以下配置:

SNOWFLAKE_USER=your_username # Your username / 您的用户名 SNOWFLAKE_PASSWORD=your_password # Your password / 您的密码 SNOWFLAKE_ACCOUNT=NRB18479.US-WEST-2 # Example: NRB18479.US-WEST-2 / 示例: NRB18479.US-WEST-2 SNOWFLAKE_DATABASE=your_database # Your database / 您的数据库 SNOWFLAKE_WAREHOUSE=your_warehouse # Your warehouse / 您的数据仓库

The server provides automatic connection management features / 服务器提供以下自动连接管理功能:

-

Automatic connection initialization / 自动初始化连接

- Creates connection when first query is received / 首次查询时自动创建连接
- Validates connection parameters / 验证连接参数

- Keeps track of connection state / 跟踪连接状态
- Handles connection timeouts / 处理连接超时
- Automatically reconnects if connection is lost / 连接断开时自动重连

- Properly closes connections when server stops / 服务器停止时正确关闭连接
- Releases resources appropriately / 适当释放资源

The server will start automatically with the Claude Desktop client. No manual startup is required. Once the server is running, Claude will be able to execute Snowflake queries. / 服务器会随 Claude Desktop 客户端自动启动,无需手动运行。服务器启动后,Claude 将能够执行 Snowflake 查询。

For development testing, you can start the server manually using / 如果需要单独启动服务器进行测试,可以使用以下命令:

Note: Manual server startup is not needed for normal use. The Claude Desktop client will automatically manage server startup and shutdown based on the configuration. / 注意:正常使用时无需手动启动服务器,Claude Desktop 客户端会根据配置自动管理服务器的启动和停止。

- Secure Snowflake database access / 安全的 Snowflake 数据库访问
- Robust error handling and reporting / 健壮的错误处理和报告机制
- Automatic connection management / 自动连接管理
- Query execution and result processing / 查询执行和结果处理

To contribute code or report issues / 要贡献代码或报告问题,请:
- Fork this repository / Fork 此仓库
- Create your feature branch / 创建您的功能分支 (git checkout -b feature/AmazingFeature)
- Commit your changes / 提交您的更改 (git commit -m 'Add some AmazingFeature')
- Push to the branch / 推送到分支 (git push origin feature/AmazingFeature)
- Open a Pull Request / 开启一个 Pull Request

mcp‑server‑snowflake controls database access rights precisely by way of database users. If you only need to read data, just assign a user with read‑only database permissions./ mcp-server-snowflake 控制数据库访问权限,是通过数据库用户来精准实现的。如果你只想读取数据,给个只有读取数据库权限的用户就行了。

This project is licensed under theMIT License.

Read-only access to Snowflake databases. Requires Snowflake connection information provided via MCP client configuration.

A Snowflake MCP server — SQL queries, schema exploration, and data insights for AI assistants

API-first engine and MCP server that transforms declarative YAML model definitions into optimized SQL for Postgres, Snowflake, ClickHouse, Dremio, and Databricks

Snowflake MCP server by CData for read-only querying of live Snowflake data from AI agents and MCP clients.

A read-only server for interacting with Snowflake databases, allowing SELECT queries and access to schema context.

An MCP server for interacting with Snowflake databases.

Official MCP server for dbt (data build tool) providing integration with dbt Core/Cloud CLI, project metadata discovery, model information, and semantic layer querying capabilities.

Query and analyze data with MotherDuck and local DuckDB

A collection of tools for managing the platform, addressing data quality and reading and writing to Teradata Database.

A read-only MCP server for Avro data sources, powered by the CData JDBC Driver.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.