trackmcp
Back to directory
nsphung

mcp-snowflake-server

View on GitHub

MCP Snowflake Server NSP - A Snowflake MCP server — SQL queries, schema exploration, and data insights for AI assistants

2 stars PythonOthers Updated Sep 4, 2026
mcpmcp-serversnowflakeagentic-aiagentsdatabasemcp-toolsmodel-context-protocoldockerpython3uvxmodelcontextprotocoldocker-image

Documentation


Snowflake MCP Server NSP

A Model Context Protocol (MCP) server / MCP server that connects AI assistants to Snowflake — enabling SQL queries, schema exploration, and data insights directly from your LLM client.

Highlights:

  • Multiple authentication methods: password, key-pair, external browser, OAuth 2.0 (client credentials & bearer token), TOML connection files
  • TOML multi-connection config — manage `production`, `staging`, and `development` environments in one file
  • Write-safety guard — write operations are disabled by default and must be explicitly enabled
  • Exclusion patterns — filter out databases, schemas, or tables from discovery
  • `--exclude-json-results` flag — reduces LLM context window usage
  • Selective tool exclusion via `--exclude_tools`
  • Prefetch mode — pre-load table schema as MCP resources
  • Docker support with hardened image (DHI, nonroot user, no shell in runtime)

Table of Contents


Quick Start

The fastest way to try it — using `uvx` with a TOML connection file:

bash
# 1. Create a connections file
cat > ~/snowflake_connections.toml  **Contributing or running from source?** See [`CONTRIBUTING.md`](./CONTRIBUTING.md) for local development setup, test commands, formatting, and building the Docker image from source.

---

### Via UVX

TOML configuration (recommended)

"mcpServers": {

"snowflake_production": {

"command": "uvx",

"args": [

"--python=3.13",

"--from", "mcp-snowflake-server-nsp",

"mcp_snowflake_server",

"--connections-file", "/path/to/snowflake_connections.toml",

"--connection-name", "production"

// Optional flags — see Configuration Reference

]

},

"snowflake_staging": {

"command": "uvx",

"args": [

"--python=3.13",

"--from", "mcp-snowflake-server-nsp",

"mcp_snowflake_server",

"--connections-file", "/path/to/snowflake_connections.toml",

"--connection-name", "staging"

]

}

}

code
Individual parameters

"mcpServers": {

"snowflake": {

"command": "uvx",

"args": [

"--python=3.13",

"--from", "mcp-snowflake-server-nsp",

"mcp_snowflake_server",

"--account", "your_account",

"--warehouse", "your_warehouse",

"--user", "your_user",

"--password", "your_password",

"--role", "your_role",

"--database", "your_database",

"--schema", "your_schema"

// Optional: "--private_key_file", "/absolute/path/key.p8"

// Optional: "--private_key_file_pwd", "passphrase"

// Optional flags — see Configuration Reference

]

}

}

code
---

### Via Docker Hub

The image is published on [Docker Hub](https://hub.docker.com/r/nsphung/mcp-snowflake-server-nsp) — no build step required:

docker pull nsphung/mcp-snowflake-server-nsp

code
> **Note:** `-i` (`--interactive`) is required to keep stdin open for the MCP stdio transport. Do **not** use `-d` (detach).

Claude Desktop — claude_desktop_config.json

With `.env` file (see [Authentication](#authentication)):

"mcpServers": {

"snowflake": {

"command": "docker",

"args": [

"run", "--rm", "-i",

"--env-file", "/absolute/path/to/.env",

"nsphung/mcp-snowflake-server-nsp"

]

}

}

code
With TOML connections file:

"mcpServers": {

"snowflake": {

"command": "docker",

"args": [

"run", "--rm", "-i",

"-v", "/path/to/snowflake_connections.toml:/app/snowflake_connections.toml:ro",

"nsphung/mcp-snowflake-server-nsp",

"--connections-file", "/app/snowflake_connections.toml",

"--connection-name", "production"

]

}

}

code
VS Code — .vscode/mcp.json

With `.env` file:

"snowflake": {

"type": "stdio",

"command": "docker",

"args": [

"run", "--rm", "-i",

"nsphung/mcp-snowflake-server-nsp"

],

"envFile": "${workspaceFolder}/.env"

}

code
With TOML connections file:

"snowflake": {

"type": "stdio",

"command": "docker",

"args": [

"run", "--rm", "-i",

"-v", "/path/to/snowflake_connections.toml:/app/snowflake_connections.toml:ro",

"nsphung/mcp-snowflake-server-nsp",

"--connections-file", "/app/snowflake_connections.toml",

"--connection-name", "production"

]

}

code
OpenCode — opencode.jsonc

"snowflake": {

"type": "local",

"command": [

"docker", "run", "--rm", "-i",

"--env-file", "/absolute/path/to/.env",

"nsphung/mcp-snowflake-server-nsp"

],

"enabled": true,

"timeout": 300000

}

code
---

## Configuration Reference

All connection parameters can also be set as environment variables (`SNOWFLAKE_`).

| Flag                           | Env var                          | Default      | Description                                                                                        |
| ------------------------------ | -------------------------------- | ------------ | -------------------------------------------------------------------------------------------------- |
| `--account`                    | `SNOWFLAKE_ACCOUNT`              | —            | Snowflake account identifier                                                                       |
| `--user`                       | `SNOWFLAKE_USER`                 | —            | Snowflake username                                                                                 |
| `--password`                   | `SNOWFLAKE_PASSWORD`             | —            | Password (not required for key-pair / SSO)                                                         |
| `--warehouse`                  | `SNOWFLAKE_WAREHOUSE`            | —            | Virtual warehouse to use                                                                           |
| `--database`                   | `SNOWFLAKE_DATABASE`             | _(required)_ | Default database                                                                                   |
| `--schema`                     | `SNOWFLAKE_SCHEMA`               | _(required)_ | Default schema                                                                                     |
| `--role`                       | `SNOWFLAKE_ROLE`                 | —            | Role to assume                                                                                     |
| `--private_key_file`           | `SNOWFLAKE_PRIVATE_KEY_FILE`     | —            | Absolute path to RSA or ECDSA (ES256/384/512) private key file (`.p8` / `.pem`)                    |
| `--private_key_file_pwd`       | `SNOWFLAKE_PRIVATE_KEY_FILE_PWD` | —            | Passphrase for encrypted private key                                                               |
| `--connections-file`           | —                                | —            | Path to TOML connections file                                                                      |
| `--connection-name`            | —                                | —            | Connection profile name in TOML file (required with `--connections-file`)                          |
| `--allow_write`                | —                                | `false`      | Enable `write_query` and `create_table` tools                                                      |
| `--prefetch` / `--no-prefetch` | —                                | `false`      | Pre-load table schema as `context://table/*` resources (disables `list_tables` / `describe_table`) |
| `--exclude_tools`              | —                                | `[]`         | Space-separated list of tool names to disable                                                      |
| `--exclude-json-results`       | —                                | `false`      | Omit embedded JSON resources from responses (reduces context window usage)                         |
| `--log_dir`                    | —                                | —            | Directory for log file output                                                                      |
| `--log_level`                  | —                                | `INFO`       | Log verbosity: `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`                                     |

---

## Exclusion Patterns

Edit [`runtime_config.json`](https://github.com/nsphung/mcp-snowflake-server/blob/main/runtime_config.json) to exclude databases, schemas, or tables from all discovery tools. Patterns are matched case-insensitively as substrings.

{

"exclude_patterns": {

"databases": ["temp"],

"schemas": ["temp", "information_schema"],

"tables": ["temp"]

}

}

code
The server loads this file automatically at startup from the working directory.

---

## License

This project is licensed under the **MIT License**. See the [`LICENSE`](https://github.com/nsphung/mcp-snowflake-server/blob/main/LICENSE) file for the full text.

---

## Fork and Attribution

This repository is a fork of [`isaacwasserman/mcp-snowflake-server`](https://github.com/isaacwasserman/mcp-snowflake-server).

[![MseeP.ai Security Assessment Badge](https://mseep.net/pr/isaacwasserman-mcp-snowflake-server-badge.png)](https://mseep.ai/app/isaacwasserman-mcp-snowflake-server)

- Upstream authors and contributors retain copyright for their contributions.
- Fork-specific changes are maintained by `nsphung`.
- A summary of notable modifications is tracked in [`NOTICE`](https://github.com/nsphung/mcp-snowflake-server/blob/main/NOTICE).

Frequently asked questions

What is mcp-snowflake-server?

mcp-snowflake-server is MCP Snowflake Server NSP - A Snowflake MCP server — SQL queries, schema exploration, and data insights for AI assistants

How do I install mcp-snowflake-server?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is mcp-snowflake-server open source?

Yes — it is hosted on GitHub at https://github.com/nsphung/mcp-snowflake-server and has 2 stars.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP