This MCP server implements the Model Context Protocol to allow Claude to execute SQL queries on Snowflake databases. It handles database connections automatically, manages query results and errors, and performs database operations safely.
To install mcp-service-snowflake for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @datawiz168/mcp-service-snowflake --client claude
git clone https://github.com/datawiz168/mcp-snowflake-service.git
pip install -r requirements.txt
Add the following configuration to claude_desktop_config.json
:
{
"mcpServers": {
"snowflake": {
"command": "C:\\Users\\K\\anaconda3\\envs\\regular310\\python.exe",
"args": ["D:\\tools\\mcp-snowflake\\server.py"]
}
}
}
Configuration parameters:
command
: Full path to your Python interpreterargs
: Full path to the server scriptExample paths for different operating systems:
Windows:
{
"mcpServers": {
"snowflake": {
"command": "C:\\Users\\YourUsername\\anaconda3\\python.exe",
"args": ["C:\\Path\\To\\mcp-snowflake\\server.py"]
}
}
}
MacOS/Linux:
{
"mcpServers": {
"snowflake": {
"command": "/usr/bin/python3",
"args": ["/path/to/mcp-snowflake/server.py"]
}
}
}
Create a .env
file in the project root directory with the following configuration:
SNOWFLAKE_USER=your_username # Your username
SNOWFLAKE_PASSWORD=your_password # Your password
SNOWFLAKE_ACCOUNT=NRB18479.US-WEST-2 # Example: NRB18479.US-WEST-2
SNOWFLAKE_DATABASE=your_database # Your database
SNOWFLAKE_WAREHOUSE=your_warehouse # Your warehouse
The server provides automatic connection management features:
Automatic connection initialization
Connection maintenance
Connection cleanup
The server will start automatically with the Claude Desktop client. No manual startup is required. Once the server is running, Claude will be able to execute Snowflake queries.
For development testing, you can start the server manually:
python server.py
Note: Manual server startup is not needed for normal use. The Claude Desktop client will automatically manage server startup and shutdown based on the configuration.
mcp-server-snowflake controls database access rights precisely through database users. If you only need to read data, simply assign a user with read-only database permissions.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.