analyze_query_results
Execute a query and analyze its results using AI
Explore and query Snowflake in plain English — schema browsing, SQL generation, result analysis and optimisation suggestions.
LABSCO SUMMARY
The AI tools do not run on your client's model — they need your own OPENAI_API_KEY, and query text and sampled rows go to OpenAI when you use them. The plain database tools work without it. Decide which half you want before pointing this at production data, and note that read privileges are what the setup guide asks for.
A FastMCP server that pairs a Snowflake connection with an OpenAI model. The database half lists and describes objects and runs SQL; the model half turns questions into SQL, explains queries in English, and reads results back as analysis.
list_databases, list_schemas, list_tables, describe_tableget_table_sample, execute_sqllist_warehouses, get_warehouse_statusnatural_language_to_sqlanalyze_query_results, explain_query, suggest_query_optimizations, generate_table_insightssnowflake://databases, snowflake://schemas/{database}, snowflake://tables/{database}/{schema}, snowflake://table/{database}/{schema}/{table}sql_analysis_prompt, data_exploration_prompt, sql_optimization_promptSnowflake credentials — SNOWFLAKE_ACCOUNT, SNOWFLAKE_USER, SNOWFLAKE_PASSWORD — with optional SNOWFLAKE_WAREHOUSE, SNOWFLAKE_DATABASE, SNOWFLAKE_SCHEMA and SNOWFLAKE_ROLE for default context. Separately, OPENAI_API_KEY is required for the AI tools, with OPENAI_MODEL defaulting to gpt-4. Python 3.11 or newer. The Snowflake user needs USAGE on warehouses, databases and schemas, SELECT on tables, and SHOW privileges to list objects.
Build from source — git clone https://github.com/rickyb30/datapilot-mcp-server
USE CASES
List the databases, then schemas, then tables, and describe the ones that look relevant — the column detail comes back without writing a query.
Ask in English against a named database and schema, get the generated SQL back, then run it and have the results summarised.
Get the query explained in plain English so you can see what it is really doing, then ask for optimisation suggestions against it.
Pull a sample of rows and generate insights over it, instead of guessing from column names what the data actually contains.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
analyze_query_resultsExecute a query and analyze its results using AI
describe_tableGet detailed information about a table's columns
execute_sqlExecute a SQL query on Snowflake and return results
explain_queryExplain what a SQL query does in plain English
generate_table_insightsGenerate AI-powered insights about a table's data
get_table_sampleGet a sample of data from a table
get_warehouse_statusGet current warehouse, database, and schema status
list_databasesList all databases available to the user
list_schemasList all schemas in a database
list_tablesList all tables in a database/schema
list_warehousesList all warehouses available to the user
natural_language_to_sqlConvert natural language question to SQL query using AI
suggest_query_optimizationsGet AI-powered suggestions for optimizing a SQL query
BEFORE YOU INSTALL
13 tools when we connected.
The documented client runs the server on your machine.
CONTEXT COST
Rated by the size of the 13 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
You clone this one yourself.
git clone https://github.com/rickyb30/datapilot-mcp-server
cd datapilot-mcp-server
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
cp env.template .env
# Edit .env with your credentials{
"mcpServers": {
"datapilot": {
"command": "python",
"args": [
"-m",
"src.main"
],
"cwd": "<YOUR_PATH_TO_DATAPILOT>",
"env": {
"SNOWFLAKE_ACCOUNT": "<YOUR_SNOWFLAKE_ACCOUNT>",
"SNOWFLAKE_USER": "<YOUR_SNOWFLAKE_USER>",
"SNOWFLAKE_PASSWORD": "<YOUR_SNOWFLAKE_PASSWORD>",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
}
}
}
}