Simple Snowflake MCP server that works behind a corporate proxy. Read and write (optional) operations
Simple Snowflake MCP Server to work behind a corporate proxy (because I could not get that in a few minutes with existing servers, but my own server, yup). Still don't know if it's good or not. But it's good enough for now.
The server exposes the following MCP tools to interact with Snowflake:
read_only
is false), result in markdown formatOn MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
"mcpServers": {
"simple_snowflake_mcp": {
"command": "uv",
"args": [
"--directory",
".", // Use current directory for GitHub
"run",
"simple_snowflake_mcp"
]
}
}
"mcpServers": {
"simple_snowflake_mcp": {
"command": "uvx",
"args": [
"simple_snowflake_mcp"
]
}
}
Clone the repository
git clone <your-repo>
cd simple_snowflake_mcp
Set up environment variables
cp .env.example .env
# Edit .env with your Snowflake credentials
Build and run with Docker Compose
# Build the Docker image
docker-compose build
# Start the service
docker-compose up -d
# View logs
docker-compose logs -f
Using Docker Compose directly:
# Build the image
docker-compose build
# Start in production mode
docker-compose up -d
# Start in development mode (with volume mounts for live code changes)
docker-compose --profile dev up simple-snowflake-mcp-dev -d
# View logs
docker-compose logs -f
# Stop the service
docker-compose down
# Clean up (remove containers, images, and volumes)
docker-compose down --rmi all --volumes --remove-orphans
Using the provided Makefile (Windows users can use make
with WSL or install make for Windows):
# See all available commands
make help
# Build and start
make build
make up
# Development mode
make dev-up
# View logs
make logs
# Clean up
make clean
The Docker setup includes:
All Snowflake configuration can be set via environment variables:
SNOWFLAKE_USER
: Your Snowflake username (required)SNOWFLAKE_PASSWORD
: Your Snowflake password (required)SNOWFLAKE_ACCOUNT
: Your Snowflake account identifier (required)SNOWFLAKE_WAREHOUSE
: Warehouse name (optional)SNOWFLAKE_DATABASE
: Default database (optional)SNOWFLAKE_SCHEMA
: Default schema (optional)MCP_READ_ONLY
: Set to "TRUE" for read-only mode (default: TRUE)For development, use the development profile which mounts your source code:
docker-compose --profile dev up simple-snowflake-mcp-dev -d
This allows you to make changes to the code without rebuilding the Docker image.
To prepare the package for distribution:
uv sync
uv build
This will create source and wheel distributions in the dist/
directory.
uv publish
Note: You'll need to set PyPI credentials via environment variables or command flags:
--token
or UV_PUBLISH_TOKEN
--username
/UV_PUBLISH_USERNAME
and --password
/UV_PUBLISH_PASSWORD
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm
with this command:
npx @modelcontextprotocol/inspector uv --directory . run simple-snowflake-mcp
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
The server exposes an MCP tool execute-snowflake-sql
to execute a SQL query on Snowflake and return the result.
Call the MCP tool execute-snowflake-sql
with a sql
argument containing the SQL query to execute. The result will be returned as a list of dictionaries (one per row).
Example:
{
"name": "execute-snowflake-sql",
"arguments": { "sql": "SELECT CURRENT_TIMESTAMP;" }
}
The result will be returned in the MCP response.
Clone the project and install dependencies
git clone <your-repo>
cd simple_snowflake_mcp
python -m venv .venv
.venv/Scripts/activate # Windows
pip install -r requirements.txt # or `uv sync --dev --all-extras` if available
Configure Snowflake access
.env.example
to .env
(or create .env
at the root) and fill in your credentials:
SNOWFLAKE_USER=...
SNOWFLAKE_PASSWORD=...
SNOWFLAKE_ACCOUNT=...
# SNOWFLAKE_WAREHOUSE Optional: Snowflake warehouse name
# SNOWFLAKE_DATABASE Optional: default database name
# SNOWFLAKE_SCHEMA Optional: default schema name
# MCP_READ_ONLY=true|false Optional: true/false to force read-only mode
Configure VS Code for MCP debugging
.vscode/mcp.json
file is already present:
{
"servers": {
"simple-snowflake-mcp": {
"type": "stdio",
"command": ".venv/Scripts/python.exe",
"args": ["-m", "simple_snowflake_mcp"]
}
}
}
MCP: Start Server
and select simple-snowflake-mcp
.Usage
The server exposes the following MCP tools to interact with Snowflake:
read_only
is false), result in markdown formatFor each tool, see the Usage section or the MCP documentation for the call format.