execute_query
Executes a SQL query on the Snowflake database.
Parameters: connection (SnowflakeConnection): The Snowflake connection object. query (str): The SQL query to execute.
Returns: result: The result of the query execution.
Run a SQL query against a Snowflake database from the client and get the result back.
LABSCO SUMMARY
execute_query takes a query and nothing else — no schema listing, no row cap, no separate read-only path — so whatever the Snowflake connection is allowed to do is what a client can do through it. That puts the interesting decision before installation rather than after it: the account and role you point it at define the blast radius. In return there is nothing to learn, since anything expressible in SQL is already in scope.
A single-tool bridge to a Snowflake database: one SQL query in, its result out.
A Snowflake database and a connection for the server to run queries over.
Build from source — git clone https://github.com/davidamom/snowflake-mcp.git
USE CASES
Write the SQL, run it over the server's connection, and read the result back in the same conversation.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
execute_queryExecutes a SQL query on the Snowflake database.
Parameters: connection (SnowflakeConnection): The Snowflake connection object. query (str): The SQL query to execute.
Returns: result: The result of the query execution.
BEFORE YOU INSTALL
1 tool when we connected; the project documents 2.
SNOWFLAKE_PRIVATE_KEY_PASSPHRASE in your environment
INSTALLATION
git clone https://github.com/davidamom/snowflake-mcp.git
cd snowflake-mcp
pip install -r requirements.txt{
"mcpServers": {
"snowflake": {
"command": "/usr/bin/python3",
"args": [
"<YOUR_PATH_TO_SNOWFLAKE_MCP>/server.py"
]
}
}
}/usr/bin/python3 has to be the Python you installed the requirements into, and <YOUR_PATH_TO_SNOWFLAKE_MCP> is the full path of your clone.
The Snowflake connection is set outside these blocks: SNOWFLAKE_USER, SNOWFLAKE_ACCOUNT, SNOWFLAKE_DATABASE, SNOWFLAKE_WAREHOUSE and SNOWFLAKE_ROLE, plus SNOWFLAKE_PASSWORD, or for key-pair authentication SNOWFLAKE_PRIVATE_KEY_FILE (and SNOWFLAKE_PRIVATE_KEY_PASSPHRASE if the key is encrypted). The Python route reads them from a .env file in the root of your clone; the Docker block passes them in its env.
git clone https://github.com/davidamom/snowflake-mcp.git
cd snowflake-mcp
docker build -t snowflake-mcp .{
"mcpServers": {
"snowflake-docker": {
"command": "docker",
"args": [
"run",
"-i",
"snowflake-mcp"
],
"env": {
"SNOWFLAKE_USER": "<YOUR_SNOWFLAKE_USER>",
"SNOWFLAKE_ACCOUNT": "<YOUR_SNOWFLAKE_ACCOUNT>",
"SNOWFLAKE_DATABASE": "<YOUR_SNOWFLAKE_DATABASE>",
"SNOWFLAKE_WAREHOUSE": "<YOUR_SNOWFLAKE_WAREHOUSE>",
"SNOWFLAKE_PASSWORD": "<YOUR_SNOWFLAKE_PASSWORD>",
"SNOWFLAKE_ROLE": "<YOUR_SNOWFLAKE_ROLE>"
}
}
}
}The Snowflake connection is set outside these blocks: SNOWFLAKE_USER, SNOWFLAKE_ACCOUNT, SNOWFLAKE_DATABASE, SNOWFLAKE_WAREHOUSE and SNOWFLAKE_ROLE, plus SNOWFLAKE_PASSWORD, or for key-pair authentication SNOWFLAKE_PRIVATE_KEY_FILE (and SNOWFLAKE_PRIVATE_KEY_PASSPHRASE if the key is encrypted). The Python route reads them from a .env file in the root of your clone; the Docker block passes them in its env.