Redshift MCP Server
Provides tools for interacting with Amazon Redshift databases, including running SQL queries, explaining execution plans, listing schemas and tables, and testing connectivity.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Redshift MCP Servershow me all schemas in the database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Redshift MCP Server
A Model Context Protocol (MCP) server for interacting with Amazon Redshift databases.
Features
Run SQL queries on Redshift
Explain SQL query execution plans
List tables and views within a schema
List all schemas within the database
Test connection to Redshift
Prerequisites
Python 3.10+
Amazon Redshift database credentials
Installation
Installation Requirements
Install
uvfrom Astral or the GitHub READMEInstall Python 3.10 or newer using
uv python install 3.10(or a more recent version)
Configure for Amazon Q or Claude
To add this MCP server to your Amazon Q or Claude, add the following to your MCP config file. With Amazon Q, create (if does not yet exist) a file named .amazonq/mcp.json under the same directory that is running q chat. Then add the following config:
{
"mcpServers": {
"redshift": {
"type": "stdio",
"command": "uvx",
"args": [
"--with", "<path-to-redshift-mcp-server>", "redshift-mcp-server"
],
"env": {
"FASTMCP_LOG_LEVEL": "ERROR"
},
"disabled": false,
"autoApprove": []
}
}
}Setup Your Credentials
⚠️ SECURITY WARNING ⚠️
NEVER commit credential files to version control or include them in Docker images!
Set up your Redshift credentials using environment variables:
# Linux/macOS
export REDSHIFT_HOST=<your-redshift-host>
export REDSHIFT_PORT=5439 # Default Redshift port
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>"Development
Clone this repository:
git clone https://github.com/tuanknguyen/redshift-mcp-server.git cd redshift-mcp-serverCreate and activate a virtual environment:
# Create the venv uv venv # Activate it source .venv/bin/activate # On Windows: .venv\Scripts\activateInstall the project:
# Install the project and its dependencies uv pip install -e . # Or for development uv pip install -e ".[dev]"
Configuration
Set the following environment variables with your Redshift connection details:
export REDSHIFT_HOST=<your-redshift-host>
export REDSHIFT_PORT=5439 # Default Redshift port
export REDSHIFT_DATABASE=<your-database-name>
export REDSHIFT_USER=<your-username>
export REDSHIFT_PASSWORD=<your-password>Optional environment variables:
export FASTMCP_LOG_LEVEL=INFO # Set log level (DEBUG, INFO, WARNING, ERROR)Development Mode
For development and testing with the MCP Inspector:
mcp dev redshift-mcp-serverAvailable Tools
run_query(query: str)- Execute a SQL query against Redshiftexplain_query(query: str)- Get the execution plan for a SQL querylist_tables_in_schema(schema_name: str)- List all tables and views in a specific schemalist_schemas()- List all schemas in the databasetest_redshift_connection()- Test connectivity to the Redshift database
Connection Testing
The MCP server automatically tests the connection when starting up. If the connection test fails, the server will not start and will raise an error.
You can also run a standalone connection test using:
python test_connection.pyBest Practices
Use
list_schemasandlist_tables_in_schemato explore the database structureFor large queries, consider using
explain_queryfirst to understand execution plansAlways include appropriate WHERE clauses to limit result sets
Use column names explicitly instead of SELECT * for better performance
Consider adding LIMIT clauses to prevent returning too many rows
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tuanknguyen/redshift-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server