{"_id":"snowflake-mcp","_rev":"2-685a10bf81f49a3239ed3ddb353602eb","name":"snowflake-mcp","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"snowflake-mcp","version":"1.0.0","keywords":["mcp","model-context-protocol","snowflake","sql","database","ai","claude","cursor"],"author":{"name":"Mohammad Fares"},"license":"MIT","_id":"snowflake-mcp@1.0.0","maintainers":[{"name":"faressoft","email":"faressoft.com@gmail.com"}],"homepage":"https://github.com/faressoft/snowflake-mcp#readme","bugs":{"url":"https://github.com/faressoft/snowflake-mcp/issues"},"bin":{"snowflake-mcp":"dist/index.js"},"dist":{"shasum":"b976105e8a7c59aeb51b2ee1e54d223cf458b8b1","tarball":"https://registry.npmjs.org/snowflake-mcp/-/snowflake-mcp-1.0.0.tgz","fileCount":5,"integrity":"sha512-TSUfcVrvPB0PTgHwN0qjPzUzgDQB3iYaOW8SZxT9dL9lGthqwoSRpFH+KRjzCn5gj4IOwlvUM+ssj5sUhCEmzA==","signatures":[{"sig":"MEYCIQC1V+bipVUEPFKlixS8KrJfvq/XBsopmi8otqgt+gNW0gIhALP8cygaqh5m8C7QItZfEqLNeId6pN+K1Ild2wL5qFmy","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11345},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"fb88961f02abf411b11c3f24826d660b5ecc1e24","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"faressoft","email":"faressoft.com@gmail.com"},"repository":{"url":"git+https://github.com/faressoft/snowflake-mcp.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for executing Snowflake queries","directories":{},"_nodeVersion":"25.1.0","dependencies":{"zod":"^3.23.8","snowflake-sdk":"^1.14.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.11.0"},"_npmOperationalInternal":{"tmp":"tmp/snowflake-mcp_1.0.0_1772498583358_0.3352567248983416","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"snowflake-mcp","version":"1.1.0","description":"MCP server for executing Snowflake queries","main":"dist/index.js","bin":{"snowflake-mcp":"dist/index.js"},"type":"module","scripts":{"build":"tsc","start":"node dist/index.js","dev":"tsc --watch","prepublishOnly":"npm run build"},"keywords":["mcp","model-context-protocol","snowflake","sql","database","ai","claude","cursor"],"author":{"name":"Mohammad Fares"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/faressoft/snowflake-mcp.git"},"homepage":"https://github.com/faressoft/snowflake-mcp#readme","bugs":{"url":"https://github.com/faressoft/snowflake-mcp/issues"},"engines":{"node":">=18"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","snowflake-sdk":"^1.14.0","zod":"^3.23.8"},"devDependencies":{"@types/node":"^20.11.0","typescript":"^5.3.0"},"gitHead":"c8de803bf5cb7dbdf5cb7c45668f83fd7f5357e9","types":"./dist/index.d.ts","_id":"snowflake-mcp@1.1.0","_nodeVersion":"25.1.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-tkjaEs5HyyU9WTVNnRUU+3uV3wVk4m9jLTRNN7q4MdadTBC3xAKdtjMWfq/kd9KFm0KMC1qJ7CDk0/nO5XZlOQ==","shasum":"83ba8325b16f260943f8f8d44434296967bf14ab","tarball":"https://registry.npmjs.org/snowflake-mcp/-/snowflake-mcp-1.1.0.tgz","fileCount":5,"unpackedSize":37859,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCFgFpXSHKoEtpiQH0UbVB1F1tjb73k6o/cPABQLxvZuAIhAK7QV3zEHfTcIEP1EKNSYWua3qCDMtk+HXsVU9F/YCHj"}]},"_npmUser":{"name":"faressoft","email":"faressoft.com@gmail.com"},"directories":{},"maintainers":[{"name":"faressoft","email":"faressoft.com@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/snowflake-mcp_1.1.0_1772583875719_0.7792629831761286"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-03T00:43:03.357Z","modified":"2026-03-04T00:24:36.004Z","1.0.0":"2026-03-03T00:43:03.501Z","1.1.0":"2026-03-04T00:24:35.886Z"},"bugs":{"url":"https://github.com/faressoft/snowflake-mcp/issues"},"author":{"name":"Mohammad Fares"},"license":"MIT","homepage":"https://github.com/faressoft/snowflake-mcp#readme","keywords":["mcp","model-context-protocol","snowflake","sql","database","ai","claude","cursor"],"repository":{"type":"git","url":"git+https://github.com/faressoft/snowflake-mcp.git"},"description":"MCP server for executing Snowflake queries","maintainers":[{"name":"faressoft","email":"faressoft.com@gmail.com"}],"readme":"<p align=\"center\">\n  <img src=\"assets/logo-600.png\" alt=\"Snowflake MCP\" width=\"600\">\n</p>\n\n# Snowflake MCP Server\n\nA [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) server that enables AI agents to execute SQL queries against Snowflake databases.\n\nUsers can use natural language to query Snowflake databases, like:\n\n- \"Get me the top 10 products by revenue\"\n- \"Show me the total revenue for the last 30 days\"\n- \"Describe the structure of the orders table\"\n- \"Explore the database and summarize what data is available\"\n- \"Build a query to find customers who haven't ordered in 90 days\"\n\n## Features\n\n- Execute SQL queries directly from AI agents like Cursor, Claude Desktop, etc.\n- **Schema Discovery**: Browse databases, schemas, tables, and views\n- **Table Inspection**: Describe table structures, view sample data, check row counts\n- **Query Safety**: Readonly mode, row limits, and query timeouts\n- **Multiple Output Formats**: Table, JSON, or CSV\n- **Query Explanation**: Get execution plans for queries\n- **MCP Prompts**: Guided workflows for common tasks\n- Support for both password and SSO (browser-based) authentication\n- Configurable default warehouse, database, schema, and role\n\n## Prerequisites\n\n- Node.js 18 or later\n\n## Usage\n\n### Cursor\n\nAdd to your Cursor MCP settings (`~/.cursor/mcp.json`):\n\n#### SSO Authentication (Recommended)\n\n```json\n{\n  \"mcpServers\": {\n    \"snowflake\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"snowflake-mcp\"],\n      \"env\": {\n        \"SNOWFLAKE_ACCOUNT\": \"your-org-your-account\",\n        \"SNOWFLAKE_USERNAME\": \"your-username\",\n        \"SNOWFLAKE_AUTHENTICATOR\": \"externalbrowser\",\n        \"SNOWFLAKE_WAREHOUSE\": \"your-warehouse\",\n        \"SNOWFLAKE_DATABASE\": \"your-database\",\n        \"SNOWFLAKE_SCHEMA\": \"your-schema\"\n      }\n    }\n  }\n}\n```\n\nA browser window will open for authentication on first query.\n\n#### Password Authentication\n\n```json\n{\n  \"mcpServers\": {\n    \"snowflake\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"snowflake-mcp\"],\n      \"env\": {\n        \"SNOWFLAKE_ACCOUNT\": \"your-org-your-account\",\n        \"SNOWFLAKE_USERNAME\": \"your-username\",\n        \"SNOWFLAKE_PASSWORD\": \"your-password\",\n        \"SNOWFLAKE_ROLE\": \"your-role\",\n        \"SNOWFLAKE_WAREHOUSE\": \"your-warehouse\",\n        \"SNOWFLAKE_DATABASE\": \"your-database\",\n        \"SNOWFLAKE_SCHEMA\": \"your-schema\",\n        \"SNOWFLAKE_READONLY\": \"true\"\n      }\n    }\n  }\n}\n```\n\n### Claude Desktop\n\nAdd to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):\n\n```json\n{\n  \"mcpServers\": {\n    \"snowflake\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"snowflake-mcp\"],\n      \"env\": {\n        \"SNOWFLAKE_ACCOUNT\": \"your-org-your-account\",\n        \"SNOWFLAKE_USERNAME\": \"your-username\",\n        \"SNOWFLAKE_AUTHENTICATOR\": \"externalbrowser\"\n      }\n    }\n  }\n}\n```\n\n## Configuration\n\n| Variable                  | Required    | Default           | Description                                                                |\n| ------------------------- | ----------- | ----------------- | -------------------------------------------------------------------------- |\n| `SNOWFLAKE_ACCOUNT`       | Yes         | -                 | Your Snowflake account identifier (e.g., `ORG-ACCOUNT`)                    |\n| `SNOWFLAKE_USERNAME`      | Yes         | -                 | Snowflake username                                                         |\n| `SNOWFLAKE_AUTHENTICATOR` | No          | `externalbrowser` | Authentication method: `externalbrowser` (SSO) or `snowflake` (password)   |\n| `SNOWFLAKE_PASSWORD`      | Conditional | -                 | Required if authenticator is `snowflake`, not needed for `externalbrowser` |\n| `SNOWFLAKE_ROLE`          | No          | -                 | Role to use for the session (uses account default if not set)              |\n| `SNOWFLAKE_WAREHOUSE`     | No          | -                 | Warehouse to use (uses account default if not set)                         |\n| `SNOWFLAKE_DATABASE`      | No          | -                 | Database to use (uses account default if not set)                          |\n| `SNOWFLAKE_SCHEMA`        | No          | -                 | Schema to use (uses account default if not set)                            |\n| `SNOWFLAKE_READONLY`      | No          | `false`           | Set to `true` to block write operations (INSERT, UPDATE, DELETE, etc.)     |\n\n### Finding Your Connection Settings\n\nYou can find your connection settings in Snowsight (Snowflake's web interface):\n\n1. Sign in to [Snowsight](https://app.snowflake.com/)\n2. Click on your username in the bottom-left corner to open the user menu\n3. Select **Connect a tool to Snowflake**\n4. Open the `Config File` tab\n5. Select the Warehouse, Database, Schema you want to use\n6. Copy values from the generated config file\n\n## Available Tools\n\n### Query Execution\n\n#### `execute_query`\n\nExecute a SQL query against Snowflake.\n\n| Parameter  | Type   | Required | Default | Description                              |\n| ---------- | ------ | -------- | ------- | ---------------------------------------- |\n| `query`    | string | Yes      | -       | The SQL query to execute                 |\n| `max_rows` | number | No       | 100     | Maximum number of rows to return         |\n| `timeout`  | number | No       | -       | Query timeout in seconds                 |\n| `format`   | string | No       | table   | Output format: `table`, `json`, or `csv` |\n\n#### `explain_query`\n\nGet the execution plan for a SQL query without running it.\n\n| Parameter | Type   | Required | Description              |\n| --------- | ------ | -------- | ------------------------ |\n| `query`   | string | Yes      | The SQL query to explain |\n\n### Connection\n\n#### `test_connection`\n\nTest the connection to Snowflake and return connection info including current user, role, warehouse, database, schema, and version.\n\n### Schema Discovery\n\n#### `list_databases`\n\nList all accessible databases in Snowflake.\n\n#### `list_schemas`\n\nList all schemas in a database.\n\n| Parameter  | Type   | Required | Description                                   |\n| ---------- | ------ | -------- | --------------------------------------------- |\n| `database` | string | No       | Database name (uses current if not specified) |\n\n#### `list_tables`\n\nList all tables in a schema.\n\n| Parameter  | Type   | Required | Description   |\n| ---------- | ------ | -------- | ------------- |\n| `database` | string | No       | Database name |\n| `schema`   | string | No       | Schema name   |\n\n#### `list_views`\n\nList all views in a schema.\n\n| Parameter  | Type   | Required | Description   |\n| ---------- | ------ | -------- | ------------- |\n| `database` | string | No       | Database name |\n| `schema`   | string | No       | Schema name   |\n\n### Table Inspection\n\n#### `describe_table`\n\nGet detailed information about a table's structure including columns, types, and constraints.\n\n| Parameter | Type   | Required | Description                                    |\n| --------- | ------ | -------- | ---------------------------------------------- |\n| `table`   | string | Yes      | Table name (can include database.schema.table) |\n\n#### `get_table_sample`\n\nGet a sample of rows from a table to understand its data.\n\n| Parameter | Type   | Required | Default | Description                     |\n| --------- | ------ | -------- | ------- | ------------------------------- |\n| `table`   | string | Yes      | -       | Table name                      |\n| `limit`   | number | No       | 5       | Number of sample rows to return |\n\n#### `get_table_row_count`\n\nGet the total number of rows in a table.\n\n| Parameter | Type   | Required | Description |\n| --------- | ------ | -------- | ----------- |\n| `table`   | string | Yes      | Table name  |\n\n#### `get_primary_keys`\n\nGet primary key columns for a table.\n\n| Parameter | Type   | Required | Description |\n| --------- | ------ | -------- | ----------- |\n| `table`   | string | Yes      | Table name  |\n\n## MCP Resources\n\n### `schema://current`\n\nReturns information about the current database schema, including:\n- Current database and schema names\n- List of all tables\n- List of all views\n\nAccess this resource to get a quick overview of the connected schema without running queries.\n\n## MCP Prompts\n\n### `analyze_table`\n\nAnalyze a table's structure, sample data, and get query suggestions.\n\n| Parameter    | Type   | Required | Description          |\n| ------------ | ------ | -------- | -------------------- |\n| `table_name` | string | Yes      | The table to analyze |\n\n### `explore_database`\n\nExplore and summarize the structure of a database.\n\n| Parameter       | Type   | Required | Description                                         |\n| --------------- | ------ | -------- | --------------------------------------------------- |\n| `database_name` | string | No       | Database to explore (uses current if not specified) |\n\n### `query_builder`\n\nHelp build a SQL query based on natural language description.\n\n| Parameter     | Type   | Required | Description                                   |\n| ------------- | ------ | -------- | --------------------------------------------- |\n| `description` | string | Yes      | Natural language description of desired query |\n| `tables`      | string | No       | Comma-separated list of relevant tables       |\n\n## Security Considerations\n\n- **SSO authentication** is recommended for production use as it avoids storing passwords in configuration files\n- **Readonly mode** (`SNOWFLAKE_READONLY=true`) is recommended when you only need to query data\n- Never commit configuration files containing credentials to version control\n- Consider using environment variables or a secrets manager for sensitive values\n- The server executes queries with the permissions of the configured Snowflake user—ensure appropriate access controls are in place\n- The `max_rows` parameter helps prevent accidentally returning massive result sets\n\n## License\n\nMIT License\n","readmeFilename":"README.md"}