redshift
MCP server from tuanknguyen/redshift-mcp-server
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:
-
Install uv and create a Python 3.10+ environment (example using uv): uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install the project in editable mode: uv pip install -e .
Or for development:
uv pip install -e ".[dev]"
-
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>"
-
Optional: set a log level for MCP debugging in your environment: export FASTMCP_LOG_LEVEL=INFO # or DEBUG, WARNING, ERROR
-
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
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP