DEV Community

Tsubasa Kanno
Tsubasa Kanno

Posted on • Edited on

Unlock Advanced Data Analytics in Cursor with Snowflake MCP Server

⚠️ Major revision notice (July 2026)

The community MCP Server (Snowflake-Labs/mcp) originally covered in this article has been deprecated and is expected to be removed soon. This article has therefore been fully revised to use the official, fully-managed Snowflake Managed MCP Server. Key changes:

  • Replaced the community (OSS) setup steps with the Snowflake Managed MCP Server workflow
  • Changed the Cursor connection to use the Managed MCP Server endpoint URL + PAT (Bearer token)
  • Reflected the rename of "Snowflake Intelligence" to "Snowflake CoWork"
  • Updated configuration and feature descriptions to the latest specification

If you previously set up the community version, please consider migrating to the Snowflake Managed MCP Server.

Introduction

The AI agent movement in development keeps gaining momentum. The Model Context Protocol (MCP), a standardized protocol from Anthropic, enables seamless connections between LLMs and various tools and APIs. And Snowflake now offers an official, fully-managed Snowflake Managed MCP Server!

While Cortex Search and Cortex Analyst were previously available as individual features, now that SQL execution and Cortex Agents can also be bundled as tools, you can access Snowflake's analytics environment directly from MCP clients (like Cursor or Claude Desktop). Simply give natural language instructions to your AI agent and complete your data analysis - a welcome update for developers!

In this article, I'll walk you through setting up and using the Snowflake Managed MCP Server with Cursor, explore the analytics possibilities it unlocks, and discuss when to use it versus Snowflake CoWork (formerly Snowflake Intelligence). If you're an engineer looking to analyze Snowflake data more efficiently, this guide is for you!

Note: The community version (Snowflake-Labs/mcp) has been deprecated and is expected to be removed soon. Going forward, the officially supported Snowflake Managed MCP Server is recommended, and this article is based on it.

Note: This article represents my personal views and not those of Snowflake.

What is Snowflake Managed MCP Server?

Snowflake Managed MCP Server is an official, fully-managed server that integrates various Snowflake features into the MCP ecosystem. By connecting with MCP clients (Cursor, Claude Desktop, etc.), you can operate Snowflake's data analytics capabilities through AI agents.

Its key characteristic is that the server is hosted inside your Snowflake account. There's no need to stand up a separate local server - you simply run a CREATE MCP SERVER SQL statement, and Snowflake provisions a managed endpoint. Authentication and access control ride on Snowflake's RBAC / OAuth, making governance easier to enforce.

Key Features

Snowflake Managed MCP Server lets you combine the following tools and expose them as a single server:

Tool Type Description
Cortex Search (CORTEX_SEARCH_SERVICE_QUERY) Search unstructured data (e.g., for RAG applications)
Cortex Analyst (CORTEX_ANALYST_MESSAGE) Analyze structured data using Semantic Views (Text2SQL)
Cortex Agents (CORTEX_AGENT_RUN) Agentic orchestrator spanning structured and unstructured data
SQL Execution (SYSTEM_EXECUTE_SQL) Execute SQL generated by the AI agent
Custom Tools (GENERIC) Invoke user-defined functions (UDFs) or stored procedures as tools

Note: The Cortex Analyst tool in Snowflake Managed MCP Server works with Semantic Views. Note that YAML-based semantic models are not supported.

Technical Characteristics

  • Snowflake-hosted: No separate infrastructure required; provided as a remote HTTP endpoint
  • RBAC-based permissions: Grant privileges separately to the MCP server itself and to each tool (the server-connection privilege and the tool-execution privilege are managed independently)
  • Flexible authentication: Supports OAuth 2.0 and PAT (Programmatic Access Token)
  • Fine-grained SQL control: The SQL execution tool can be restricted to read-only via the read_only option

Calling Other Tools and Agents from Cortex Agents via MCP

