Skip to main content
Glama
asingh49-cmd

Local Snowflake MCP Server

by asingh49-cmd
README.md
# Local-Snowflake-MCP-Server
A local **Model Context Protocol (MCP) server** that enables Claude Desktop to interact with a **Snowflake** database through natural-language SQL. Built in Python, this project demonstrates how modern LLMs can integrate with enterprise data systems using secure, local tooling.

---

## πŸ”— Badges

![Python](https://img.shields.io/badge/Python-3.10+-blue.svg)
![Snowflake](https://img.shields.io/badge/Snowflake-Data_Cloud-29B5E8.svg)
![Claude](https://img.shields.io/badge/Claude-MCP_Server-8A2BE2.svg)
![Platform](https://img.shields.io/badge/Local-Tooling-orange.svg)

---

##  Overview

This repository contains:

- A **Python MCP server** (`snowflake_mcp_server.py`)  
- Instructions/Code in README for the claude_desktop_config.json file
- **Screenshots and documentation** showing the MCP server running locally  
- Instructions for connecting Claude β†’ MCP Server β†’ Snowflake securely  

This project demonstrates how to use MCP to build custom AI-powered database tooling.

---

## Repository Structure
```
snowflake-mcp-server/
β”‚
β”œβ”€β”€ server/
β”‚ β”œβ”€β”€ snowflake_mcp_server.py
β”‚ β”œβ”€β”€ requirements.txt
β”‚
β”œβ”€β”€ docs/
β”‚ β”œβ”€β”€ screenshots/
β”‚
└── README.md
```

---

##  Getting Started

### 1. Clone the Repository
```bash
git clone https://github.com/your-username/snowflake-mcp-server.git
cd snowflake-mcp-server
```
2. Install Dependencies
```bash
pip install -r server/requirements.txt
```
3. Set Up Environment Variables
```Create a .env file (NOT committed to GitHub):

SNOWFLAKE_USER=your_user
SNOWFLAKE_PASSWORD=your_password
SNOWFLAKE_ACCOUNT=your_account
SNOWFLAKE_WAREHOUSE=your_wh
SNOWFLAKE_DATABASE=your_db
SNOWFLAKE_SCHEMA=your_schema
```
4. Run the MCP Server
```bash
python server/snowflake_mcp_server.py
Expected output:

MCP Snowflake Server started...
Listening for Claude Desktop connections…
```
5. Configure Claude Desktop JSON
```Add this block to your Claude Desktop config:

{
  "mcpServers": {
    "snowflake": {
      "command": "your_env_path",
      "args": [
        "your_server_path.py"
      ],
      "env": {
        "SF_ACCOUNT": "account_name",
        "SF_USER": "username",
        "SF_PASSWORD": "password",
        "SF_WH": "warehouse_name",
        "SF_DB": "database_name",
        "SF_SCHEMA": "schema_name"
      },
      "autoStart": true
    }
  }
}
Restart Claude. The tool should appear automatically.
```
Example Claude Prompts
β€œRun a query to list the tables in my schema.”

β€œShow the top 10 rows from MY_TABLE.”

β€œExplain what this SQL query does and suggest optimizations.”

β€œCreate a table called DEMO_TEST with sample values.”
```
🧱 Architecture

Claude Desktop
      β”‚
      β–Ό
Local MCP Server (Python)
      β”‚
      β–Ό
Snowflake Database
```
Security Notes (Important!)
This repo does not include:

❌ Snowflake credentials
❌ Hardcoded passwords
❌ Personal account identifiers