SNOWFLAKE CERTIFIED
How to build an MCP server for Cortex Agents
{
"mcpServers": {
"cortex-agent": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/sfguide-mcp-cortex-agent",
"run",
"cortex_agents.py"
]
}
}
}
{
"mcpServers": {
"cortex-agent": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/sfguide-mcp-cortex-agent",
"run",
"cortex_agents.py"
]
}
}
}
{
"mcpServers": {
"cortex-agent": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/sfguide-mcp-cortex-agent",
"run",
"cortex_agents.py"
]
}
}
}
{
"mcpServers": {
"cortex-agent": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/sfguide-mcp-cortex-agent",
"run",
"cortex_agents.py"
]
}
}
}
{
"mcpServers": {
"cortex-agent": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/sfguide-mcp-cortex-agent",
"run",
"cortex_agents.py"
]
}
}
}
{
"mcpServers": {
"cortex-agent": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/sfguide-mcp-cortex-agent",
"run",
"cortex_agents.py"
]
}
}
}
{
"mcpServers": {
"cortex-agent": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/sfguide-mcp-cortex-agent",
"run",
"cortex_agents.py"
]
}
}
}
{
"mcpServers": {
"cortex-agent": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/sfguide-mcp-cortex-agent",
"run",
"cortex_agents.py"
]
}
}
}
{
"mcpServers": {
"cortex-agent": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/sfguide-mcp-cortex-agent",
"run",
"cortex_agents.py"
]
}
}
}
{
"mcpServers": {
"cortex-agent": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/sfguide-mcp-cortex-agent",
"run",
"cortex_agents.py"
]
}
}
}
Overview
There’s growing excitement around MCP (Model Context Protocol) — and for good reason. It makes it easy to connect your favorite AI tools, like Cursor, Claude, and VS Code, to Snowflake Cortex Agents for real-time, intelligent interaction with your enterprise data. This step-by-step walkthrough helps you go from zero to a fully functional MCP server, starting with just a Snowflake trial account.
MCP bridges the gap between powerful backend AI services and the interfaces developers already use. By setting up your own MCP server, you can unlock seamless AI-powered workflows, directly querying Snowflake Docs or other knowledge sources — all without reinventing your stack.
What you’ll learn:
How to create and configure your own MCP server using Cortex Agents
How to set up secure programmatic access to Snowflake and Cortex Search
How to deploy and run your server locally using uv and the MCP SDK
How to integrate and test it with tools like Cursor for live AI-powered querying
This setup is fully local or self-hostable, giving you control and flexibility as you bring intelligent, data-aware agents into your favorite AI interfaces.
AI agents need tools to create real value. This solution shows how you can connect Cortex Agents as a tool that can reason over enterprise data like documents and databases, to popular applications like Claude Desktop, VS Code and Cursor. We make this connection through MCP, an open protocol that standardizes how applications provide context to LLMs. By using MCP, this solution is broadly useful for any AI application where you want to provide tools that connect to data.
By standing up your own MCP server for Cortex Agents, you can:
Run an MCP server locally or in your own infra, that calls out to the Cortex Agents REST API, with full control over the resources provided to Cortex Agents
Connect the MCP server to your favorite apps, like Cursor and Claude
Supercharging your AI application with access to Cortex Agents via MCP gives you an interoperable way to let your AI assistant reason over enterprise data!
This solution was created by an in-house Snowflake expert and has been verified to work with current Snowflake instances as of the date of publication.
Solution not working as expected? Contact our team for assistance.