Redshift

Provides a Python-based MCP server to interact with Redshift databases: list schemas/tables, fetch DDL/statistics, run SQL, analyze tables, and get execution plans.
  • python

1

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "moonlight-cl-redshift-mcp-server": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp",
        "python-dotenv",
        "redshift-connector",
        "mcp",
        "run",
        "src/redshift_mcp_server/server.py"
      ],
      "env": {
        "RS_HOST": "your-redshift-cluster.region.redshift.amazonaws.com",
        "RS_PORT": "5439",
        "RS_USER": "your_username",
        "RS_SCHEMA": "your_schema",
        "RS_DATABASE": "your_database",
        "RS_PASSWORD": "your_password"
      }
    }
  }
}

Redshift MCP Server is a Python-based MCP implementation that lets AI assistants interact with Amazon Redshift databases. It exposes resources to explore schemas and tables, retrieve table definitions and statistics, execute SQL, analyze tables, and view execution plans, enabling powerful data-access workflows through MCP-enabled assistants.

How to use

You use this server by connecting an MCP-enabled assistant client to the server configuration you run locally or in your environment. The server exposes resources to list schemas and tables, fetch DDL for a table, obtain statistics, run SQL queries, analyze table statistics, and retrieve execution plans. You can combine these resources and tools to build conversational flows that explore your Redshift data, validate schemas, and optimize queries.

Key capabilities you can leverage include: listing all schemas, listing tables within a schema, obtaining a table’s DDL, retrieving table statistics, executing SQL against your Redshift cluster, analyzing a table to collect statistics, and getting the execution plan for a given SQL query. Use these to answer questions about your data schema, validate query results, and optimize performance.

How to install

Prerequisites you need before installing are:

  • Python 3.13 or higher
  • An Amazon Redshift cluster
  • Redshift credentials: host, port, username, password, database Follow these steps to install from source and prepare the server for use.

Clone the project repository and install dependencies, then configure environment variables for your Redshift connection.

git clone https://github.com/Moonlight-CL/redshift-mcp-server.git
cd redshift-mcp-server

uv sync

# Set up environment variables (example shown; replace with your values)
RS_HOST=your-redshift-cluster.region.redshift.amazonaws.com
RS_PORT=5439
RS_USER=your_username
RS_PASSWORD=your_password
RS_DATABASE=your_database
RS_SCHEMA=your_schema  # Optional, defaults to public

# Optionally load from a .env file if you prefer
# export RS_HOST=...
# export RS_PORT=...
# export RS_USER=...
# export RS_PASSWORD=...
# export RS_DATABASE=...
# export RS_SCHEMA=...

# Start the server using the runtime command shown in usage
uv run --with mcp python-dotenv redshift-connector mcp
mcp run src/redshift_mcp_server/server.py
"} ,{

Additional sections

Configuration details: The server connects to your Redshift cluster using the following environment variables. Set RS_HOST, RS_PORT, RS_USER, RS_PASSWORD, RS_DATABASE, and optionally RS_SCHEMA to target a specific schema. You can set these directly in your shell or load them from a .env file.

RS_HOST=your-redshift-cluster.region.redshift.amazonaws.com
RS_PORT=5439
RS_USER=your_username
RS_PASSWORD=your_password
RS_DATABASE=your_database
RS_SCHEMA=your_schema  # Optional, defaults to "public"

Starting the server requires running the UV-based command sequence shown in installation steps. The recommended runtime command is the combined startup invocation that launches the MCP server with the appropriate environment.

Examples of common operations you can perform with the MCP client include listing schemas and tables, retrieving table DDL and statistics, executing SQL, analyzing tables, and obtaining execution plans. Integrate these into your client workflows to build interactive data discovery and optimization experiences.

Available tools

execute_sql

Executes a SQL query on the Redshift cluster and returns results or status information.

analyze_table

Analyzes a table to collect statistics information and enrich metadata.

get_execution_plan

Retrieves the execution plan for a given SQL query, including runtime statistics.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational