
OSS Snowflake MCP Server
io.github.Snowflake-Labs由 GitHub 帳號 Snowflake-Labs 發布v1.3.5更新於 Nov 10, 2026
MCP Server for Snowflake from Snowflake Labs
概覽
已棄用的 Snowflake Labs MCP 伺服器,可讓助理執行 SQL、管理 Snowflake 物件,並查詢 Cortex Search、Analyst 與 Agent 服務。
- 可以做什麼
- 執行由大型語言模型產生的 SQL,並依設定檔中的語句類型權限過濾
- 建立、修改、刪除、描述與列出資料庫、結構描述、資料表、檢視表、倉儲、角色、暫存區、使用者等常用物件
- 查詢 Cortex Search 服務中的非結構化資料,用於 RAG 式檢索
- 透過 Cortex Analyst 語意模型與語意檢視表查詢結構化資料
- 將預先設定的 Cortex Agent 服務當作工具呼叫
- 透過 stdio、SSE 或 streamable HTTP 提供工具,並支援容器部署
- 適用情境
- 僅適用於仍依賴此社群伺服器的既有環境。README 已標明本專案棄用且不再維護,並要求所有新舊使用情境改用官方 Snowflake MCP Server。
- 執行需求
- 在本機執行的 Python 套件,通常透過 uvx 啟動,並於啟動時傳入 YAML 服務設定檔。需要 Snowflake 帳戶、使用者與角色,以及憑證:SNOWFLAKE_PASSWORD(密碼或程式化存取權杖),或使用 SNOWFLAKE_PRIVATE_KEY、SNOWFLAKE_PRIVATE_KEY_FILE 與 SNOWFLAKE_PRIVATE_KEY_FILE_PWD 的金鑰對驗證;多因素驗證需 SNOWFLAKE_PASSCODE。需要可連線至 Snowflake 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 OSS Snowflake MCP Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
[DEPRECATED] Snowflake Cortex AI Model Context Protocol (MCP) Server
[!CAUTION] This project is deprecated and no longer maintained. Please migrate to the official Snowflake MCP Server. The official server is actively developed, fully supported by Snowflake, and continues to add new features.
This community MCP server previously provided tooling for Snowflake Cortex AI, object management, and SQL orchestration. It is no longer supported. For all new and existing use cases, please use the official Snowflake MCP Server instead.
Legacy documentation (for reference only)
The MCP server supported the below capabilities:
- Cortex Search: Query unstructured data in Snowflake as commonly used in Retrieval Augmented Generation (RAG) applications.
- Cortex Analyst: Query structured data in Snowflake via rich semantic modeling.
- Cortex Agent: Agentic orchestrator across structured and unstructured data retrieval
- Object Management: Perform basic operations against Snowflake's most common objects such as creation, dropping, updating, and more.
- SQL Execution: Run LLM-generated SQL managed by user-configured permissions.
- Semantic View Querying: Discover and query Snowflake Semantic Views
Getting Started
Service Configuration
A simple configuration file is used to drive all tooling. An example can be seen at services/configuration.yaml and a template is below. The path to this configuration file will be passed to the server and the contents used to create MCP server tools at startup.
Cortex Services
Many Cortex Agent, Search, and Analyst services can be added. Ideal descriptions are both highly descriptive and mutually exclusive. Only the explicitly listed Cortex services will be available as tools in the MCP client.
Other Services
Other services include tooling for object management, query execution, and semantic view usage.
These groups of tools can be enabled by setting them to True in the other_services section of the configuration file.
SQL Statement Permissions
The sql_statement_permissions section ensures that only approved statements are executed across any tools with access to change Snowflake objects.
The list contains SQL expression types. Those marked with True are permitted while those marked with False are not permitted. Please see SQL Execution for examples of each expression type.
[!NOTE] Previous versions of the configuration file supported specifying explicit values for columns and limit for each Cortex Search service. Instead, these are now exclusively dynamic based on user prompt. If not specified, a search service's default search_columns will be returned with a limit of 10.
Connecting to Snowflake
The MCP server uses the Snowflake Python Connector for all authentication and connection methods. Please refer to the official Snowflake documentation for comprehensive authentication options and best practices.
The MCP server honors the RBAC permissions assigned to the specified role (as passed in the connection parameters) or default role of the user (if no role is passed to connect).
Connection parameters can be passed as CLI arguments and/or environment variables. The server supports all authentication methods available in the Snowflake Python Connector, including:
- Username/password authentication
- Key pair authentication
- OAuth authentication
- Single Sign-On (SSO)
- Multi-factor authentication (MFA)
Connection Parameters
Connection parameters can be passed as CLI arguments and/or environment variables:
[!WARNING] Deprecation Notice: The CLI arguments
--account-identifierand--pat, as well as the environment variableSNOWFLAKE_PAT, are deprecated and will be removed in a future release. Please use--accountand--password(orSNOWFLAKE_ACCOUNTandSNOWFLAKE_PASSWORD) instead.
Transport Configuration
The MCP server supports multiple transport mechanisms. For detailed information about MCP transports, see FastMCP Transport Protocols.
Usage
Transport Customizations
Server customizations available for sse and streamable-http transports:
Example:
Using with MCP Clients
The MCP server is client-agnostic and will work with most MCP Clients that support basic functionality for MCP tools and (optionally) resources. Below are examples for local installation. For connecting to containerized deployments, see Connecting MCP Clients to Containers.
Claude Desktop
To integrate this server with Claude Desktop as the MCP Client, add the following to your app's server configuration. By default, this is located at:
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%\Claude\claude_desktop_config.json
Set the path to the service configuration file and configure your connection method:
Cursor
Register the MCP server in Cursor by opening Cursor and navigating to Settings -> Cursor Settings -> MCP. Add the below:
Add the MCP server as context in the chat.
[圖片]For troubleshooting Cursor server issues, view the logs by opening the Output panel and selecting Cursor MCP from the dropdown menu.
fast-agent
Update the fastagent.config.yaml mcp server section with the configuration file path and connection name:
Microsoft Visual Studio Code + GitHub Copilot
For prerequisites, environment setup, step-by-step guide and instructions, please refer to this blog.
[圖片]Codex
Register the MCP server in codex by adding the following to ~/.codex/config.toml
After editing, the snowflake mcp should appear in the output of codex mcp list run from the terminal.
Container Deployment
Deploy the MCP server as a container for remote access or production environments. This guide provides step-by-step instructions for both Docker and Docker Compose deployments.
Docker Deployment
Follow these steps to deploy the MCP server using Docker:
Step 1: Prepare Configuration File
Create a directory for MCP configuration and copy the template:
Step 2: Configure Services
Edit the configuration file to match your environment:
Step 3: Build Container Image
Build the Docker image from the provided Dockerfile:
Step 4: Set Environment Variables
Configure your Snowflake connection parameters. Choose one of the following authentication methods:
Username/Password Authentication:
Key Pair Authentication:
Step 5: Run Container
Start the container with your configuration and environment variables:
For Username/Password Authentication:
For Key Pair Authentication:
Step 6: Verify Deployment
Check that the container is running and accessible:
Docker Compose Deployment
Follow these steps for a simplified deployment using Docker Compose:
Step 1: Prepare Configuration File
Create the configuration directory and copy the template:
Step 2: Configure Services
Edit the configuration file to match your environment:
Step 3: Set Environment Variables
Configure your Snowflake connection parameters:
Step 4: Start Services
Launch the container using Docker Compose:
Step 5: Verify Deployment
Check that the services are running:
Connecting MCP Clients to Containers
Once your MCP server is running in a container, you can connect various MCP clients to it. The connection configuration is the same across all clients - only the configuration format differs.
Connection URL Format:
- Local deployment:
http://localhost:9000/snowflake-mcp - Remote deployment:
http://<hostname>:<port>/snowflake-mcp
Claude Desktop
Add this to your claude_desktop_config.json:
Cursor
Add this to your MCP settings in Cursor (Settings -> Cursor Settings -> MCP):
fast-agent
Add this to your fastagent.config.yaml:
Notes:
- For remote deployments, replace
localhost:9000with your server's hostname and port - Ensure your firewall allows connections on port 9000 (or your configured port)
- For production deployments, consider using HTTPS and proper authentication
Cortex Services
Instances of Cortex Agent (in agent_services section), Cortex Search (in search_services section), and Cortex Analyst (in analyst_services section) of the configuration file will be served as tools. Leave these sections blank to omit such tools.
Only Cortex Agent objects are supported in the MCP server. That is, only Cortex Agent objects pre-configured in Snowflake can be leveraged as tools. See Cortex Agent Run API for more details.
Ensure all services have accurate context names for service name, database, schema, etc. Ideal descriptions are both highly descriptive and mutually exclusive.
The semantic_model value in analyst services should be a fully-qualified semantic view OR semantic YAML file in a Snowflake stage:
- For a semantic view:
MY_DATABASE.MY_SCHEMA.MY_SEMANTIC_VIEW - For a semantic YAML file:
@MY_DATABASE.MY_SCHEMA.MY_STAGE/my_semantic_file.yaml(Note the@.)
Object Management
The MCP server includes dozens of tools narrowly scoped to fulfill basic operation management. It is recommended to use Snowsight directly for advanced object management.
The MCP server currently supports creating, dropping, creating or altering, describing, and listing the below object types.
To enable these tools, set object_manager to True in the configuration file under other_services.
Please note that these tools are also governed by permissions captured in the configuration file under sql_statement_permissions.
Object management tools to create and create or alter objects are governed by the Create permission. Object dropping is governed by the Drop permission.
It is likely that more actions and objects will be included in future releases.
SQL Execution
The general SQL tool will provide a way to execute generic SQL statements generated by the MCP client. Users have full control over the types of SQL statement that are approved in the configuration file.
Listed in the configuration file under sql_statement_permissions are sqlglot expression types. Those marked as False will be stopped before execution. Those marked with True will be executed (or prompt the user for execution based on the MCP client settings).
To enable the SQL execution tool, set query_manager to True in the configuration file under other_services.
To allow all SQL expressions to pass the additional validation, set All to True.
Not all Snowflake SQL commands are mapped in sqlglot and you may find some obscure commands have yet to be captured in the configuration file.
Setting Unknown to True will allow these uncaptured commands to pass the additional validation. You may also add new expression types directly to honor specific ones.
Below are some examples of sqlglot expression types with accompanying Snowflake SQL command examples:
Semantic View Querying
Several tools support the discovery and querying of Snowflake Semantic Views and their components. Semantic Views can be listed and described. In addition, you can list their metrics and dimensions. Lastly, you can query Semantic Views directly.
To enable these tools, set semantic_manager to True in the configuration file under other_services.
Troubleshooting
Running MCP Inspector
The MCP Inspector is a powerful debugging tool that provides a web interface to interact with your MCP server directly. It's essential for troubleshooting configuration issues, testing tools, and validating your setup.
Basic Inspector Usage
Launch the inspector with your MCP server configuration:
What the Inspector Shows You
Once launched, the inspector will open a web interface where you can:
- View Available Tools: See all MCP tools loaded from your configuration file
- Test Tool Execution: Call tools directly with custom parameters to verify they work
- Inspect Resources: View any resources exposed by the server
- Debug Connection Issues: See detailed error messages if connection fails
- Validate Configuration: Ensure your service configurations are properly loaded
Common Troubleshooting Scenarios
Configuration File Issues:
- If tools don't appear, check your
tools_config.yamlsyntax - Verify that service names and database/schema references are correct
- Ensure
other_servicesare set toTruefor the tool groups you want
Connection Problems:
- Verify your Snowflake connection parameters are correct
- Check that your role has the necessary permissions for the services you've configured
- For key pair authentication, ensure your private key is properly formatted
Tool Execution Errors:
- Use the inspector to test individual tools with known-good parameters
- Check the server logs for detailed error messages
- Verify that the underlying Snowflake objects (databases, schemas, services) exist
Alternative Debugging Methods
Using Cursor MCP Logs:
- Open Output panel in Cursor
- Select "Cursor MCP" from the dropdown
- View real-time logs as you interact with the MCP server
Command Line Debugging:
Enable debug logging with --verbose or set SNOWFLAKE_MCP_VERBOSE=true:
FAQs
How do I connect to Snowflake?
- The MCP server supports all connection methods supported by the Snowflake Python Connector. See Connecting to Snowflake with the Python Connector for more information.
I'm receiving a tool limit error/warning.
- While LLMs' support for more tools will likely grow, you can hide tool groups by setting them to False in the configuration file. Only listed Cortex services will be made into tools as well.
Can I use a Programmatic Access Token (PAT) instead of a password?
- Yes. Pass it to the CLI flag --password or set as environment variable SNOWFLAKE_PASSWORD.
How do I try this?
- The MCP server is intended to be used as one part of the MCP ecosystem. Think of it as a collection of tools. You'll need an MCP Client to act as an orchestrator. See the MCP Introduction for more information.
Where is this deployed? Is this in Snowpark Container Services?
- All tools in this MCP server are managed services, accessible via REST API. No separate remote service deployment is necessary. Instead, the current version of the server is intended to be started by the MCP client, such as Claude Desktop, Cursor, fast-agent, etc. By configuring these MCP client with the server, the application will spin up the server service for you. Future versions of the MCP server may be deployed as a remote service in the future.
I'm receiving permission errors from my tool calls.
- If using a Programmatic Access Tokens, note that they do not evaluate secondary roles. When creating them, please select a single role that has access to all services and their underlying objects OR select any role. A new PAT will need to be created to alter this property.
How many Cortex Search or Cortex Analysts can I add?
- You may add multiple instances of both services. The MCP Client will determine the appropriate one(s) to use based on the user's prompt.
Help! I'm getting an SSLError?
- If your account name contains underscores, try using the dashed version of the URL.
- Account identifier with underscores:
acme-marketing_test_account - Account identifier with dashes:
acme-marketing-test-account
- Account identifier with underscores:
How do I run the MCP server in a container for multiple users?
- Deploy using Docker or Docker Compose as shown in the Container Deployment section. The containerized server runs on HTTP and can handle multiple concurrent MCP client connections. Configure your environment variables for authentication and mount your configuration file as a read-only volume.
Why aren't my Cortex services showing up as tools?
- Verify that your configuration file syntax is correct (use MCP Inspector to validate)
- Ensure the service names, database names, and schema names match exactly what exists in Snowflake
- Check that your role has access to the specified databases and schemas
- Confirm that the Cortex services actually exist in the specified locations
Can I use different authentication methods for different environments?
- Yes. You can set environment variables differently for each deployment, use different connection names in your connections.toml file, or pass different CLI arguments. The server supports all Snowflake Python Connector authentication methods including username/password, key pairs, OAuth, and SSO.
How do I limit which SQL statements can be executed?
- Use the
sql_statement_permissionssection in your configuration file. Set specific statement types toTrue(allow) orFalse(deny). For maximum security, only enable the statement types you actually need. SetUnknowntoFalseto block unrecognized statement types.
The MCP server is slow to start up. Is this normal?
- Initial startup can take a few seconds as the server connects to Snowflake and validates your configuration. Subsequent tool calls should be much faster. If startup takes more than 30 seconds, check your network connection to Snowflake and verify your authentication credentials.
來源:README.md,提交 662cb48
工具
0版本歷史
1- v1.3.5最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分