Redshift Utils MCP Server
About
π€ Enable AI assistants (Claude, Cursor) to monitor, diagnose, and query Amazon Redshift using this MCP server and the AWS Data API.
Details
- License
- MIT
Explore
β¨ Secure Redshift Connection (via Data API): Connects to your Amazon Redshift cluster using the AWS Redshift Data API via Boto3, leveraging AWS Secrets Manager for credentials managed securely via environment variables.
π Schema Discovery: Exposes MCP resources for listing schemas and tables within a specified schema.
π Metadata & Statistics: Provides a tool (handle_inspect_table) to gather detailed table metadata, statistics (like size, row counts, skew, stats staleness), and maintenance status.
π Read-Only Query Execution: Offers a secure MCP tool (handle_execute_ad_hoc_query) to execute arbitrary SELECT queries against the Redshift database, enabling data retrieval based on LLM requests.
π Query Performance Analysis: Includes a tool (handle_diagnose_query_performance) to retrieve and analyze the execution plan, metrics, and historical data for a specific query ID.
π Table Inspection: Provides a tool (handle_inspect_table) to perform a comprehensive inspection of a table, including design, storage, health, and usage.
π©Ί Cluster Health Check: Offers a tool (handle_check_cluster_health) to perform a basic or full health assessment of the cluster using various diagnostic queries.
π Lock Diagnosis: Provides a tool (handle_diagnose_locks) to identify and report on current lock contention and blocking sessions.
π Workload Monitoring: Includes a tool (handle_monitor_workload) to analyze cluster workload patterns over a time window, covering WLM, top queries, and resource usage.
π DDL Retrieval: Offers a tool (handle_get_table_definition) to retrieve the SHOW TABLE output (DDL) for a specified table.
π‘οΈ Input Sanitization: Utilizes parameterized queries via the Boto3 Redshift Data API client where applicable to mitigate SQL injection risks.
π§© Standardized MCP Interface: Adheres to the Model Context Protocol specification for seamless integration with compatible clients (e.g., Claude Desktop, Cursor IDE, custom applications).
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Redshift Utils MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Software:
Python 3.10+
uv (recommended package manager) or pip
Infrastructure & Access:
Access to an Amazon Redshift cluster.
An AWS account with permissions to use the Redshift Data API (redshift-data:) and access the specified Secrets Manager secret (secretsmanager:GetSecretValue).
A Redshift user account whose credentials are stored in AWS Secrets Manager. This user needs the necessary permissions within Redshift to perform the actions enabled by this server (e.g., CONNECT to the database, SELECT on target tables, SELECT on relevant system views like pg_class, pg_namespace, svv_all_schemas, svv_tables, svv_table_info`). Using a role with the principle of least privilege is strongly recommended. See Security Considerations.
Credentials:
Your Redshift connection details are managed via AWS Secrets Manager, and the server connects using the Redshift Data API. You need:
The Redshift cluster identifier.
The database name within the cluster.
The ARN of the AWS Secrets Manager secret containing the database credentials (username and password).
The AWS region where the cluster and secret reside.
- Optionally, an AWS profile name if not using default credentials/region.
These details will be configured via environment variables as detailed in the Configuration section.
The easiest way to install the Redshift Utils MCP Server is directly from PyPI:
Alternatively, you can install from the source repository:
bash
uv sync
pip install -e .
redshift-utils-mcp
uvx redshift-utils-mcp
handle_check_cluster_health
Performs a health assessment of the Redshift cluster using a set of diagnostic SQL scripts.
handle_diagnose_locks
Identifies active lock contention and blocking sessions in the cluster.
handle_diagnose_query_performance
Analyzes a specific query's execution performance, including plan, metrics, and historical data.
handle_execute_ad_hoc_query
Executes an arbitrary SQL query provided by the user via Redshift Data API. Designed as an escape hatch.
handle_get_table_definition
Retrieves the DDL (Data Definition Language) statement (`SHOW TABLE`) for a specific table.
handle_inspect_table
Retrieves detailed information about a specific Redshift table, covering design, storage, health, and usage.
handle_monitor_workload
Analyzes cluster workload patterns over a specified time window using various diagnostic scripts.
| Tool Name | Description | Key Parameters (Required) | Example Invocation |
| :---------------------------------- | :----------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------- | :---------------------------------------------------------------------------------------------- |
| handle_check_cluster_health | Performs a health assessment of the Redshift cluster using a set of diagnostic SQL scripts. | level (optional), time_window_days (optional) | use_mcp_tool("redshift-admin", "handle_check_cluster_health", {"level": "full"}) |
| handle_diagnose_locks | Identifies active lock contention and blocking sessions in the cluster. | min_wait_seconds (optional) | use_mcp_tool("redshift-admin", "handle_diagnose_locks", {"min_wait_seconds": 10}) |
| handle_diagnose_query_performance | Analyzes a specific query's execution performance, including plan, metrics, and historical data. | query_id | use_mcp_tool("redshift-admin", "handle_diagnose_query_performance", {"query_id": 12345}) |
| handle_execute_ad_hoc_query | Executes an arbitrary SQL query provided by the user via Redshift Data API. Designed as an escape hatch. | sql_query | use_mcp_tool("redshift-admin", "handle_execute_ad_hoc_query", {"sql_query": "SELECT ..."}) |
| handle_get_table_definition | Retrieves the DDL (Data Definition Language) statement (SHOW TABLE) for a specific table. | schema_name, table_name | use_mcp_tool("redshift-admin", "handle_get_table_definition", {"schema_name": "public", ...}) |
| handle_inspect_table | Retrieves detailed information about a specific Redshift table, covering design, storage, health, and usage. | schema_name, table_name* | use_mcp_tool("redshift-admin", "handle_inspect_table", {"schema_name": "analytics", ...}) |
| handle_monitor_workload | Analyzes cluster workload patterns over a specified time window using various diagnostic scripts. | time_window_days (optional), top_n_queries (optional) | use_mcp_tool("redshift-admin", "handle_monitor_workload", {"time_window_days": 7}) |
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"redshift utils mcp server": {
"redshift-utils-mcp": {
"command": "uv",
"args": [
"pip",
"install",
"redshift-utils-mcp"
]
}
}
}
}
McpServers
{
"redshift-utils-mcp": {
"command": "uv",
"args": [
"pip",
"install",
"redshift-utils-mcp"
]
}
}
<a href="https://glama.ai/mcp/servers/@vinodismyname/redshift-utils-mcp">
Overview
This project implements a Model Context Protocol (MCP) server designed specifically to interact with Amazon Redshift databases.
It bridges the gap between Large Language Models (LLMs) or AI assistants (like those in Claude, Cursor, or custom applications) and your Redshift data warehouse, enabling secure, standardized data access and interaction. This allows users to query data, understand database structure, and monitoring/diagnostic operations using natural language or AI-driven prompts.
This server is for developers, data analysts, or teams looking to integrate LLM capabilities directly with their Amazon Redshift data environment in a structured and secure manner.
Table of Contents
- Redshift Utils MCP Server
- Overview
- Table of Contents
- Features
- Prerequisites
- Installation
- Install from PyPI (Recommended)
- Install from Source
- Configuration
- Usage
- Connecting with Claude Desktop / Anthropic Console:
- Connecting with Claude Code CLI:
- Connecting with Cursor IDE:
- Available MCP Resources
- Available MCP Tools
- TO DO
- References
Features
β¨ Secure Redshift Connection (via Data API): Connects to your Amazon Redshift cluster using the AWS Redshift Data API via Boto3, leveraging AWS Secrets Manager for credentials managed securely via environment variables.
π Schema Discovery: Exposes MCP resources for listing schemas and tables within a specified schema.
π Metadata & Statistics: Provides a tool (handle_inspect_table) to gather detailed table metadata, statistics (like size, row counts, skew, stats staleness), and maintenance status.
π Read-Only Query Execution: Offers a secure MCP tool (handle_execute_ad_hoc_query) to execute arbitrary SELECT queries against the Redshift database, enabling data retrieval based on LLM requests.
π Query Performance Analysis: Includes a tool (handle_diagnose_query_performance) to retrieve and analyze the execution plan, metrics, and historical data for a specific query ID.
π Table Inspection: Provides a tool (handle_inspect_table) to perform a comprehensive inspection of a table, including design, storage, health, and usage.
π©Ί Cluster Health Check: Offers a tool (handle_check_cluster_health) to perform a basic or full health assessment of the cluster using various diagnostic queries.
π Lock Diagnosis: Provides a tool (handle_diagnose_locks) to identify and report on current lock contention and blocking sessions.
π Workload Monitoring: Includes a tool (handle_monitor_workload) to analyze cluster workload patterns over a time window, covering WLM, top queries, and resource usage.
π DDL Retrieval: Offers a tool (handle_get_table_definition) to retrieve the SHOW TABLE output (DDL) for a specified table.
π‘οΈ Input Sanitization: Utilizes parameterized queries via the Boto3 Redshift Data API client where applicable to mitigate SQL injection risks.
π§© Standardized MCP Interface: Adheres to the Model Context Protocol specification for seamless integration with compatible clients (e.g., Claude Desktop, Cursor IDE, custom applications).
Prerequisites
Software:
Python 3.10+
uv (recommended package manager) or pip
Infrastructure & Access:
Access to an Amazon Redshift cluster.
An AWS account with permissions to use the Redshift Data API (redshift-data:) and access the specified Secrets Manager secret (secretsmanager:GetSecretValue).
A Redshift user account whose credentials are stored in AWS Secrets Manager. This user needs the necessary permissions within Redshift to perform the actions enabled by this server (e.g., CONNECT to the database, SELECT on target tables, SELECT on relevant system views like pg_class, pg_namespace, svv_all_schemas, svv_tables, svv_table_info). Using a role with the principle of least privilege is strongly recommended. See Security Considerations.
Credentials:
Your Redshift connection details are managed via AWS Secrets Manager, and the server connects using the Redshift Data API. You need:
The Redshift cluster identifier.
The database name within the cluster.
The ARN of the AWS Secrets Manager secret containing the database credentials (username and password).
The AWS region where the cluster and secret reside.
- Optionally, an AWS profile name if not using default credentials/region.
These details will be configured via environment variables as detailed in the Configuration section.
Installation
Install from PyPI (Recommended)
The easiest way to install the Redshift Utils MCP Server is directly from PyPI:
``bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



