# Snowflake Labs Mcp

> MCP Server for Snowflake from Snowflake Labs

- **Type:** MCP server
- **Install:** `agentstack add mcp-snowflake-labs-mcp`
- **Verified:** Pending review
- **Seller:** [Snowflake-Labs](https://agentstack.voostack.com/s/snowflake-labs)
- **Installs:** 0
- **Latest version:** 1.3.3
- **License:** Apache-2.0
- **Upstream author:** [Snowflake-Labs](https://github.com/Snowflake-Labs)
- **Source:** https://github.com/Snowflake-Labs/mcp

## Install

```sh
agentstack add mcp-snowflake-labs-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# [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](https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents-mcp). 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](https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents-mcp) instead.

---

Legacy documentation (for reference only)

The MCP server supported the below capabilities:
- **[Cortex Search](https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-search/cortex-search-overview)**: Query unstructured data in Snowflake as commonly used in Retrieval Augmented Generation (RAG) applications.
- **[Cortex Analyst](https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-analyst)**: Query structured data in Snowflake via rich semantic modeling.
- **[Cortex Agent](https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents)**: 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](https://docs.snowflake.com/en/user-guide/views-semantic/overview)**: 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](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](object-management), [query execution](sql-execution), and [semantic view usage](semantic-view-querying).
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](#sql-execution) for examples of each expression type.

```
agent_services: # List all Cortex Agent services
  - service_name: 
    description: > # Describe contents of the agent service
      
    database_name: 
    schema_name: 
  - service_name: 
    description: > # Describe contents of the agent service
      
    database_name: 
    schema_name: 
search_services: # List all Cortex Search services
  - service_name: 
    description: > # Describe contents of the search service
      
    database_name: 
    schema_name: 
  - service_name: 
    description: > # Describe contents of the search service
      
    database_name: 
    schema_name: 
analyst_services: # List all Cortex Analyst semantic models/views
  - service_name:  # Create descriptive name for the service
    semantic_model:  # Fully-qualify semantic YAML model or Semantic View
    description: > # Describe contents of the analyst service
      
  - service_name:  # Create descriptive name for the service
    semantic_model:  # Fully-qualify semantic YAML model or Semantic View
    description: > # Describe contents of the analyst service
      
other_services: # Set desired tool groups to True to enable tools for that group
  object_manager: True # Perform basic operations against Snowflake's most common objects such as creation, dropping, updating, and more.
  query_manager: True # Run LLM-generated SQL managed by user-configured permissions.
  semantic_manager: True # Discover and query Snowflake Semantic Views and their components.
sql_statement_permissions: # List SQL statements to explicitly allow (True) or disallow (False).
  # - All: True # To allow everything, uncomment and set All: True.
  - Alter: True
  - Command: True
  - Comment: True
  - Commit: True
  - Copy: True
  - Create: True
  - Delete: True
  - Describe: True
  - Drop: True
  - Insert: True
  - Merge: True
  - Rollback: True
  - Select: True
  - Transaction: True
  - TruncateTable: True
  - Unknown: False # To allow unknown or unmapped statement types, set Unknown: True.
  - Update: True
  - Use: True
```

> [!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](https://docs.snowflake.com/en/developer-guide/python-connector/python-connector-connect) 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:

| Parameter | CLI Arguments | Environment Variable | Description |
|-----------|--------------|---------------------|-------------|
| Account | --account | SNOWFLAKE_ACCOUNT | Account identifier (e.g. xy12345.us-east-1) |
| Host | --host | SNOWFLAKE_HOST | Snowflake host URL |
| User | --user, --username | SNOWFLAKE_USER | Username for authentication |
| Password | --password | SNOWFLAKE_PASSWORD | Password or programmatic access token |
| Role | --role | SNOWFLAKE_ROLE | Role to use for connection |
| Warehouse | --warehouse | SNOWFLAKE_WAREHOUSE | Warehouse to use for queries |
| Passcode in Password | --passcode-in-password | - | Whether passcode is embedded in password |
| Passcode | --passcode | SNOWFLAKE_PASSCODE | MFA passcode for authentication |
| Private Key | --private-key | SNOWFLAKE_PRIVATE_KEY | Private key for key pair authentication |
| Private Key File | --private-key-file | SNOWFLAKE_PRIVATE_KEY_FILE | Path to private key file |
| Private Key Password | --private-key-file-pwd | SNOWFLAKE_PRIVATE_KEY_FILE_PWD | Password for encrypted private key |
| Authenticator | --authenticator | - | Authentication type (default: snowflake) |
| Connection Name | --connection-name | - | Name of connection from connections.toml (or config.toml) file |

> [!WARNING]
> **Deprecation Notice**: The CLI arguments `--account-identifier` and `--pat`, as well as the environment variable `SNOWFLAKE_PAT`, are deprecated and will be removed in a future release. Please use `--account` and `--password` (or `SNOWFLAKE_ACCOUNT` and `SNOWFLAKE_PASSWORD`) instead.

# Transport Configuration

The MCP server supports multiple transport mechanisms. For detailed information about MCP transports, see [FastMCP Transport Protocols](https://gofastmcp.com/deployment/running-server#transport-protocols).

| Transport | Description | Use Case |
|-----------|-------------|----------|
| `stdio` | Standard input/output (default) | Local development, MCP client integration |
| `sse` (legacy) | Server-Sent Events | Streaming applications |
| `streamable-http` | Streamable HTTP transport | Container deployments, remote servers |

## Usage

```bash
# Default stdio transport
uvx snowflake-labs-mcp --service-config-file config.yaml

# HTTP transport with custom endpoint
uvx snowflake-labs-mcp --service-config-file config.yaml --transport streamable-http --endpoint /my-endpoint

# For containers (uses streamable-http on port 9000)
uvx snowflake-labs-mcp --service-config-file config.yaml --transport streamable-http --endpoint /snowflake-mcp
```

## Transport Customizations
Server customizations available for `sse` and `streamable-http` transports:

| Parameter | CLI Argument | Environment Variable | Default |
|-----------|--------------|---------------------|------------------|
| Host | --server-host | SNOWFLAKE_MCP_HOST | "0.0.0.0"
| Port | --port | SNOWFLAKE_MCP_PORT | 9000
| Endpoint | --endpoint | SNOWFLAKE_MCP_ENDPOINT | /mcp
| Debug Logging | --verbose | SNOWFLAKE_MCP_VERBOSE | false

Example:
```bash
export SNOWFLAKE_MCP_ENDPOINT="/my-mcp"
uvx snowflake-labs-mcp --service-config-file config.yaml --transport streamable-http
```

# 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](#connecting-mcp-clients-to-containers).

## [Claude Desktop](https://support.anthropic.com/en/articles/10065433-installing-claude-for-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:

```json
{
  "mcpServers": {
    "mcp-server-snowflake": {
      "command": "uvx",
      "args": [
        "snowflake-labs-mcp",
        "--service-config-file",
        "/tools_config.yaml",
        "--connection-name",
        "default"
      ]
    }
  }
}
```

## [Cursor](https://www.cursor.com/)

Register the MCP server in Cursor by opening Cursor and navigating to Settings -> Cursor Settings -> MCP. Add the below:
```json
{
  "mcpServers": {
    "mcp-server-snowflake": {
      "command": "uvx",
      "args": [
        "snowflake-labs-mcp",
        "--service-config-file",
        "/tools_config.yaml",
        "--connection-name",
        "default"
      ]
    }
  }
}
```

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](https://fast-agent.ai/)

Update the `fastagent.config.yaml` mcp server section with the configuration file path and connection name:

```yaml
# MCP Servers
mcp:
    servers:
        mcp-server-snowflake:
            command: "uvx"
            args: ["snowflake-labs-mcp", "--service-config-file", "/tools_config.yaml", "--connection-name", "default"]
```

## Microsoft Visual Studio Code + GitHub Copilot

For prerequisites, environment setup, step-by-step guide and instructions, please refer to this [blog](https://medium.com/snowflake/build-a-natural-language-data-assistant-in-vs-code-with-copilot-mcp-and-snowflake-cortex-ai-04a22a3b0f17).

## [Codex](https://github.com/openai/codex)
Register the MCP server in codex by adding the following to `~/.codex/config.toml`
```toml
[mcp_servers.mcp-server-snowflake]
command = "uvx"
args = [
    "snowflake-labs-mcp",
    "--service-config-file",
    "/tools_config.yaml",
    "--connection-name",
    "default"
]
```
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:
```bash
mkdir -p ${HOME}/.mcp/
cp services/configuration.yaml ${HOME}/.mcp/tools_config.yaml
```

### Step 2: Configure Services
Edit the configuration file to match your environment:
```bash
# Edit the configuration file as needed
# Update service names, database/schema references, and enable desired features
nano ${HOME}/.mcp/tools_config.yaml
```

### Step 3: Build Container Image
Build the Docker image from the provided Dockerfile:
```bash
docker build -f docker/server/Dockerfile -t mcp-server-snowflake .
```

### Step 4: Set Environment Variables
Configure your Snowflake connection parameters. Choose one of the following authentication methods:

**Username/Password Authentication:**
```bash
export SNOWFLAKE_ACCOUNT=
export SNOWFLAKE_USER=
export SNOWFLAKE_PASSWORD=
```

**Key Pair Authentication:**
```bash
export SNOWFLAKE_ACCOUNT=
export SNOWFLAKE_USER=
export SNOWFLAKE_PRIVATE_KEY="$(cat )"
export SNOWFLAKE_PRIVATE_KEY_FILE_PWD=
```

### Step 5: Run Container
Start the container with your configuration and environment variables:

**For Username/Password Authentication:**
```bash
docker run -d \
  --name mcp-server-snowflake \
  -p 9000:9000 \
  -e SNOWFLAKE_ACCOUNT=${SNOWFLAKE_ACCOUNT} \
  -e SNOWFLAKE_USER=${SNOWFLAKE_USER} \
  -e SNOWFLAKE_PASSWORD=${SNOWFLAKE_PASSWORD} \
  -v ${HOME}/.mcp/tools_config.yaml:/app/services/tools_config.yaml:ro \
  mcp-server-snowflake
```

**For Key Pair Authentication:**
```bash
docker run -d \
  --name mcp-server-snowflake \
  -p 9000:9000 \
  -e SNOWFLAKE_ACCOUNT=${SNOWFLAKE_ACCOUNT} \
  -e SNOWFLAKE_USER=${SNOWFLAKE_USER} \
  -e SNOWFLAKE_PRIVATE_KEY="${SNOWFLAKE_PRIVATE_KEY}" \
  -e SNOWFLAKE_PRIVATE_KEY_FILE_PWD=${SNOWFLAKE_PRIVATE_KEY_FILE_PWD} \
  -v ${HOME}/.mcp/tools_config.yaml:/app/services/tools_config.yaml:ro \
  mcp-server-snowflake
```

### Step 6: Verify Deployment
Check that the container is running and accessible:
```bash
# Check container status
docker ps

# Check container logs
docker logs mcp-server-snowflake

# Test endpoint (should return MCP server info)
curl http://localhost:9000/snowflake-mcp
```

## 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:
```bash
mkdir -p ${HOME}/.mcp/
cp services/configuration.yaml ${HOME}/.mcp/tools_config.yaml
```

### Step 2: Configure Services
Edit the configuration file to match your environment:
```bash
# Update service configurations as needed
nano ${HOME}/.mcp/tools_config.yaml
```

### Step 3: Set Environment Variables
Configure your Snowflake connection parameters:
```bash
export SNOWFLAKE_ACCOUNT=
export SNOWFLAKE_USER=
# For username/password auth:
export SNOWFLAKE_PASSWORD=
# For key pair auth, also set:
# export SNOWFLAKE_PRIVATE_KEY="$(cat )"
# export SNOWFLAKE_PRIVATE_KEY_FILE_PWD=
```

### Step 4: Start Services
Launch the container using Docker Compose:
```bash
docker-compose up -d
```

### Step 5: Verify Deployment
Check that the services are running:
```bash
# Check service status
docker-compose ps

# View logs
docker-compose logs

# Test endpoint
curl http://localhost:9000/snowflake-mcp
```

## 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 th

…

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Snowflake-Labs](https://github.com/Snowflake-Labs)
- **Source:** [Snowflake-Labs/mcp](https://github.com/Snowflake-Labs/mcp)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Versions

- **1.3.3** — security scan: pending review — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-snowflake-labs-mcp
- Seller: https://agentstack.voostack.com/s/snowflake-labs
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
