Cloud · MODEL CONTEXT PROTOCOL
davidamom snowflake mcp
MCP server implementation for Snowflake integration
WHAT IT CONNECTS
davidamom snowflake mcp 为 AI Agent 提供什么
- Secure Snowflake database access
- Flexible authentication (password or key pair authentication)
- Robust error handling and reporting
- Automatic connection management
- Query execution and result processing
- Compatible with any MCP-compliant client
- **server.py** - The main entry point containing the MCP server implementation.
- **SnowflakeConnection** - Class that handles all Snowflake database operations, including:
- Connection establishment and reconnection
- Query execution and transaction management
- Connection maintenance and cleanup
- **SnowflakeMCPServer** - The main server class that implements the MCP protocol:
- Registers available tools with the MCP framework
- Handles tool call requests from clients
- Manages the lifecycle of connections
- **Initialization** - Connections are created lazily when the first query is received
- **Validation** - Connection parameters are validated before attempting to connect
- **Monitoring** - Connections are regularly tested for validity
- **Recovery** - Automatic reconnection if the connection is lost or times out
- **Cleanup** - Proper resource release when the server shuts down
- **execute_query** - Executes a SQL query on Snowflake and returns the results
- Input: SQL query string
- Output: Query results in a structured format
- **export_to_csv** - Executes a SQL query on Snowflake and returns the results
- Input: SQL query string
- Output: Num rows exported. File path of the output file
SECURITY
MCP 收录不等于安全审核
MCP 服务器可能获得模型上下文、凭据、本地文件或调用外部系统的权限。连接 Agent 前,请检查代码、环境变量、网络行为、软件包来源与维护状态。