Labsco
MCP SERVER

Data Pilot (Snowflake)

by rickyb30

Explore and query Snowflake in plain English — schema browsing, SQL generation, result analysis and optimisation suggestions.

Relational SQL DatabasesVerified
Summary
It calls OpenAI itself, which is a second bill and a second data path.

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.

What it is

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.

What you get
  • Databases, schemas and tables listed, and a table described down to its columns — `list_databases`, `list_schemas`, `list_tables`, `describe_table`
  • Sample rows pulled from a table, and arbitrary SQL executed with results returned — `get_table_sample`, `execute_sql`
  • Warehouses listed and the current warehouse, database and schema reported — `list_warehouses`, `get_warehouse_status`
  • A natural-language question turned into SQL against a named database and schema — `natural_language_to_sql`
  • Query results analysed, queries explained in plain English, optimisations suggested, and table-level insights generated — `analyze_query_results`, `explain_query`, `suggest_query_optimizations`, `generate_table_insights`
  • Four resource URIs for browsing structure directly: `snowflake://databases`, `snowflake://schemas/{database}`, `snowflake://tables/{database}/{schema}`, `snowflake://table/{database}/{schema}/{table}`
  • Three prompt templates for analysis, exploration and optimisation — `sql_analysis_prompt`, `data_exploration_prompt`, `sql_optimization_prompt`
Requirements

Snowflake 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.