
dynamike/snowflake-mcp-server
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
MCPの特長 読み取り専用の質問でSnowflakeに接続するサーバー
概要
Snowflakeデータベースに対する読み取り専用操作を実行するモデルコンテキストプロトコル(MCP)サーバー。 このツールにより、Claude は、情報を変更することなく、Snowflake データを安全に問い合わせることができます。 - Snowflakeへの柔軟な認証: - プライベートキーによるサービスアカウント認証 - インタラクティブセッションのための外部ブラウザ認証 - 永続的な接続を維持するために、自動バックグラウンドリフレッシュによる接続プール - 複数のビューとデータベースを単一のセッションでクエリするためのサポート - 複数のSQLステートメントタイプ(SELECT、 SHOW、DESCRIBE、EXPLAIN、 WITH)のサポート - スノーフレークデータをクエリするためのMCP互換ハンドラ - データの修正を防ぐためのセキュリティチェック付きの読み取り専用操作 - Python 3のサポート.
概要(AI 翻訳)
Snowflakeデータベースに対する読み取り専用操作を実行するモデルコンテキストプロトコル(MCP)サーバー。 このツールにより、Claude は、情報を変更することなく、Snowflake データを安全に問い合わせることができます。
##特徴
- Snowflakeへの柔軟な認証:
- プライベートキーによるサービスアカウント認証
- インタラクティブセッションの外部ブラウザ認証
- 持続的な接続を維持する自動背景のリフレッシュによる接続プール
- 複数のビューやデータベースを単一のセッションでクエリするサポート
- 複数のSQL文型(SELECT, SHOW, DESCRIBE, EXPLAIN, WITH)のサポート
- スノーフレークデータをクエリするためのMCP対応ハンドラ
- データの修正を防ぐためのセキュリティチェック付きの読み取り専用操作
- Python 3.12+のサポート
- Claudeデスクトップとの容易な統合のためのStdioベースのMCPサーバー
利用可能なツール
サーバは、Snowflake をクエリするための次のツールを提供しています。
- list databases: すべてのアクセス可能なスノーフレークデータベースをリスト
- list views: 指定されたデータベースとスキーマ内のすべてのビューをリストする
- describe view: カラムやSQLの定義を含む特定のビューに関する詳細情報を入手
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
MCP Server for Snowflake
A Model Context Protocol (MCP) server for performing read-only operations against Snowflake databases. This tool enables Claude to securely query Snowflake data without modifying any information.
Features
- Flexible authentication to Snowflake using either:
- Service account authentication with private key
- External browser authentication for interactive sessions
- Connection pooling with automatic background refresh to maintain persistent connections
- Support for querying multiple views and databases in a single session
- Support for multiple SQL statement types (SELECT, SHOW, DESCRIBE, EXPLAIN, WITH)
- MCP-compatible handlers for querying Snowflake data
- Read-only operations with security checks to prevent data modification
- Support for Python 3.12+
- Stdio-based MCP server for easy integration with Claude Desktop
Available Tools
The server provides the following tools for querying Snowflake:
- list_databases: List all accessible Snowflake databases
- list_views: List all views in a specified database and schema
- describe_view: Get detailed information about a specific view including columns and SQL definition
- query_view: Query data from a view with an optional row limit
- execute_query: Execute custom read-only SQL queries (SELECT, SHOW, DESCRIBE, EXPLAIN, WITH) with results formatted as markdown tables
Installation
Prerequisites
- Python 3.12 or higher
- A Snowflake account with either:
- A configured service account (username + private key), or
- A regular user account for browser-based authentication
- uv package manager (recommended)
Steps
-
Clone this repository:
git clone https://github.com/yourusername/snowflake-mcp-server.git cd snowflake-mcp-server -
Install the package:
uv pip install -e . -
Create a
.envfile with your Snowflake credentials:Choose one of the provided example files based on your preferred authentication method:
For private key authentication:
cp .env.private_key.example .envThen edit the
.envfile to set your Snowflake account details and path to your private key.For external browser authentication:
cp .env.browser.example .envThen edit the
.envfile to set your Snowflake account details.
Usage
Running with uv
After installing the package, you can run the server directly with:
uv run snowflake-mcp
# Or you can be explicit about using stdio transport
uv run snowflake-mcp-stdio
This will start the stdio-based MCP server, which can be connected to Claude Desktop or any MCP client that supports stdio communication.
When using external browser authentication, a browser window will automatically open prompting you to log in to your Snowflake account.
Claude Desktop Integration
- In Claude Desktop, go to Settings → MCP Servers
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →