logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

cdata-amazon-redshift-mcp-gateway

Facilitates direct, natural language querying of live data residing within Amazon Redshift via a lightweight Model Context Protocol (MCP) server implementation. This solution bypasses the necessity for manual SQL generation, enabling LLM-driven exploration of Redshift datasets using integrated schema introspection and query execution mechanisms.

Author

cdata-amazon-redshift-mcp-gateway logo

CDataSoftware

MIT License

Quick Info

GitHub GitHub Stars 1
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

cdatasoftwareredshiftcloudamazon redshiftredshift datacdatasoftware amazon

CData Amazon Redshift MCP Endpoint

Note on Functionality: This specific deployment offers read-only data access capabilities. For comprehensive data manipulation (CRUD operations and custom actions) along with a streamlined setup process, please explore the full-featured CData MCP Server for Amazon Redshift (Beta release).

Core Objective

This implementation serves as a dedicated, read-only MCP server designed to interface large language models (e.g., Claude Desktop) directly with live data sources in Amazon Redshift. Connectivity is achieved by leveraging the robust CData JDBC Driver for Amazon Redshift, which abstracts Redshift into a consumable relational model.

The server component wraps this driver, presenting Redshift's structure through the accessible MCP framework. Consequently, AI agents can retrieve and analyze current database information simply by posing questions in plain English, eliminating the SQL barrier.

Deployment Instructions

  1. Acquire Source Code: Clone the repository: bash git clone https://github.com/cdatasoftware/amazon-redshift-mcp-server-by-cdata.git cd amazon-redshift-mcp-server-by-cdata

  2. Compile Artifact: Build the server executable using Maven: bash mvn clean install

    This action generates the necessary packaged file: CDataMCP-jar-with-dependencies.jar 3. Driver Installation: Obtain and install the CData JDBC Driver for Amazon Redshift here: https://www.cdata.com/drivers/redshift/download/jdbc 4. Driver Licensing: Activate the JDBC Driver: * Navigate to the driver installation directory (standard locations): * (Windows) C:\Program Files\CData\CData JDBC Driver for Amazon Redshift\ * (Mac/Linux) /Applications/CData JDBC Driver for Amazon Redshift/ * Execute the licensing utility: java -jar cdata.jdbc.redshift.jar --license * Input your identifying details and use "TRIAL" or your valid license key when prompted. 5. Data Source Configuration: Establish the connection string: * Invoke the Connection String utility: java -jar cdata.jdbc.redshift.jar

    • Set up the connection parameters (e.g., host, credentials) and validate connectivity via "Test Connection." OAuth flows will necessitate browser interaction.
    • Capture the resulting connection string upon successful validation.
    • Property Definition File (.prp): Create a configuration file (e.g., redshift-config.prp) detailing server metadata and driver settings:
    • Prefix: Identifier for exposed tools.
    • ServerName: Arbitrary name for the service endpoint.
    • ServerVersion: Version identifier.
    • DriverPath: Absolute path to the downloaded JDBC JAR file.
    • DriverClass: Fully qualified name of the driver class (e.g., cdata.jdbc.redshift.RedshiftDriver).
    • JdbcUrl: The connection string copied in the previous step.
    • Tables: List of specific tables for exposure; leave empty () for total schema visibility. env Prefix=rs_live ServerName=RedshiftGateway ServerVersion=1.1 DriverPath=ABSOLUTE_PATH/cdata.jdbc.redshift.jar DriverClass=cdata.jdbc.redshift.RedshiftDriver JdbcUrl=jdbc:redshift:Server=...; Tables=

Integration with AI Clients (e.g., Claude Desktop)

  1. Client Configuration Update: Modify or create the client's configuration file (claude_desktop_config.json) to register this new MCP gateway within the mcpServers object.

    Windows Execution Context:

    { "mcpServers": { "rs_live_gateway": { "command": "C:\PATH\TO\java.exe", "args": [ "-jar", "C:\PATH\TO\CDataMCP-jar-with-dependencies.jar", "C:\PATH\TO\redshift-config.prp" ] }, ... } }

    Linux/Mac Execution Context:

    { "mcpServers": { "rs_live_gateway": { "command": "/usr/bin/java", "args": [ "-jar", "/opt/mcp/CDataMCP-jar-with-dependencies.jar", "/home/user/configs/redshift-config.prp" ] }, ... } }

    • Ensure the configuration file is placed in the client's designated application data folder (e.g., Windows: %APPDATA%\Claude\).
    • Client Restart: Completely close and relaunch the AI client application to ensure the newly defined MCP endpoint is loaded.

Standalone Server Execution

For direct testing or environments where the client handles RPC communication over standard I/O: bash java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/redshift-config.prp

Constraint: Due to reliance on stdio for communication, this standalone mode only functions when the client runs on the identical host machine as the server process.

Operational Usage

Once connected, the AI client automatically recognizes the provided tools for data interaction. Direct invocation is usually unnecessary; posing data-centric inquiries prompts the model to utilize the available tools. Examples: * "Determine the relationship between sales figures and customer tenure within the database." * "Report the current count of unprocessed entries residing in the staging schema."

Available Functions

Tools are named using the pattern: {prefix}_{function_name} (e.g., rs_live_get_tables). * rs_live_get_tables: Fetches the catalog of accessible relational structures. Use rs_live_get_columns subsequently. Output is CSV format. * rs_live_get_columns: Retrieves attribute definitions for a specified table. CSV output. * rs_live_get_query: Executes arbitrary SQL SELECT statements against Redshift.

JSON-RPC Command Examples (Non-AI Invocation)

These examples adhere to the JSON-RPC 2.0 specification for programmatic interactions:

Querying Schemas (rs_live_get_tables)

{ "jsonrpc": "2.0", "id": 101, "method": "tools/call", "params": { "name": "rs_live_get_tables", "arguments": {} } }

Inspecting Table Structure (rs_live_get_columns)

{ "jsonrpc": "2.0", "id": 102, "method": "tools/call", "params": { "name": "rs_live_get_columns", "arguments": { "table": "UserActivityLog" } } }

Executing Data Retrieval (rs_live_get_query)

{ "jsonrpc": "2.0", "id": 103, "method": "tools/call", "params": { "name": "rs_live_get_query", "arguments": { "sql": "SELECT UserID, TransactionAmount FROM FinancialRecords WHERE Status = 'COMPLETE' LIMIT 50" } } }

Support and Licensing

This server code is distributed under the permissive MIT License. Detailed terms are available in the accompanying LICENSE file.

Data Source Compatibility Overview

This driver layer is compatible with an extensive array of data repositories, including (but not limited to): * SQL Databases (PostgreSQL, MySQL, SQL Server, Oracle) * Data Warehouses (Snowflake, BigQuery, Teradata) * Cloud Storage (S3, Azure Data Lake, Google Cloud Storage) * Various SaaS Applications (Salesforce, ServiceNow, Dynamics 365) * File Formats (Parquet, JSON, CSV, Avro) ... and many others accessible via JDBC.

See Also

`