Access Snowflake Cortex AI Capabilities
Query structured and unstructured Snowflake data via Cortex Search, Cortex Analyst (Text2SQL), and Cortex Agent orchestration.
Why it matters
Leverage Snowflake Cortex AI for advanced data querying and analysis. This asset provides access to Cortex Search for RAG, Cortex Analyst for structured data queries, and Cortex Agent for orchestrating complex data tasks.
Outcomes
What it gets done
Query unstructured data using Cortex Search for RAG applications.
Analyze structured data via semantic modeling with Cortex Analyst.
Orchestrate data extraction and analysis across data types with Cortex Agent.
Execute SQL queries directly on Snowflake data.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-snowflake-cortex-mcp-server | bash Capabilities
Tools your agent gets
Query unstructured data in Snowflake for Retrieval Augmented Generation (RAG) applications
Query structured data in Snowflake through advanced semantic modeling
Agent orchestrator for extracting structured and unstructured data
Execute SQL queries
Overview
Snowflake Cortex MCP Server
Snowflake Cortex MCP Server gives an AI assistant access to Cortex Search (unstructured/RAG), Cortex Analyst (text-to-SQL on structured data), and Cortex Agent (cross-data-type orchestration), authenticated via a Snowflake Personal Access Token. Use it for natural-language queries against Snowflake structured or unstructured data. Requires a Snowflake PAT with the correct primary role configured, since PATs don't evaluate secondary roles.
What it does
Snowflake Cortex MCP Server gives an AI assistant access to Snowflake's Cortex AI capabilities - Cortex Search for querying unstructured data (RAG use cases), Cortex Analyst for querying structured data via semantic modeling and text-to-SQL, and Cortex Agent for orchestrating across both structured and unstructured data types.
When to use - and when NOT to
Use it when you want to ask natural-language questions against Snowflake data - like "Show me the top selling brands by total sales quantity in TX for Books in 2003" - and have Cortex Analyst translate that into SQL against a semantic model, or use Cortex Search for RAG-style retrieval from unstructured data, or let Cortex Agent decide which data source to query. Do not use it without a Snowflake Personal Access Token (SNOWFLAKE_PAT) with the correct role configuration - PATs do not evaluate secondary roles, so make sure the token's primary role has the permissions your queries need.
Capabilities
cortex_search: query unstructured data in Snowflake for RAG applications.cortex_analyst_text_to_sql: query structured data through advanced semantic modeling (text-to-SQL).cortex_agent: agent orchestrator for extracting structured and unstructured data across sources.sql_execution_tool: execute raw SQL queries directly.
Additional capabilities include a Payload Builder for dynamically constructing agent requests, streaming responses via SSE, and support for multiple Cortex Search and Analyst instances configured via environment variables.
How to install
yarn dev
Debug with the MCP Inspector: yarn inspector or npx @modelcontextprotocol/inspector tsx --env-file .env dist/mcp/MCP.js. Configure Claude Desktop:
{
"mcpServers": {
"Cortex Agent AI": {
"command": "ABSOLUTE_PATH\\npx.cmd",
"args": ["tsx", "--watch", "--env-file", "ABSOLUTE_PATH\\.env", "ABSOLUTE_PATH\\src\\mcp\\MCP.ts"]
}
}
}
Required: SNOWFLAKE_PAT. Optional: SEMANTIC_MODEL_VIEW (semantic model file for Text2SQL), VEHICLES_SEARCH_SERVICE (search service name). Also compatible with VS Code + GitHub Copilot and other MCP clients over stdio/sockets.
Who it's for
Data analysts and engineers using Snowflake Cortex who want an AI assistant to answer natural-language questions against both structured and unstructured Snowflake data without writing SQL or search queries by hand.
Source README
Provides access to Snowflake Cortex AI capabilities, including Cortex Search for unstructured data, Cortex Analyst for querying structured data, and Cortex Agent for agent orchestration across different data types.
Installation
Yarn Dev
yarn dev
MCP Inspector
yarn inspector
MCP Inspector (NPX)
npx @modelcontextprotocol/inspector tsx --env-file .env dist/mcp/MCP.js
Configuration
Claude Desktop
{
"mcpServers": {
"Cortex Agent AI": {
"command": "ABSOLUTE_PATH\\npx.cmd",
"args": [
"tsx",
"--watch",
"--env-file",
"ABSOLUTE_PATH\\.env",
"ABSOLUTE_PATH\\src\\mcp\\MCP.ts"
]
}
}
}
Available Tools
| Tool | Description |
|---|---|
cortex_search |
Query unstructured data in Snowflake for Retrieval Augmented Generation (RAG) applications |
cortex_analyst_text_to_sql |
Query structured data in Snowflake through advanced semantic modeling |
cortex_agent |
Agent orchestrator for extracting structured and unstructured data |
sql_execution_tool |
Execute SQL queries |
Capabilities
- Cortex Search for querying unstructured data in RAG applications
- Cortex Analyst for querying structured data through semantic modeling
- Cortex Agent for agent orchestration across different data types
- Payload Builder for dynamic construction of agent requests
- Support for streaming responses via SSE
- Support for multiple Cortex Search and Analyst instances
- Configuration via environment variables
Environment Variables
Required
SNOWFLAKE_PAT- Personal access token for Snowflake authentication
Optional
SEMANTIC_MODEL_VIEW- Semantic model file for the Text2SQL toolVEHICLES_SEARCH_SERVICE- Name of the vehicle search service
Usage Examples
Show me the top selling brands by total sales quantity in TX for Books in 2003
Notes
MCP servers operate as companion services and communicate via stdio/sockets, not HTTP. They should not be confused with Next.js API backends. The server uses the Snowflake Cortex REST API for authentication and supports multiple MCP clients, including Claude Desktop, VS Code with GitHub Copilot, and others. Personal access tokens do not evaluate secondary roles and require proper role configuration.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.