cdata-snowflakedb-mcp-adapter
Facilitates conversational querying against live Snowflake data via a constrained, read-only Model Context Protocol (MCP) endpoint. This abstracts the necessity for direct SQL interaction, enabling immediate data exploration by Large Language Models (LLMs). It achieves connectivity by leveraging the CData JDBC Driver for Snowflake to interface with real-time data sources.
Author

CDataSoftware
Quick Info
Actions
Tags
CData Snowflake JDBC-Backed MCP Interface (Read-Only)
This repository provides the foundational components for establishing a restricted, read-only access point to Snowflake data environments using the Model Context Protocol (MCP).
:warning: Crucial Distinction: This build offers strictly read-only operational capabilities within the MCP framework. For comprehensive data manipulation—including Create, Read, Update, Delete (CRUD) operations, and advanced actions—we strongly advise utilizing the complimentary, feature-complete CData MCP Server for Snowflake (Beta release).
Objective
The core aim is to empower Artificial Intelligence agents (e.g., Claude Desktop instances) to interrogate active Snowflake data reservoirs using plain language. This connectivity is underpinned by the robust CData JDBC Driver specifically engineered for Snowflake.
The CData JDBC Driver acts as a translator, presenting Snowflake assets as structured, relational SQL entities. This wrapper server exposes these entities via the MCP specification, allowing LLMs to derive live insights simply by posing questions, entirely bypassing the need to formulate imperative SQL statements.
Deployment Procedure
-
Source Code Acquisition: bash git clone https://github.com/cdatasoftware/snowflake-mcp-server-by-cdata.git cd snowflake-mcp-server-by-cdata
-
Artifact Compilation: bash mvn clean install
This action produces the executable package:
CDataMCP-jar-with-dependencies.jar3. Driver Installation: Acquire and install the requisite CData JDBC Driver for Snowflake: https://www.cdata.com/drivers/snowflake/download/jdbc 4. Driver Authorization: * Locate the installed driver'slibdirectory (typical paths provided below): * (Windows)C:\Program Files\CData\CData JDBC Driver for Snowflake\* (Mac/Linux)/Applications/CData JDBC Driver for Snowflake/* Execute the licensing utility: bash java -jar cdata.jdbc.snowflake.jar --license- Input your personal details and use "TRIAL" or your official license key for activation.
- Data Source Configuration (Connection String Definition):
-
Launch the utility to configure connection details: bash java -jar cdata.jdbc.snowflake.jar
-
Configure the necessary connection parameters (credentials, endpoint, etc.) and validate connectivity using "Test Connection". Note: OAuth flows require in-browser user interaction.
- Upon successful validation, capture the complete JDBC Connection String.
- Property File Creation (
.prp): Generate a configuration file (e.g.,snowflake.prp) adhering to the following structure, populating it with the required parameters: - Prefix: Identifier prefix for exposed tools.
- ServerName: Human-readable name for the data service endpoint.
- ServerVersion: Semantic versioning for the server instance.
- DriverPath: Absolute path pointing to the installed Snowflake JDBC JAR file.
- DriverClass: The fully qualified name of the JDBC driver implementation class.
- JdbcUrl: The captured connection string, beginning with
jdbc:snowflake:.... - Tables: Specify table names explicitly, or leave empty (
Tables=) to permit access to all accessible schemas. env Prefix=snowflake ServerName=CDataSnowflake ServerVersion=1.0 DriverPath=PATH\TO\cdata.jdbc.snowflake.jar DriverClass=cdata.jdbc.snowflake.SnowflakeDriver JdbcUrl=jdbc:snowflake:InitiateOAuth=GETANDREFRESH; Tables=
Integration with LLM Clients (e.g., Claude Desktop)
-
Client Configuration Update: Produce or augment the necessary client configuration file (e.g.,
claude_desktop_config.json) to incorporate the new MCP endpoint definition. The structure should integrate into the existingmcpServersobject:Windows Path Modification:
{ "mcpServers": { "{classname_dash}": { "command": "PATH\TO\java.exe", "args": [ "-jar", "PATH\TO\CDataMCP-jar-with-dependencies.jar", "PATH\TO\snowflake.prp" ] }, ... } }
Linux/Mac Path Modification:
{ "mcpServers": { "{classname_dash}": { "command": "/PATH/TO/java", "args": [ "-jar", "/PATH/TO/CDataMCP-jar-with-dependencies.jar", "/PATH/TO/snowflake.prp" ] }, ... } }
If the configuration file resides locally, relocate it to the client application's designated directory: Windows Relocation: bash cp C:\PATH\TO\claude_desktop_config.json %APPDATA%\Claude\claude_desktop_config.json
Linux/Mac Relocation: bash cp /PATH/TO/claude_desktop_config.json /Users/{user}/Library/Application\ Support/Claude/claude_desktop_config.json'
-
Client Refresh/Restart: Ensure the LLM client application is completely restarted (not just minimized, but fully quit via Task Manager/Activity Monitor) to load the newly registered MCP services.
Standalone Server Execution
To operate the connectivity layer independently of the client application: bash java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/Salesforce.prp
Constraint: The server communicates strictly via standard input/output (
stdio) and therefore mandates co-location on the same host as the consuming client application.
Interaction Paradigm
Once the server is successfully configured and initialized, the AI agent gains access to the underlying data schema via the exposed protocol methods. Direct invocation of these tools is usually unnecessary; natural language prompts concerning the data are automatically routed to the appropriate MCP method. Examples: * "Determine the statistical relationship between our successfully closed sales opportunities and the corresponding client industry sectors." * "Provide a count of all pending support requests currently logged within the 'SUPPORT' organizational unit." * "Summarize all scheduled appointments slated for the current date."
Available Operational Methods
Tool names follow the format: {servername}_<method>.
* {servername}_get_tables - Fetches a comprehensive manifest of accessible data structures. Follow up with {servername}_get_columns to detail specific structure fields. Output is delimited CSV, with the first line serving as column headers.
* {servername}_get_columns - Retrieves the attribute definitions for a specified data table. Preceded by a call to {servername}_get_tables. Output is delimited CSV, with the first line serving as column headers.
* {servername}_run_query - Executes a user-supplied SQL SELECT statement against the underlying database.
JSON-RPC Payload Specifications (For Scripted Invocation)
For developers automating interactions outside of an AI client interface, requests must strictly adhere to the JSON-RPC 2.0 specification.
Example: Fetching Table List (snowflake_get_tables)
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "snowflake_get_tables", "arguments": {} } }
Example: Inspecting Table Fields (snowflake_get_columns)
{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "snowflake_get_columns", "arguments": { "table": "Account" } } }
Example: Executing Data Retrieval (snowflake_run_query)
{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "snowflake_run_query", "arguments": { "sql": "SELECT * FROM [Account] WHERE [IsDeleted] = true" } } }
Troubleshooting Common Issues
- Client Not Detecting Server: Verify that the LLM client application was completely terminated and relaunched, ensuring all background processes are stopped.
- Data Retrieval Failures: Scrutinize the connection string defined in the
.prpfile against the one successfully tested via the Connection String Utility. - Connectivity Errors (Data Source): Initiate contact with the CData Support Desk for backend database access issues.
- MCP Server Operational Feedback: For general feedback or difficulties regarding the server component itself, engage with the CData User Community.
Licensing Terms
This specific MCP server implementation is distributed under the permissive MIT License. Redistribution, modification, and use are permitted provided the original license terms detailed in the repository's LICENSE file are honored.
Comprehensive Source Compatibility Matrix
(Content omitted for brevity, retains the table structure indicating broad connectivity support via the CData ecosystem, including but not limited to Access, Act CRM, BigQuery, Dynamics 365, Google Analytics, Jira, MongoDB, Oracle, Salesforce, SAP, SQL Server, Tableau CRM Analytics, Workday, and nearly all major data platforms.)
WIKIPEDIA CONTEXT: Cloud Computing Overview Cloud computing, as formally defined by ISO, describes a model for accessing a flexible, elastic supply of shared computational assets via a network, often involving automated provisioning. NIST established five core tenets: On-demand self-service, comprehensive network access, resource pooling (multi-tenancy), rapid elasticity for scaling, and metered usage tracking for transparency. The foundational concepts trace back to 1960s time-sharing systems, while the modern 'cloud' moniker gained traction around 1994/1996.
