The Snowflake MCP Server allows you to connect Claude to your Snowflake database, enabling SQL query execution and data insights extraction through the Model Context Protocol. This server exposes database schema information and provides tools for reading and writing data to Snowflake.
The easiest way to install Snowflake MCP Server for Claude Desktop is through Smithery:
npx -y @smithery/cli install mcp_snowflake_server --client claude
Add the following configuration to your Claude Desktop config file:
"mcpServers": {
"snowflake_pip": {
"command": "uvx",
"args": [
"--python=3.12",
"mcp_snowflake_server",
"--account", "your_account",
"--warehouse", "your_warehouse",
"--user", "your_user",
"--password", "your_password",
"--role", "your_role",
"--database", "your_database",
"--schema", "your_schema"
]
}
}
This approach allows you to manage multiple connection profiles:
"mcpServers": {
"snowflake_production": {
"command": "uvx",
"args": [
"--python=3.12",
"mcp_snowflake_server",
"--connections-file", "/path/to/snowflake_connections.toml",
"--connection-name", "production"
]
},
"snowflake_staging": {
"command": "uvx",
"args": [
"--python=3.12",
"mcp_snowflake_server",
"--connections-file", "/path/to/snowflake_connections.toml",
"--connection-name", "staging"
]
}
}
First, install the Claude AI Desktop App from https://claude.ai/download
Install uv
:
curl -LsSf https://astral.sh/uv/install.sh | sh
.env
file with your Snowflake credentials:SNOWFLAKE_USER="xxx@your_email.com"
SNOWFLAKE_ACCOUNT="xxx"
SNOWFLAKE_ROLE="xxx"
SNOWFLAKE_DATABASE="xxx"
SNOWFLAKE_SCHEMA="xxx"
SNOWFLAKE_WAREHOUSE="xxx"
SNOWFLAKE_PASSWORD="xxx"
SNOWFLAKE_PRIVATE_KEY_PATH=/absolute/path/key.p8
# Alternatively, use external browser authentication:
# SNOWFLAKE_AUTHENTICATOR="externalbrowser"
uv --directory /absolute/path/to/mcp_snowflake_server run mcp_snowflake_server
claude_desktop_config.json
:"mcpServers": {
"snowflake_local": {
"command": "/absolute/path/to/uv",
"args": [
"--python=3.12",
"--directory", "/absolute/path/to/mcp_snowflake_server",
"run", "mcp_snowflake_server"
]
}
}
The server exposes these resources:
memo://insights
: A dynamically updated memo containing data insights discovered during analysiscontext://table/{table_name}
: Individual table schema information (if prefetch is enabled)read_query
: Execute SELECT queries
Input:
- query: "SELECT * FROM your_table LIMIT 10"
Returns: Array of result objects
write_query
: Execute INSERT, UPDATE, or DELETE queries (requires --allow-write
flag)
Input:
- query: "INSERT INTO your_table (column1, column2) VALUES ('value1', 'value2')"
Returns: Number of affected rows
create_table
: Create new tables (requires --allow-write
flag)
Input:
- query: "CREATE TABLE new_table (id INT, name VARCHAR)"
Returns: Confirmation message
list_databases
: List all available databaseslist_schemas
: List all schemas in a database
Input:
- database: "your_database"
Returns: Array of schema names
list_tables
: List all tables in a schema
Input:
- database: "your_database"
- schema: "your_schema"
Returns: Array of table metadata
describe_table
: Get detailed column information for a table
Input:
- table_name: "database.schema.table"
Returns: Array of column definitions
append_insight
: Add new data insights
Input:
- insight: "The average transaction amount is increasing 5% month-over-month"
Returns: Confirmation of addition
Effect: Updates the memo://insights resource
When setting up your server, you can use these additional options:
--allow-write
: Enable write operations (disabled by default)--log-dir
: Specify directory for log files--log-level
: Set logging verbosity (DEBUG/INFO/WARNING/ERROR/CRITICAL)--exclude-tools
: Disable specific toolsAsk Claude to:
Ask Claude to:
Ask Claude to:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "snowflake_pip" '{"command":"uvx","args":["--python=3.12","mcp_snowflake_server","--account","your_account","--warehouse","your_warehouse","--user","your_user","--password","your_password","--role","your_role","--database","your_database","--schema","your_schema"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"snowflake_pip": {
"command": "uvx",
"args": [
"--python=3.12",
"mcp_snowflake_server",
"--account",
"your_account",
"--warehouse",
"your_warehouse",
"--user",
"your_user",
"--password",
"your_password",
"--role",
"your_role",
"--database",
"your_database",
"--schema",
"your_schema"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"snowflake_pip": {
"command": "uvx",
"args": [
"--python=3.12",
"mcp_snowflake_server",
"--account",
"your_account",
"--warehouse",
"your_warehouse",
"--user",
"your_user",
"--password",
"your_password",
"--role",
"your_role",
"--database",
"your_database",
"--schema",
"your_schema"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect