home / mcp / redshift mcp server

Redshift MCP Server

Provides an MCP bridge to query and modify Redshift data with strict access controls.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "anshulpatre-my-redshift-mcp": {
      "command": "python",
      "args": [
        "src/redshift_mcp_server.py"
      ],
      "env": {
        "DB_MCP_MODE": "readonly",
        "REDSHIFT_HOST": "YOUR_REDSHIFT_HOST",
        "REDSHIFT_PORT": "5439",
        "REDSHIFT_USER": "YOUR_USER",
        "REDSHIFT_DATABASE": "YOUR_DATABASE",
        "REDSHIFT_PASSWORD": "YOUR_PASSWORD"
      }
    }
  }
}

You can connect AI assistants to your Redshift data through an MCP server that exposes Redshift operations as standardized tools. This server lets you securely query, explore, and optionally modify data with strict access controls, making it easy to build AI-powered analytics and automations without writing custom integration code.

How to use

You use the Redshift MCP Server by connecting an MCP client (such as Claude Desktop or ChatGPT) and issuing tool calls that map to Redshift operations. Start with a secure configuration, then connect to your Redshift cluster. Use the available actions to connect, query data, describe table structures, and manage schemas and tables within the allowed access mode. The server enforces permissions based on the selected mode, so you can tighten or loosen capabilities as needed.

How to install

Prerequisites: Python 3.8+ and a working Redshift cluster you can access from your network.

Step-by-step commands to set up and run the MCP server locally.

Additional configuration and notes

Environment variables enable automatic startup and define access controls. The following variables configure the Redshift connection and the access mode. You can place these in a .env file or set them in your environment before starting the server.

Security considerations

Use environment variables for credentials to avoid embedding them in code. Assign the minimal required permissions to the Redshift user. The server validates statement types against the selected access mode and uses parameterized queries to reduce SQL injection risk. Ensure your Redshift cluster is secured with VPC and appropriate security groups.

Troubleshooting

If you encounter connection issues, verify endpoint details, credentials, network connectivity, and cluster status. Ensure the correct environment variables are set and that the chosen access mode aligns with your intended operations.

Available tools

connect_db

Establish a connection to the Redshift cluster using either explicit parameters or environment variables.

query

Execute SELECT queries with optional parameter binding to retrieve data.

execute

Run data modification or DDL statements such as INSERT, UPDATE, DELETE, or CREATE.

list_schemas

List all schemas available in the connected database.

list_tables

List tables within a specified schema.

describe_table

Retrieve detailed structure information for a specific table.

disconnect

Close the current database connection.