Get the FREE Ultimate OpenClaw Setup Guide →

redshift

MCP server from tuanknguyen/redshift-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tuanknguyen-redshift-mcp-server uvx --with <path-to-redshift-mcp-server> redshift-mcp-server \
  --env FASTMCP_LOG_LEVEL="ERROR"

How to use

This MCP server provides an interface to interact with an Amazon Redshift database through the MCP protocol. It exposes tools to run SQL against Redshift, obtain execution plans, enumerate schemas and tables, and verify connectivity. Specifically, you can execute run_query to perform SQL statements, use explain_query to inspect query plans before running heavy operations, list_tables_in_schema to discover all objects within a given schema, list_schemas to see all available schemas in the database, and test_redshift_connection to verify that the connection parameters are correct. When integrated with Amazon Q or Claude, this server can be addressed via the MCP channel and invoked using the standard MCP toolset, enabling seamless conversational querying of your Redshift data.

To use it, connect the MCP client to the redshift MCP server, pass your SQL or command requests to the exposed tools, and receive structured results. For example, you can ask for the list of tables in a schema, then run a targeted SELECT query, or request an explain plan before executing a potentially expensive query. The server also supports development and testing workflows, including a dedicated test connection routine and a development command to run the MCP Inspector during local testing.

How to install

Prerequisites:

  • Python 3.10 or newer
  • Access to an Amazon Redshift cluster with valid credentials (host, port, database, user, password)
  • uv installed (via Astral uv) or available in your environment

Installation steps:

  1. Install uv and create a Python 3.10+ environment (example using uv): uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate

  2. Install the project in editable mode: uv pip install -e .

    Or for development:

    uv pip install -e ".[dev]"

  3. Set up credentials as environment variables (examples shown):

    Linux/macOS

    export REDSHIFT_HOST=<your-redshift-host> export REDSHIFT_PORT=5439 export REDSHIFT_DATABASE=<your-database-name> export REDSHIFT_USER=<your-username> export REDSHIFT_PASSWORD=<your-password>

    Windows (Command Prompt)

    set REDSHIFT_HOST=<your-redshift-host> set REDSHIFT_PORT=5439 set REDSHIFT_DATABASE=<your-database-name> set REDSHIFT_USER=<your-username> set REDSHIFT_PASSWORD=<your-password>

    Windows (PowerShell)

    $env:REDSHIFT_HOST = "<your-redshift-host>" $env:REDSHIFT_PORT = "5439" $env:REDSHIFT_DATABASE = "<your-database-name>" $env:REDSHIFT_USER = "<your-username>" $env:REDSHIFT_PASSWORD = "<your-password>"

  4. Optional: set a log level for MCP debugging in your environment: export FASTMCP_LOG_LEVEL=INFO # or DEBUG, WARNING, ERROR

  5. Under development, you can run the MCP Inspector to test interactive flows: mcp dev redshift-mcp-server

Additional notes

Environment and configuration tips:

  • Do not commit Redshift credentials to version control or bake them into Docker images.
  • Ensure the REDSHIFT_* environment variables are exported in any shell where the MCP server runs.
  • If you encounter connection issues, verify network access to the Redshift cluster (VPC, security groups) and confirm that the port (typically 5439) is reachable.
  • The FASTMCP_LOG_LEVEL variable controls the verbosity of MCP logs; increase it to DEBUG when troubleshooting.
  • For large queries, use explain_query first to review the execution plan before running run_query to avoid long-running, expensive operations.
  • Development mode can help validate MCP flows locally with the Inspector before deploying to production environments.

Related MCP Servers

Sponsor this space

Reach thousands of developers