Skip to main content
Glama
mcp-snowflake-server

mcp-snowflake-server

スノーフレークMCPサーバー

鍛冶屋のバッジ PyPI - バージョン


概要

Snowflakeとのデータベース連携を可能にするモデルコンテキストプロトコル(MCP)サーバー実装。このサーバーは、ツール経由でSQLクエリを実行し、データの洞察とスキーマコンテキストをリソースとして公開することを可能にします。


Related MCP server: Snowflake MCP Server

コンポーネント

リソース

  • memo://insights
    発見されたデータの洞察を集約した継続的に更新されるメモ。
    append_insightツールを使用して新しいインサイトが追加されると、自動的に更新されます。

  • context://table/{table_name}
    (プリフェッチが有効な場合) 列やコメントを含むテーブルごとのスキーマの概要が個別のリソースとして公開されます。


ツール

サーバーは次のツールを公開します。

クエリツール

  • read_query
    SELECTクエリを実行してデータベースからデータを読み取ります。
    入力:

    • query (文字列): 実行するSELECT SQLクエリ
      **戻り値:**クエリ結果をオブジェクトの配列として返します

  • write_query ( --allow-writeでのみ有効)
    INSERT 、 UPDATE 、またはDELETEクエリを実行します。
    入力:

    • query (文字列): SQL変更クエリ
      **戻り値:**影響を受けた行数または確認

  • create_table ( --allow-writeでのみ有効)
    データベースに新しいテーブルを作成します。
    入力:

    • query (文字列): CREATE TABLE SQL文
      **戻り値:**テーブル作成の確認

スキーマツール

  • list_databases
    Snowflake インスタンス内のすべてのデータベースを一覧表示します。
    **戻り値:**データベース名の配列

  • list_schemas
    特定のデータベース内のすべてのスキーマを一覧表示します。
    入力:

    • database (文字列): データベースの名前
      **戻り値:**スキーマ名の配列

  • list_tables
    特定のデータベースとスキーマ内のすべてのテーブルを一覧表示します。
    入力:

    • database (文字列): データベースの名前

    • schema (文字列): スキーマの名前
      **戻り値:**テーブルメタデータの配列

  • describe_table
    特定のテーブルの列情報を表示します。
    入力:

    • table_name (文字列): 完全修飾テーブル名 ( database.schema.table )
      **戻り値:**名前、型、NULL 値、デフォルト、コメントを含む列定義の配列

分析ツール

  • append_insight
    メモ リソースに新しいデータ インサイトを追加します。
    入力:

    • insight (文字列):分析から発見されたデータの洞察
      **戻り値:**洞察力追加の確認
      効果: memo://insightsリソースの更新をトリガーします


Claude Desktopでの使用

Smithery経由でインストール

Smithery経由で Claude Desktop 用の Snowflake Server を自動的にインストールするには:

npx -y @smithery/cli install mcp_snowflake_server --client claude

UVX経由でインストール

"mcpServers": {
  "snowflake_pip": {
    "command": "uvx",
    "args": [
      "--python=3.12",  // Optional: specify Python version <=3.12
      "mcp_snowflake_server",
      "--account", "your_account",
      "--warehouse", "your_warehouse",
      "--user", "your_user",
      "--password", "your_password",
      "--role", "your_role",
      "--database", "your_database",
      "--schema", "your_schema"
      // Optionally: "--allow_write"
      // Optionally: "--log_dir", "/absolute/path/to/logs"
      // Optionally: "--log_level", "DEBUG"/"INFO"/"WARNING"/"ERROR"/"CRITICAL"
      // Optionally: "--exclude_tools", "{tool_name}", ["{other_tool_name}"]
    ]
  }
}

ローカルにインストールする

  1. Claude AIデスクトップアプリをインストールする

  2. uvをインストールします:

curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Snowflake の認証情報を使用して.envファイルを作成します。

SNOWFLAKE_USER="xxx@your_email.com"
SNOWFLAKE_ACCOUNT="xxx"
SNOWFLAKE_ROLE="xxx"
SNOWFLAKE_DATABASE="xxx"
SNOWFLAKE_SCHEMA="xxx"
SNOWFLAKE_WAREHOUSE="xxx"
SNOWFLAKE_PASSWORD="xxx"
# Alternatively, use external browser authentication:
# SNOWFLAKE_AUTHENTICATOR="externalbrowser"
  1. [オプション] データベース、スキーマ、またはテーブルの除外パターンを設定するには、 runtime_config.json変更します。

  2. ローカルでテストする:

uv --directory /absolute/path/to/mcp_snowflake_server run mcp_snowflake_server
  1. claude_desktop_config.jsonにサーバーを追加します。

"mcpServers": {
  "snowflake_local": {
    "command": "/absolute/path/to/uv",
    "args": [
      "--python=3.12",  // Optional
      "--directory", "/absolute/path/to/mcp_snowflake_server",
      "run", "mcp_snowflake_server"
      // Optionally: "--allow_write"
      // Optionally: "--log_dir", "/absolute/path/to/logs"
      // Optionally: "--log_level", "DEBUG"/"INFO"/"WARNING"/"ERROR"/"CRITICAL"
      // Optionally: "--exclude_tools", "{tool_name}", ["{other_tool_name}"]
    ]
  }
}

注記

  • デフォルトでは書き込み操作は無効になっています。-- --allow-writeで明示的に有効にしてください。

  • サーバーは、除外パターンを使用して特定のデータベース、スキーマ、またはテーブルをフィルター処理することをサポートしています。

  • プリフェッチが有効になっている場合、サーバーはテーブルごとの追加のコンテキスト リソースを公開します。

  • append_insightツールはmemo://insightsリソースを動的に更新します。


ライセンス

マサチューセッツ工科大学

Available Tools

6 tools
append_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: database (required), schema (required).

read_queryB

Execute a SELECT query.

Inputs: query (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct operation: metadata listing, schema description, query execution, and memo insight. No overlap.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with lowercase and underscores, e.g., list_databases, read_query.

    Tool Count5/5

    6 tools is well-scoped for a Snowflake server covering metadata exploration and querying without being excessive.

    Completeness4/5

    Covers metadata listing and SELECT queries thoroughly, but lacks DML/DDL operations like INSERT or CREATE, which may be needed depending on use case.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables interaction with Snowflake databases through SQL queries, schema exploration, and data analysis. Supports read/write operations, table management, and automatic insight tracking for comprehensive database operations through natural language.
      7
      GPL 3.0
    • A
      license
      A
      quality
      Not graded
      maintenance
      Enables AI assistants to securely connect to Snowflake data warehouses and execute SQL queries through natural language interactions. Supports multiple authentication methods and provides formatted query results with built-in security controls.
      1
      2
      MIT
    • A
      license
      Not graded
      quality
      F
      maintenance
      Enables interaction with Snowflake through Cortex AI services including search, analyst, and agents for querying structured and unstructured data, plus SQL execution and object management capabilities.
      10,388 PyPI
      303
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to securely access Snowflake data warehouses through natural language, executing SQL queries and retrieving insights with support for multiple authentication methods.
      3
      MIT