Back to Home
aPeterHeise icon

snowflake-mcp-server

by aPeterHeise

Overview

Provides a semantic layer for Snowflake, translating natural language questions into SQL using an LLM and a defined glossary.

Installation

Run Command
python src/server.py

Environment Variables

  • OPENAI_API_KEY
  • SNOWFLAKE_USER
  • SNOWFLAKE_PASSWORD
  • SNOWFLAKE_ACCOUNT
  • SNOWFLAKE_ROLE
  • SNOWFLAKE_WAREHOUSE
  • SNOWFLAKE_DATABASE
  • SNOWFLAKE_SCHEMA

Security Notes

The server directly executes SQL queries generated by an LLM based on user input and a glossary. This poses a significant risk if the LLM is prompted to generate malicious SQL (e.g., DROP TABLE, DELETE FROM, data exfiltration queries, or complex injections). There is no explicit validation or sanitization of the generated SQL before execution by the `run_sql` function. While environment variables are used for credentials, the execution of arbitrary LLM-generated SQL without stringent safeguards is a critical vulnerability. The `SNOWFLAKE_ROLE` might offer some protection but is not a complete solution against all malicious SQL types.

Similar Servers

Stats

Interest Score11
Security Score3
Cost ClassLow
Avg Tokens300
Stars1
Forks0
Last Update2025-12-20

Tags

Semantic LayerSnowflakeLLMNatural Language to SQLData Analytics