
isaacwasserman/mcp-snowflake-server 是从 https://github.com/isaacwasserman/mcp-snowflake-server. 导入的 MCP 服务器候选
概览
isaacwasserman/mcp-snowflake-server 是从 https://github.com/isaacwasserman/mcp-snowflake-server. 导入的 MCP 服务器候选
概述(AI 翻译)
概述
一个模型上下文协议(MCP)服务器实现,提供与 Snowflake 的数据库交互。该服务器支持通过工具运行 SQL 查询,并将数据洞察和模式上下文作为资源开放。
组成部分
资源
-
memo://insights一份持续更新的备忘录,汇总了发现的数据见解。 通过append_insight工具添加新见解时,自动更新。 -
context://table/{table_name}(如果启用预取)每个表的模式摘要,包括列和注释,作为单独资源公开。
工具
服务器会提供以下工具:
查询工具
-
read_query执行SELECT查询以读取数据库中的数据。 输入: -
query(字符串):用于执行的SELECTSQL 查询 返回: 以对象数组形式查询结果 -
write_query(仅在--allow-write时启用) 执行INSERT、UPDATE或DELETE查询。 输入: -
query(字符串):SQL 修改查询 返回: 受影响行数或确认 -
create_table(仅在--allow-write时启用) 在数据库中创建新的表。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Snowflake MCP Server
Overview
A Model Context Protocol (MCP) server implementation that provides database interaction with Snowflake. This server enables running SQL queries via tools and exposes data insights and schema context as resources.
Components
Resources
-
memo://insights
A continuously updated memo aggregating discovered data insights.
Updated automatically when new insights are appended via theappend_insighttool. -
context://table/{table_name}
(If prefetch enabled) Per-table schema summaries, including columns and comments, exposed as individual resources.
Tools
The server exposes the following tools:
Query Tools
-
read_query
ExecuteSELECTqueries to read data from the database.
Input:query(string): TheSELECTSQL query to execute
Returns: Query results as array of objects
-
write_query(enabled only with--allow-write)
ExecuteINSERT,UPDATE, orDELETEqueries.
Input:query(string): The SQL modification query
Returns: Number of affected rows or confirmation
-
create_table(enabled only with--allow-write)
Create new tables in the database.
Input:query(string):CREATE TABLESQL statement
Returns: Confirmation of table creation
Schema Tools
-
list_databases
List all databases in the Snowflake instance.
Returns: Array of database names -
list_schemas
List all schemas within a specific database.
Input:database(string): Name of the database
Returns: Array of schema names
-
list_tables
List all tables within a specific database and schema.
Input:database(string): Name of the databaseschema(string): Name of the schema
Returns: Array of table metadata
-
describe_table
View column information for a specific table.
Input:table_name(string): Fully qualified table name (database.schema.table)
Returns: Array of column definitions with names, types, nullability, defaults, and comments
Analysis Tools
append_insight
Add new data insights to the memo resource.
Input:insight(string): Data insight discovered from analysis
Returns: Confirmation of insight addition
Effect: Triggers update ofmemo://insightsresource
Usage with Claude Desktop
Installing via Smithery
To install Snowflake Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mcp_snowflake_server --client claude
Installing via UVX
Traditional Configuration (Individual Parameters)
"mcpServers": {
安装
uvx --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: "--private_key_path your_private_key_absolute_path"
// 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}配置
"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: "--private_key_path", "your_private_key_absolute_path"
// 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}"]
]
}
}