Snowflake MCP Server
Contribute to peterdonaghey/snowflake-mcp development by creating an account on GitHub.
peterdonaghey
README
Snowflake MCP (Model Context Protocol) Server
A Model Context Protocol (MCP) server implementation that allows AI assistants like Claude to interact with Snowflake databases through natural language queries.
Features
- Execute SQL queries on Snowflake databases via natural language
- Automatic database connection lifecycle management (connect, reconnect, close)
- Integration with Claude, Cursor IDE, and other MCP-compatible clients
- Convert natural language to SQL using semantic understanding
- Handle query results and format them for easy reading
- Secure database operations with proper authentication
Prerequisites
- Python 3.8+
- Snowflake account with appropriate access permissions
- MCP-compatible client (Claude, Cursor IDE, etc.)
Installation
- Clone this repository:
git clone https://github.com/yourusername/snowflake-mcp.git
cd snowflake-mcp
- Install the required dependencies:
pip install -r requirements.txt
- Copy the sample environment file and add your Snowflake credentials:
cp .env.sample .env
# Edit .env with your Snowflake credentials
Configuration
Environment Variables
Create a .env
file with your Snowflake credentials:
SNOWFLAKE_USER=your_username
SNOWFLAKE_PASSWORD=your_password
SNOWFLAKE_ACCOUNT=your_account_locator # e.g., xy12345.us-east-2
SNOWFLAKE_DATABASE=your_database
SNOWFLAKE_WAREHOUSE=your_warehouse
SNOWFLAKE_SCHEMA=your_schema # Optional, defaults to PUBLIC
SNOWFLAKE_ROLE=your_role # Optional, defaults to user's default role
MCP Client Configuration
For Cursor IDE:
Cursor automatically discovers and integrates with MCP servers. Just make sure the server is running.
For Claude Desktop:
Add the following to your claude_desktop_config.json
file:
{
"mcpServers": {
"snowflake": {
"command": "/path/to/python",
"args": ["/path/to/snowflake-mcp/src/server.py"]
}
}
}
Replace /path/to/python
with the path to your Python interpreter, and /path/to/snowflake-mcp
with the full path to where you cloned this repository.
Usage
The Snowflake MCP server implements the Model Context Protocol (MCP) specification, allowing AI systems like Claude to connect to Snowflake databases through natural language.
Using MCP CLI (Recommended)
The MCP Python SDK includes a command-line interface that makes it easy to run and manage MCP servers:
- Development Mode with Inspector UI:
mcp dev src/server.py
This starts the server and opens an inspector interface in your browser where you can test the tools.
- Install in Claude Desktop:
mcp install src/server.py
This installs the server in Claude Desktop, making it available for Claude to use.
- Standard Mode:
mcp run src/server.py
This runs the server in standard mode without the inspector interface.
Available Tools
The Snowflake MCP server provides the following tools:
- query_database - Execute SQL or natural language queries on Snowflake
- list_tables - List all tables in the database
- get_table_schema - Get the schema of a specific table
For more examples and detailed parameter information, check the examples/README.md file.
Running Manually
You can also run the server directly, which is useful for debugging:
python src/server.py
This starts the server in standalone mode using stdio transport.
Deployment
Hosting on Smithery
This server can be hosted on Smithery.ai for easy access by other users:
- Create an account on Smithery.ai
- Add your server to the Smithery registry
- Configure deployment using the Dockerfile in this repository
- Click "Deploy" on the Deployments tab on your server page
The Dockerfile is already configured to properly build and run the server with WebSocket transport support for Smithery hosting.
Security Considerations
When hosting your Snowflake MCP server publicly:
- Consider using a read-only Snowflake account
- Restrict access to specific schemas/tables
- Use environment variables for secure credential management
Development
To contribute to this project:
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature
- Make your changes
- Run tests:
pytest
- Commit your changes:
git commit -m 'Add new feature'
- Push to the branch:
git push origin feature/new-feature
- Submit a pull request
License
MIT License
Acknowledgements
- The Model Context Protocol team for creating the standard
- Snowflake for their robust database and API
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
AIO-MCP Server
🚀 All-in-one MCP server with AI search, RAG, and multi-service integrations (GitLab/Jira/Confluence/YouTube) for AI-enhanced development workflows. Folk from
Persistent Knowledge Graph
An implementation of persistent memory for Claude using a local knowledge graph, allowing the AI to remember information about users across conversations with customizable storage location.
Hyperbrowser MCP Server
Welcome to Hyperbrowser, the Internet for AI. Hyperbrowser is the next-generation platform empowering AI agents and enabling effortless, scalable browser automation. Built specifically for AI developers, it eliminates the headaches of local infrastructure and performance bottlenecks, allowing you to
React MCP
react-mcp integrates with Claude Desktop, enabling the creation and modification of React apps based on user prompts
Atlassian Integration
Model Context Protocol (MCP) server for Atlassian Cloud products (Confluence and Jira). This integration is designed specifically for Atlassian Cloud instances and does not support Atlassian Server or Data Center deployments.

Any OpenAI Compatible API Integrations
Integrate Claude with Any OpenAI SDK Compatible Chat Completion API - OpenAI, Perplexity, Groq, xAI, PyroPrompts and more.