So far we've looked at the "server that exposes Snowflake features to MCP clients (like Cursor)" side. Conversely, Cortex Agents themselves can act as MCP clients. Through MCP Connectors, a Cortex Agent can connect to external MCP servers and invoke their tools during orchestration.

What's interesting is that a Managed MCP Server can expose a Cortex Agent itself as a tool (CORTEX_AGENT_RUN). Combining these, you can build a setup where one agent calls another agent through MCP (agent-to-agent, or A2A). For example, you could have specialized agents handle different domains and delegate work to one another as needed.

Note: When an agent calls another agent, be careful to avoid loops. Snowflake enforces a maximum recursion depth (10 invocations), but you should still design your configuration to avoid circular invocation paths. MCP Connectors coverage continues to expand, so check the official documentation for the latest.

Choosing Between Snowflake CoWork and Managed MCP Server

If you're familiar with Snowflake, you might wonder: "We already have Snowflake CoWork (formerly Snowflake Intelligence) - how should I choose between them?" Here's my perspective:

When Snowflake CoWork is Better

Aspect Details
Target Users Business users, analysts
Environment Web browser-based GUI
Main Use Cases Enterprise data analysis app deployment, report creation
Advantages Easy setup, intuitive GUI operation. All environments managed by Snowflake for enhanced security
Deployment Easy organization-wide rollout

When Snowflake Managed MCP Server is Better

Aspect Details
Target Users Engineers, developers
Environment Development tools like Cursor, Claude Desktop
Main Use Cases Checking data during development, ad-hoc analysis, integration from external applications
Advantages Integrates with development workflow, analyze data alongside code
Deployment Individual or team-level usage

In essence: Choose CoWork for easy enterprise-wide natural language analysis app deployment, and Managed MCP Server for integrating Snowflake analytics into engineering MCP clients. When in doubt, start with the easier-to-adopt Snowflake CoWork to clarify business expectations, then consider Snowflake Managed MCP Server as needed.

Setting Up with Cursor

Let's create a Snowflake Managed MCP Server and connect to it from Cursor. There are three main steps: (1) create the MCP server on the Snowflake side, (2) issue a PAT and set up access, and (3) configure the connection on the Cursor side. We'll use a PAT (Programmatic Access Token) for authentication.

1. Create the MCP Server on Snowflake

Prepare the Tools to Expose

An MCP server exposes Cortex Search / Cortex Analyst / Cortex Agents and more as "tools." Depending on which tools you want, prepare the following in advance:

  • To use Cortex Search: Create a Cortex Search Service (for searching unstructured data)
  • To use Cortex Analyst: Create a Semantic View (for Text2SQL over structured data)
  • To use Cortex Agents: Create a Cortex Agent
  • If you only need SQL execution: No preparation required

Create the MCP Server

Once ready, create the MCP server with CREATE MCP SERVER. List the tools you want to expose in YAML under FROM SPECIFICATION. The following example exposes three tools: Cortex Analyst, Cortex Search, and SQL execution.

CREATE OR REPLACE MCP SERVER MY_DB.MY_SCHEMA.MY_MCP_SERVER
  FROM SPECIFICATION $$
tools:
  # Cortex Analyst (Text2SQL using a Semantic View)
  - name: "sales-analyst"
    type: "CORTEX_ANALYST_MESSAGE"
    identifier: "MY_DB.MY_SCHEMA.SALES_SEMANTIC_VIEW"
    description: "Semantic view for analyzing sales data"
    title: "Sales Analysis"

  # Cortex Search (search unstructured data)
  - name: "manual-search"
    type: "CORTEX_SEARCH_SERVICE_QUERY"
    identifier: "MY_DB.MY_SCHEMA.MANUAL_SEARCH_SERVICE"
    description: "Search documents such as operations manuals"
    title: "Document Search"

  # SQL execution (restricted to read-only via read_only)
  - name: "sql_exec_tool"
    type: "SYSTEM_EXECUTE_SQL"
    description: "Execute read-only SQL against Snowflake"
    title: "SQL Execution"
    config:
      read_only: true
      query_timeout: 600
$$;
Enter fullscreen mode Exit fullscreen mode

Each tool's description helps the AI agent decide which tool to use, so write it as specifically as possible. After creation, you can list your servers:

SHOW MCP SERVERS IN SCHEMA MY_DB.MY_SCHEMA;
Enter fullscreen mode Exit fullscreen mode

Note: The identifier for a Cortex Analyst tool must point to a Semantic View (YAML-based semantic models are not supported). Also, a single MCP server can hold up to 50 tools; too many tools can reduce tool-selection accuracy, so consider splitting servers by purpose.

2. Generate a PAT and Set Up Access

Grant Privileges to the Connecting Role

Connections to the MCP server use role-based access control (RBAC). Note that the privilege to connect to the MCP server and the privileges on the objects each tool references must be granted separately. Prepare a least-privilege role and grant the required privileges.

First, grant the USAGE needed to connect to (list and call tools on) the MCP server:

GRANT USAGE ON MCP SERVER MY_DB.MY_SCHEMA.MY_MCP_SERVER TO ROLE MY_MCP_ROLE;
Enter fullscreen mode Exit fullscreen mode

In addition, grant the role the following privileges on the objects each exposed tool references:

Tool Required Privilege
Cortex Search USAGE on the target Cortex Search Service
Cortex Analyst SELECT on the target Semantic View
Cortex Agents USAGE on the target Cortex Agent
Custom Tools USAGE on the target UDF / stored procedure

Note: Even if a role can access the MCP server, it can't run a tool without privileges on the objects that tool references. Following the least-privilege principle, grant privileges only on the objects for the tools you need.

Generate the PAT

Next, log into Snowsight and generate a PAT:

  1. Click your profile icon in the bottom left and select Settings
  2. Navigate to the Authentication section
  3. Click the Generate New Token button
  4. Set the token name and expiration
  5. For the role, select the connecting role you prepared earlier
  6. Copy the generated token

PAT Generation Screenshot

Important: By default, using a PAT requires the user to be subject to a network policy. Without a network policy, PAT authentication may fail. For detailed PAT requirements, please refer to the official Snowflake documentation.

3. Configure Cursor MCP

Open the MCP settings in Cursor and add a new MCP server, or edit the configuration file (~/.cursor/mcp.json) directly. Because the Managed MCP Server is accessed as a remote HTTP endpoint, you specify the endpoint URL and an authentication header (PAT).

{
  "mcpServers": {
    "snowflake": {
      "url": "https://<orgname>-<account_name>.snowflakecomputing.com/api/v2/databases/<database>/schemas/<schema>/mcp-servers/<mcp_server_name>",
      "headers": {
        "Authorization": "Bearer <the PAT you generated earlier>"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

The endpoint URL follows the format https://<account_url>/api/v2/databases/{database}/schemas/{schema}/mcp-servers/{mcp_server_name}.

Note: In the hostname part of the URL, if your account identifier contains underscores (_), replace them with hyphens (-) (e.g., ORGNAME-AAA_BBBORGNAME-AAA-BBB). Leaving underscores can cause connection failures.

Note: This article uses PAT authentication for simplicity, but OAuth 2.0 is recommended for production. However, the library that Cursor and Claude Desktop use internally does not support Dynamic Client Registration (DCR), so OAuth may require extra considerations. For that reason, PAT (Bearer token) is the practical connection method for Cursor. For OAuth steps, see the official documentation.

4. Verifying Connection

After configuration, confirm the server is enabled in Cursor's MCP settings. When successfully connected, a green indicator lights up on the MCP Server icon, and Snowflake features become available in Cursor's chat interface.

Connection Success Screenshot

Practical Examples

Let's explore data analysis using Snowflake Managed MCP Server from Cursor!

Example 1: Natural Language Data Exploration

Type this in Cursor's chat:

List all Snowflake databases.
Enter fullscreen mode Exit fullscreen mode

MCP Server automatically generates and executes appropriate SQL, returning results:

SNOWFLAKE Database List

1. SALES
Database managing customer sales data

2. CUSTOMER
Database managing customer information
...
Enter fullscreen mode Exit fullscreen mode

The AI Agent generates and executes appropriate SQL within your Snowflake role's permissions and the range allowed by the SQL execution tool's configuration (such as read_only).

Example 2: Searching Unstructured Data with Cortex Search

When searching for specific information from internal documents:

Summarize the operations manual.
Enter fullscreen mode Exit fullscreen mode

The configured Cortex Search Service is automatically called, returning relevant information:

📚 RetailCorp Operations Manual Summary
🏢 Company Philosophy
Mission: "Delivering exceptional customer experiences through innovation and quality"
Core Values:
Customer-first approach
Operational excellence
Sustainable growth
Employee empowerment
...
Enter fullscreen mode Exit fullscreen mode

Example 3: Complex Analysis Queries

Analyze monthly sales trends for H2 2024 and identify variation factors.
Enter fullscreen mode Exit fullscreen mode

Cortex Analyst interprets the Semantic View, generates an appropriate SQL query, and Cursor's AI Agent returns the result as a report:

📊 H2 2024 Sales Analysis Report

📈 Monthly Sales Trends
Month       Sales ($)   MoM Change  Features
July        152,435     -       H2 Start
August      248,291     +62.8%      Peak month
September   201,762     -18.8%      High level maintained
October     149,698     -25.8%      Sales decline
November    145,386     -2.9%       Lowest month
December    292,847     +101.3%     Holiday surge
Total       1,190,419   -       H2 Total

🔍 Key Variation Factors
1. Seasonal Factors
August: Back-to-school season peak
High-volume sales of electronics and premium products
Product lineup generating $75K per SKU

December: Holiday shopping season
Sales more than doubled from previous month
December 16 ($107,145) and 24 ($106,221) were exceptional days
Black Friday and Cyber Monday impact
...
Enter fullscreen mode Exit fullscreen mode

Best Practices

Permission Configuration Guidelines

With Snowflake Managed MCP Server, you can operate securely by combining RBAC with per-tool settings.

  • Restrict to read-only: Set the SQL execution tool to read_only: true to limit it to reference queries
  • Use least-privilege roles: Bind the PAT to a role that only has privileges on the objects for the tools you need
  • Split servers by purpose: Use separate MCP servers for development and production, varying the exposed tools and privileges

Conclusion

Snowflake Managed MCP Server is a tool that meaningfully improves the developer experience. It delivers particular value through:

  • Development Flow Integration: Analyze data without leaving Cursor
  • Natural Language Operations: Execute complex analysis tasks with natural language instructions to AI Agents without writing SQL
  • Secure Execution Environment: Safe usage through granular permission controls

Having tried it myself, I find it incredibly convenient to complete everything within Cursor without switching tools when wondering "What was that table structure?" or "I need to check sales trends for this period."

While Snowflake CoWork is a powerful tool for promoting organization-wide data utilization, the Managed MCP Server integrated with daily development tools offers different value for engineers and data scientists. By choosing the right tool for each use case, we can achieve more efficient data utilization.

Give Snowflake Managed MCP Server a try today!

Promotion

Snowflake What's New Updates on X

I share Snowflake What's New updates on X. Follow for the latest insights:

English Version

Snowflake What's New Bot (English Version)

Japanese Version

Snowflake's What's New Bot (Japanese Version)

Change Log

(20250901) Initial post
(20260702) Major revision: replaced the deprecated community MCP Server (Snowflake-Labs/mcp) with the Snowflake Managed MCP Server, reflected the Snowflake Intelligence -> Snowflake CoWork rename, and added coverage of the Cortex Agents MCP client capability (A2A).

Original Japanese Article

https://zenn.dev/tsubasa_tech/articles/70ab5fb2b5ed99

Top comments (0)