10000 Release Release v0.3.1 - Initial Release Β· vinodismyname/redshift-utils-mcp Β· GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Release v0.3.1 - Initial Release

Latest
Compare 61FF
Choose a tag to compare
@vinodismyname vinodismyname released this 28 Apr 22:06
· 8 commits to main since this release

πŸš€ Initial release of the Redshift Admin MCP Server!

This is the first version of the server, designed to bridge the gap between AI assistants (like Claude, Cursor, etc.) and your Amazon Redshift data warehouse using the Model Context Protocol (MCP). It leverages the AWS Redshift Data API for secure and simplified interactions.

✨ Features

  • MCP Server Foundation: Built using the mcp Python library.
  • Secure Redshift Connection: Connects via AWS Redshift Data API using Boto3, configured via AWS Secrets Manager ARN and standard AWS credentials (environment variables, profiles, IAM roles).
  • Command-Line Interface: Basic CLI powered by Typer for starting the server and managing configuration overrides (src/redshift_utils_mcp/__main__.py).
  • Core MCP Tools Implemented:
    • handle_check_cluster_health: Performs basic/full health checks using diagnostic SQL scripts.
    • handle_diagnose_locks: Identifies lock contention and blocking PIDs.
    • handle_diagnose_query_performance: Analyzes performance metrics, plan, and history for a specific query ID.
    • handle_execute_ad_hoc_query: Allows execution of arbitrary (read-only intended) SQL queries.
    • handle_get_table_definition: Retrieves table DDL using SHOW TABLE.
    • handle_inspect_table: Gathers comprehensive details about a table (design, storage, health, usage).
    • handle_monitor_workload: Analyzes workload patterns over a time window.
  • MCP Resources Implemented:
    • /scripts/{script_path}: Serves the content of internal SQL scripts.
    • redshift://schemas: Lists user-defined schemas.
    • redshift://wlm/configuration: Retrieves WLM configuration details.
    • redshift://schema/{schema_name}/tables: Lists tables within a specified schema.

πŸš€ Usage

  • Configure Environment Variables: Set the required variables for connecting via Redshift Data API. See the Configuration section in the README.md for details. Essential variables are:

    • REDSHIFT_CLUSTER_ID
    • REDSHIFT_DATABASE
    • REDSHIFT_SECRET_ARN
    • AWS_REGION (or AWS_DEFAULT_REGION)
    • (Optional) AWS_PROFILE
  • Connect using your preferred MCP client (e.g., Claude Desktop, Cursor IDE) by configuring it to launch the server via stdio. See the MCP Integration section in the README.md.

⚠️ Known Issues / Limitations

  • Handler Output Format: Most tool handlers currently return raw results (lists of dictionaries from SQL queries) or Python Exception objects directly within the results dictionary when errors occur during script execution. User-facing formatting or summarization is minimal within the handlers themselves.
  • Limited Resource Discovery: Only basic schema, table listing, and WLM config resources are implemented. No resources for views, functions, detailed column info, etc.
  • Read-Only Focus: Designed primarily for diagnostics and read operations. No built-in tools for INSERT, UPDATE, DELETE. The handle_execute_ad_hoc_query tool could potentially execute write operations if the configured user has sufficient permissions, use with caution.
  • SQL Script Dependency: Relies on the bundled SQL scripts. Errors in these scripts or changes in Redshift system views they query could affect functionality.

We hope you find this initial release useful! Please report bugs or suggest features via GitHub Issues.

0