Amazon Redshift MCP Server
Model Context Protocol (MCP) server for Amazon Redshift.
This MCP server provides tools to discover, explore, and query Amazon Redshift clusters and serverless workgroups. It enables AI assistants to interact with Redshift resources safely and efficiently through a comprehensive set of discovery and query execution tools.
Features
- Cluster Discovery: Automatically discover both provisioned Redshift clusters and serverless workgroups
- Metadata Exploration: Browse databases, schemas, tables, and columns
- Safe Query Execution: Run SQL queries in a read-only mode (single statement; writes rejected)
- Multi-Cluster Support: Work with multiple clusters and workgroups simultaneously
Prerequisites
Installation Requirements
- Install
uvfrom Astral or the GitHub README - Install Python 3.10 or newer using
uv python install 3.10(or a more recent version)
AWS Client Requirements
- Credentials: Configure AWS credentials via AWS CLI, or environment variables
- Region: Configure AWS region using one of the following (in order of precedence):
AWS_REGIONenvironment variable (highest priority)AWS_DEFAULT_REGIONenvironment variable- Region specified in your AWS profile configuration
- Permissions: Ensure your AWS credentials have the required permissions (see Permissions section)
Installation
| Kiro | Cursor | VS Code |
|---|---|---|
Configure the MCP server in your MCP client configuration (e.g., for Kiro, edit ~/.kiro/settings/mcp.json):
{
"mcpServers": {
"awslabs.redshift-mcp-server": {
"command": "uvx",
"args": ["awslabs.redshift-mcp-server@latest"],
"env": {
"AWS_PROFILE": "default",
"AWS_DEFAULT_REGION": "us-east-1",
"FASTMCP_LOG_LEVEL": "INFO"
},
"disabled": false,
"autoApprove": []
}
}
}
Windows Installation
For Windows users, the MCP server configuration format is slightly different:
{
"mcpServers": {
"awslabs.redshift-mcp-server": {
"disabled": false,
"timeout": 60,
"type": "stdio",
"command": "uv",
"args": [
"tool",
"run",
"--from",
"awslabs.redshift-mcp-server@latest",
"awslabs.redshift-mcp-server.exe"
],
"env": {
"AWS_PROFILE": "your-aws-profile",
"AWS_DEFAULT_REGION": "us-east-1",
"FASTMCP_LOG_LEVEL": "ERROR"
}
}
}
}
or docker after a successful docker build -t awslabs/redshift-mcp-server:latest .:
{
"mcpServers": {
"awslabs.redshift-mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"--interactive",
"--env", "AWS_ACCESS_KEY_ID=[your data]",
"--env", "AWS_SECRET_ACCESS_KEY=[your data]",
"--env", "AWS_DEFAULT_REGION=[your data]",
"awslabs/redshift-mcp-server:latest"
]
}
}
}
Environment Variables
AWS_REGION: AWS region to use (overrides all other region settings)AWS_DEFAULT_REGION: Default AWS region (used if AWS_REGION not set and no region in profile)AWS_PROFILE: AWS profile to use (optional, uses default if not specified)FASTMCP_LOG_LEVEL: Logging level (DEBUG,INFO,WARNING,ERROR)LOG_FILE: Path to log file (optional, logs to stdout if not specified)
Prompt Examples
Discovery Workflow
- Discover Clusters and Workgroups: Call
list_clustersto find all provisioned clusters and serverless workgroups, noting their identifiers, types, and status - Select Target Environment: Choose a specific cluster or workgroup based on your query needs
- List Databases: Use
list_databasesto explore databases in the selected cluster/workgroup, returning database names, owners, types (local/shared), and access control info - Explore Schemas: For a given database, call
list_schemasto find available schemas and their owners - Inspect Tables: Use
list_tablesto browse tables, views, and external tables within a schema, including table types and owners - Examine Columns: Call
list_columnsto get column metadata — names, data types, nullability, default values, and constraints - Query Data: Execute SQL queries safely with
execute_queryusing a natural language prompt or direct SQL
Simple Examples
Database Discovery
Explore everything in my Redshift environment.
The assistant will:
- Call
list_clustersto find all available clusters and workgroups, and for each available cluster do steps 2-5 - Call
list_databasesto discover databases - Call
list_schemason each database to map the schema landscape - Call
list_tablesin each schema to discover tables and views - Call
list_columnson key tables to get detailed column metadata - Present a complete summary of the environment structure
Schema Exploration
What tables are in the 'public' schema of the 'dev' database in my 'analytics-cluster'?
The assistant will:
- Call
list_tableswith the cluster, database, and schema - List all tables with their types (TABLE, VIEW, EXTERNAL TABLE)
Column Inspection
Show me the columns of the 'users' table in the 'analytics-cluster'.
The assistant will:
- Call
list_databasesandlist_schemasto locate the table - Call
list_columnsto get column metadata - Display column names, types, nullability, and constraints
Data Querying
How many customers signed up last month? Run the query on my production cluster.
The assistant will:
- Use
list_clustersto find the production cluster - Explore the schema to locate the relevant table
- Execute the appropriate SQL via
execute_query - Format and present the results
Advanced Examples
Natural Language Data Request
Show me the last 3 sales from the analytics Redshift cluster.
I'll help you retrieve the last 3 sales from your analytics Redshift cluster. Let me start by discovering your available Redshift clusters and then explore the database structure to find the sales data.
...discovering 3 Redshift environments (analytics cluster, marketing cluster, ETL workgroup)...
Here are the last 3 sales from your analytics Redshift cluster:
Most Recent Sales (from tickit.sales table):
1. Sale ID 102373 - December 31, 2008 at 12:58:19
- Price paid: $1,008.00
- Seller ID: 26190, Buyer ID: 35491
2. Sale ID 75861 - December 31, 2008 at 12:50:02
- Price paid: $372.00
- Seller ID: 43402, Buyer ID: 39545
3. Sale ID 56302 - December 31, 2008 at 12:08:14
- Price paid: $372.00
- Seller ID: 5760, Buyer ID: 5797
> Briefly describe your actions.
I performed the following actions:
1. Discovered clusters — Listed all available Redshift clusters and identified redshift-cluster-analytics
2. Explored databases — Found two databases: dev and sample_data_dev
3. Located schemas — Checked the sample_data_dev database and found the tickit schema
4. Found sales table — Identified the sales table within the tickit schema
5. Analyzed table structure — Examined columns in the sales table (salesid, pricepaid, qtysold, saletime, etc.)
6. Executed query — Ran SQL to get the 3 most recent sales ordered by saletime DESC
> Show me the query text.
Here's the exact SQL query:
sql
SELECT salesid, listid, sellerid, buyerid, eventid, qtysold, pricepaid, commission, saletime
FROM tickit.sales
ORDER BY saletime DESC
LIMIT 3;
Cross-Cluster Data Comparison
How off is the analytics sales data from the ETL sales data in Redshift?
I'll help you analyze sales data from your Redshift ETL pipeline. Let me discover your Redshift environment first.
...discovering 3 Redshift environments (analytics cluster, marketing cluster, ETL workgroup)...
# Sales Data Comparison: Analytics vs ETL
## Executive Summary
Sales data between Analytics cluster and ETL workgroup is perfectly synchronized with zero discrepancies found.
## Environment Overview
- Analytics: redshift-cluster-analytics (Provisioned, 2x dc2.large nodes)
- ETL: redshift-workgroup-etl (Serverless)
- Database: sample_data_dev.tickit.sales
## Data Comparison Results
### High-Level Metrics
| Metric | Analytics Cluster | ETL Workgroup | Status |
|-----------------|-------------------|-------------------|--------|
| Total Records | 172,456 | 172,456 | Match |
| Total Revenue | $110,765,431 | $110,765,431 | Match |
| Total Quantity | 345,349 | 345,349 | Match |
| Average Price | $642.28 | $642.28 | Match |
| Date Range | 2008-01-01 to 2008-12-31 | 2008-01-01 to 2008-12-31 | Match |
### Recent Sales (Q4 2008)
| Month | Analytics Revenue | ETL Revenue | Analytics Txns | ETL Txns | Status |
|----------|-------------------|---------------|----------------|----------|--------|
| Dec 2008 | $4,521,806 | $4,521,806 | 7,059 | 7,059 | Match |
| Nov 2008 | $9,044,905 | $9,044,905 | 14,261 | 14,261 | Match |
| Oct 2008 | $10,726,368 | $10,726,368 | 16,741 | 16,741 | Match |
## Key Findings
- Data Integrity: Perfect synchronization across all metrics
- Verification: Transaction-level details match exactly (verified 10 recent records)
> Briefly describe your actions.
I analyzed sales data from your Redshift environments by:
1. Discovered Infrastructure — Found 3 Redshift environments (analytics, marketing, ETL)
2. Explored Data Structure — Located sales data in sample_data_dev.tickit.sales with 10 columns
3. Compared High-Level Metrics — Ran aggregate queries on both clusters (172,456 records, $110M revenue)
4. Analyzed Recent Data — Examined Q4 2008 monthly trends and verified 10 most recent transactions
5. Generated Report — Created a comprehensive comparison showing perfect synchronization
> Show me the SQL queries you used.
## 1. High-Level Metrics
sql
SELECT
COUNT(*) as total_records,
MIN(saletime) as earliest_sale,
MAX(saletime) as latest_sale,
SUM(pricepaid) as total_revenue,
SUM(qtysold) as total_quantity,
AVG(pricepaid) as avg_price
FROM tickit.sales;
## 2. Recent Monthly Sales
sql
SELECT
DATE_TRUNC('month', saletime) as sale_month,
COUNT(*) as transaction_count,
SUM(pricepaid) as monthly_revenue,
SUM(qtysold) as monthly_quantity,
AVG(pricepaid) as avg_transaction_value
FROM tickit.sales
WHERE saletime >= '2008-10-01'
GROUP BY DATE_TRUNC('month', saletime)
ORDER BY sale_month DESC
LIMIT 10;
## 3. Recent Transaction Details
sql
SELECT salesid, listid, sellerid, buyerid, eventid, qtysold, pricepaid, commission, saletime
FROM tickit.sales
WHERE saletime >= '2008-12-30'
ORDER BY saletime DESC, salesid DESC
LIMIT 10;
Tools
list_clusters
Discovers all available Amazon Redshift clusters and serverless workgroups.
list_clusters() -> list[RedshiftCluster]
Returns: List of cluster information including:
- Cluster identifier and type (provisioned/serverless)
- Status and connection details
- Configuration information (node type, encryption, etc.)
- Tags and metadata
list_databases
Lists all databases in a specified Redshift cluster.
list_databases(cluster_identifier: str, database_name: str = "dev") -> list[RedshiftDatabase]
Parameters:
cluster_identifier: The cluster identifier fromlist_clustersdatabase_name: Database to connect to for querying (default: "dev")
Returns: List of database information including:
- Database name and owner
- Database type (local/shared)
- Access control information
- Isolation level
list_schemas
Lists all schemas in a specified database.
list_schemas(cluster_identifier: str, schema_database_name: str) -> list[RedshiftSchema]
Parameters:
cluster_identifier: The cluster identifier fromlist_clustersschema_database_name: Database name to list schemas for
Returns: List of schema information including:
- Schema name and owner
- Schema type (local/external/shared)
- Access permissions
- External schema details (if applicable)
list_tables
Lists all tables in a specified schema.
list_tables(cluster_identifier: str, table_database_name: str, table_schema_name: str) -> list[RedshiftTable]
Parameters:
cluster_identifier: The cluster identifier fromlist_clusterstable_database_name: Database name containing the schematable_schema_name: Schema name to list tables for
Returns: List of table information including:
- Table name and type (TABLE/VIEW/EXTERNAL TABLE)
- Access permissions
- Remarks and metadata
list_columns
Lists all columns in a specified table.
list_columns(
cluster_identifier: str,
column_database_name: str,
column_schema_name: str,
column_table_name: str
) -> list[RedshiftColumn]
Parameters:
cluster_identifier: The cluster identifier fromlist_clusterscolumn_database_name: Database name containing the tablecolumn_schema_name: Schema name containing the tablecolumn_table_name: Table name to list columns for
Returns: List of column information including:
- Column name and data type
- Nullable status and default values
- Numeric precision and scale
- Character length limits
- Ordinal position and remarks
execute_query
Executes a SQL query against a Redshift cluster with safety protections.
execute_query(cluster_identifier: str, database_name: str, sql: str) -> QueryResult
Parameters:
cluster_identifier: The cluster identifier fromlist_clustersdatabase_name: Database to execute the query againstsql: SQL statement to execute (SELECT statements recommended)
Returns: Query result including:
- Column names and data types
- Result rows with proper type conversion
- Row count
- Query ID for reference
review_cluster
Runs a diagnostic review of a Redshift cluster or serverless workgroup. Returns identified potential issues and respective recommendations ordered by required mitigation effort.
review_cluster(cluster_identifier: str, database_name: str = 'dev') -> ReviewResult
Parameters:
cluster_identifier: The cluster identifier fromlist_clustersdatabase_name: Database to connect to for querying system views (defaults todev)
Returns: Review result including:
- Number of signals evaluated
- Findings with affected row counts and recommendation IDs
- Deduplicated recommendations with documentation links
- List of diagnostic queries executed
Note: Requires the connecting database user to hold the sys:monitor role (or be a superuser), see Database Permissions. Provisioned-only diagnostics are automatically skipped for serverless workgroups.
Permissions
AWS IAM Permissions
Your AWS credentials need the following IAM permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"redshift:DescribeClusters",
"redshift-serverless:ListWorkgroups",
"redshift-serverless:GetWorkgroup",
"redshift-data:ExecuteStatement",
"redshift-data:DescribeStatement",
"redshift-data:GetStatementResult",
"redshift-serverless:GetCredentials",
"redshift:GetClusterCredentialsWithIAM",
"redshift:GetClusterCredentials"
],
"Resource": "*"
}
]
}
Database Permissions
In addition to AWS IAM permissions, you need appropriate database-level permissions:
-
Read Access:
SELECTpermissions on tables/views you want to query -
Schema Access:
USAGEpermissions on schemas you want to explore -
Database Access: Connection permissions to databases you want to access
-
Review Access: The
review_clustertool reads system views such asSYS_AUTO_TABLE_OPTIMIZATION,STV_NODE_STORAGE_CAPACITY, andSVV_TABLE_INFO, which require superuser orsys:monitoraccess. Grant the connecting database user thesys:monitorrole, which is the narrowest grant that covers them:GRANT ROLE sys:monitor TO "<database_user>";
<database_user>is the output ofSELECT current_user. When the server authenticates with IAM credentials it isIAM:<user>orIAMR:<role>, and the double quotes are required for those names. The grant must be issued by a superuser, such as the cluster's admin user.
For the strongest protection, grant these to a least-privilege, read-only role rather than a broad or write-capable one.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file awslabs_redshift_mcp_server-0.0.34.tar.gz.
File metadata
- Download URL: awslabs_redshift_mcp_server-0.0.34.tar.gz
- Upload date:
- Size: 163.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
714fdd9cf9fafe9df0810575ae66ed19dec87de6c11fd86e712e04f5c7178c9d
|
|
| MD5 |
df0feef8825ea7c725655bc26c8a9739
|
|
| BLAKE2b-256 |
e6be2b29f80d8567064f28a4f9fbcd0cad34b17e0b439d76b181356bc7d85af6
|
Provenance
The following attestation bundles were made for awslabs_redshift_mcp_server-0.0.34.tar.gz:
Publisher:
release.yml on awslabs/mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
awslabs_redshift_mcp_server-0.0.34.tar.gz -
Subject digest:
714fdd9cf9fafe9df0810575ae66ed19dec87de6c11fd86e712e04f5c7178c9d - Sigstore transparency entry: 2414649748
- Sigstore integration time:
-
Permalink:
awslabs/mcp@ebcafaed027f56a2fc3faaa9ee6e95476b62adae -
Branch / Tag:
refs/tags/2026.08.20260810225031 - Owner: https://github.com/awslabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ebcafaed027f56a2fc3faaa9ee6e95476b62adae -
Trigger Event:
push
-
Statement type:
File details
Details for the file awslabs_redshift_mcp_server-0.0.34-py3-none-any.whl.
File metadata
- Download URL: awslabs_redshift_mcp_server-0.0.34-py3-none-any.whl
- Upload date:
- Size: 55.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ad9b15d127ab4e89eafb53937eba260445a163ec16641cc53769e7d4ff09aa1
|
|
| MD5 |
da3acb9d85b10bf3eb1c0b9173358f8f
|
|
| BLAKE2b-256 |
bd6f6cd714b583c2067780841185ed300116cf8c307338b9a76b62860e2f8346
|
Provenance
The following attestation bundles were made for awslabs_redshift_mcp_server-0.0.34-py3-none-any.whl:
Publisher:
release.yml on awslabs/mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
awslabs_redshift_mcp_server-0.0.34-py3-none-any.whl -
Subject digest:
8ad9b15d127ab4e89eafb53937eba260445a163ec16641cc53769e7d4ff09aa1 - Sigstore transparency entry: 2414649784
- Sigstore integration time:
-
Permalink:
awslabs/mcp@ebcafaed027f56a2fc3faaa9ee6e95476b62adae -
Branch / Tag:
refs/tags/2026.08.20260810225031 - Owner: https://github.com/awslabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ebcafaed027f56a2fc3faaa9ee6e95476b62adae -
Trigger Event:
push
-
Statement type: