muthuramanathanm/mcp-snowflake-service
If you are the rightful owner of mcp-snowflake-service and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Enhanced MCP Snowflake Server v2.0 is a robust Model Context Protocol server designed to provide comprehensive access to Snowflake databases, enabling efficient data exploration and analysis.
🚀 Enhanced MCP Snowflake Server v2.0
A powerful Model Context Protocol (MCP) server that provides Claude with comprehensive Snowflake database access capabilities.
✨ Enhanced Features
This server provides 7 powerful tools for comprehensive Snowflake exploration:
🔍 Discovery Tools
list_databases- Show all available databaseslist_schemas- List schemas in databaseslist_tables- Show tables in schemassearch_tables- Find tables by pattern
📊 Analysis Tools
describe_table- Show detailed table structureget_table_sample- Retrieve sample dataexecute_query- Run custom SQL queries
🐳 Production Ready
- Docker containerization with health checks
- Comprehensive documentation (3 reference formats)
- Production-grade deployment setup
- 50+ ready-to-use prompts
🚀 Quick Start
Option 1: Docker Deployment (Recommended)
- Clone the repository
git clone https://github.com/muthuramanathanm/mcp-snowflake-service.git
cd mcp-snowflake-service
- Configure credentials
# Create .env file with your Snowflake credentials
cp .env.example .env
# Edit .env with your actual credentials
- Build and run with Docker
docker build -t mcp-snowflake-server .
# The Docker wrapper script handles everything automatically
Option 2: Local Installation
- Clone and install dependencies
git clone https://github.com/muthuramanathanm/mcp-snowflake-service.git
cd mcp-snowflake-service
pip install -r requirements.txt
⚙️ Configuration
Cursor IDE MCP Configuration
Add the following to your Cursor MCP configuration file (~/.cursor/mcp.json):
Docker Deployment (Recommended)
{
"mcpServers": {
"snowflake": {
"mode": "stdio",
"command": "/path/to/mcp-snowflake-service/docker-mcp-wrapper.sh",
"cwd": "/path/to/mcp-snowflake-service"
}
}
}
Local Python Deployment
{
"mcpServers": {
"snowflake": {
"mode": "stdio",
"command": "python",
"args": ["server.py"],
"cwd": "/path/to/mcp-snowflake-service"
}
}
}
Configuration Notes:
- Docker approach: Uses the included wrapper script for containerized deployment
- Local approach: Runs Python directly (requires local Python environment)
- Update paths: Replace
/path/to/mcp-snowflake-servicewith your actual installation path
Snowflake Credentials
Create a .env file in the project root directory:
SNOWFLAKE_USER=your_username
SNOWFLAKE_PASSWORD=your_password
SNOWFLAKE_ACCOUNT=your_account.region # Example: autodesk-stg.us-east-1
SNOWFLAKE_DATABASE=your_database
SNOWFLAKE_WAREHOUSE=your_warehouse
Security Note: Never commit the .env file to version control. Add it to your .gitignore.
🔄 Connection Management
The server provides robust automatic connection management:
-
Automatic initialization
- Creates connection when first query is received
- Validates connection parameters and credentials
- Handles authentication and session setup
-
Connection maintenance
- Tracks connection state and health
- Handles connection timeouts gracefully
- Automatically reconnects if connection is lost
- Implements retry logic with exponential backoff
-
Resource management
- Properly closes connections when server stops
- Releases database resources appropriately
- Prevents connection leaks and orphaned sessions
📚 Usage & Examples
Natural Language Prompts
The server supports intuitive natural language queries. Here are some examples:
Discovery Commands
- "What databases are available?"
- "What schemas are in EDH_PUBLISH database?"
- "Find tables with 'subscription' in the name"
- "What tables are in the PARTNER_WEB_SERVICES_PRIVATE schema?"
Analysis Commands
- "Show me the structure of the ACCOUNT table"
- "Give me 5 sample rows from the SUBSCRIPTION table"
- "Describe the CONTRACTLINEITEM_INT table"
Custom SQL
- "Execute: SELECT COUNT() FROM EDH_PUBLISH.EDH_SHARED.SUBSCRIPTION"*
- "Run: SELECT * FROM ACCOUNT WHERE ID IS NOT NULL LIMIT 3"
Manual Testing
For development and testing, you can run the server standalone:
# Local testing
python server.py
# Docker testing
./test-docker-mcp.sh
🌟 Key Features
- 🔍 7 Powerful Tools - Complete Snowflake exploration toolkit
- 🐳 Docker Ready - Production-grade containerized deployment
- 📖 Rich Documentation - 3 comprehensive reference formats
- 🚀 Natural Language - Intuitive prompts for immediate productivity
- 🔒 Secure - Robust error handling and credential management
- ⚡ High Performance - Optimized connection pooling and caching
📁 Documentation
This repository includes comprehensive documentation:
MCP_PROMPTS_REFERENCE.md- Complete guide with 50+ examples and workflowsQUICK_PROMPTS.txt- Copy-paste ready prompts for immediate usePROMPTS_REFERENCE.json- Structured reference for automationREADME_DOCKER.md- Detailed Docker deployment guide
🛠️ Development
To contribute or report issues:
- Fork this repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
🔐 Security Notes
- Access Control: Snowflake access is controlled through database user permissions
- Read-Only Use: For read-only access, use a Snowflake user with read-only permissions
- Credential Security: Never commit
.envfiles or credentials to version control - Network Security: Use appropriate firewall rules and VPN access as needed
📄 License
This project is licensed under the .
Built with ❤️ for the developer community. Star ⭐ this repo if you find it useful!