Skip to main content
Glama
Moonlight-CL

Redshift MCP Server

by Moonlight-CL

Redshift MCP 서버

Amazon Redshift용 MCP(Model Context Protocol) 서버로, AI 어시스턴트가 Redshift 데이터베이스와 상호 작용할 수 있도록 해줍니다.

소개

Redshift MCP 서버는 Amazon Redshift 데이터베이스와 상호 작용하기 위한 도구와 리소스를 제공하는 모델 컨텍스트 프로토콜(Model Context Protocol) 의 Python 기반 구현입니다. 이를 통해 AI 비서가 다음과 같은 작업을 수행할 수 있습니다.

  • Redshift 데이터베이스의 스키마 및 테이블 나열

  • 테이블 DDL(데이터 정의 언어) 스크립트 검색

  • 테이블 통계 가져오기

  • SQL 쿼리 실행

  • 통계 정보를 수집하기 위해 테이블을 분석합니다.

  • SQL 쿼리에 대한 실행 계획 가져오기

Related MCP server: redshift-utils-mcp

설치

필수 조건

  • Python 3.13 이상

  • Amazon Redshift 클러스터

  • Redshift 자격 증명(호스트, 포트, 사용자 이름, 비밀번호, 데이터베이스)

소스에서 설치

지엑스피1

구성

서버에는 Redshift 클러스터에 연결하기 위해 다음과 같은 환경 변수가 필요합니다.

RS_HOST=your-redshift-cluster.region.redshift.amazonaws.com
RS_PORT=5439
RS_USER=your_username
RS_PASSWORD=your_password
RS_DATABASE=your_database
RS_SCHEMA=your_schema  # Optional, defaults to "public"

이러한 환경 변수를 직접 설정하거나 .env 파일을 사용할 수 있습니다.

용법

서버 시작

# Start the server
uv run --with mcp python-dotenv redshift-connector mcp
mcp run src/redshift_mcp_server/server.py

AI 어시스턴트와 통합

MCP를 지원하는 AI 어시스턴트와 함께 이 서버를 사용하려면 MCP 설정에 다음 구성을 추가하세요.

{
  "mcpServers": {
    "redshift": {
      "command": "uv",
      "args": ["--directory", "src/redshift_mcp_server", "run", "server.py"],
      "env": {
        "RS_HOST": "your-redshift-cluster.region.redshift.amazonaws.com",
        "RS_PORT": "5439",
        "RS_USER": "your_username",
        "RS_PASSWORD": "your_password",
        "RS_DATABASE": "your_database",
        "RS_SCHEMA": "your_schema"
      }
    }
  }
}

특징

자원

서버는 다음과 같은 리소스를 제공합니다.

  • rs:///schemas - 데이터베이스의 모든 스키마를 나열합니다.

  • rs:///{schema}/tables - 특정 스키마의 모든 테이블을 나열합니다.

  • rs:///{schema}/{table}/ddl - 특정 테이블에 대한 DDL 스크립트를 가져옵니다.

  • rs:///{schema}/{table}/statistic - 특정 테이블에 대한 통계를 가져옵니다.

도구

서버는 다음과 같은 도구를 제공합니다.

  • execute_sql - Redshift 클러스터에서 SQL 쿼리를 실행합니다.

  • analyze_table - 통계 정보를 수집하기 위해 테이블을 분석합니다.

  • get_execution_plan - SQL 쿼리에 대한 런타임 통계와 함께 실행 계획을 가져옵니다.

예시

스키마 나열

access_mcp_resource("redshift-mcp-server", "rs:///schemas")

스키마에 테이블 나열

access_mcp_resource("redshift-mcp-server", "rs:///public/tables")

테이블 DDL 가져오기

access_mcp_resource("redshift-mcp-server", "rs:///public/users/ddl")

SQL 실행

use_mcp_tool("redshift-mcp-server", "execute_sql", {"sql": "SELECT * FROM public.users LIMIT 10"})

테이블 분석

use_mcp_tool("redshift-mcp-server", "analyze_table", {"schema": "public", "table": "users"})

실행 계획 얻기

use_mcp_tool("redshift-mcp-server", "get_execution_plan", {"sql": "SELECT * FROM public.users WHERE user_id = 123"})

개발

프로젝트 구조

redshift-mcp-server/
├── src/
│   └── redshift_mcp_server/
│       ├── __init__.py
│       └── server.py
├── pyproject.toml
└── README.md

종속성

  • mcp[cli]>=1.5.0 - 모델 컨텍스트 프로토콜 SDK

  • python-dotenv>=1.1.0 - .env 파일에서 환경 변수를 로드하기 위해

  • redshift-connector>=2.1.5 - Amazon Redshift용 Python 커넥터

Available Tools

3 tools
analyze_tableC

Analyze table to collect statistics information

ParametersJSON Schema
NameRequiredDescriptionDefault
schemaYesSchema name
tableYesTable name

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. The description mentions 'collect statistics information' but doesn't specify what statistics are collected (e.g., row count, column distributions, indexes), whether this is a read-only operation, performance implications, or output format. For a tool with no annotation coverage, this leaves critical behavioral traits undocumented, though it doesn't contradict any annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence: 'Analyze table to collect statistics information'. It's front-loaded with the core action and outcome, with no wasted words. While it could be more detailed for better tool selection, it's appropriately concise for its length, earning a high score for structure and brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (analysis operation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'statistics information' entails, how results are returned, or behavioral aspects like performance. With no structured fields to compensate, the description should provide more context to ensure the agent can use the tool effectively, but it falls short.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with clear documentation for 'schema' and 'table' parameters. The description doesn't add any parameter-specific semantics beyond what the schema provides, such as examples or constraints. However, with high schema coverage, the baseline score is 3, as the schema adequately documents parameters without needing extra description details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose as 'Analyze table to collect statistics information', which provides a clear verb ('analyze') and resource ('table') with a general outcome ('collect statistics information'). However, it doesn't differentiate from sibling tools like 'execute_sql' or 'get_execution_plan', leaving ambiguity about when to use this specific analysis tool versus executing SQL queries directly. The purpose is understandable but lacks specificity for tool selection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'execute_sql' or 'get_execution_plan', nor does it specify contexts where table analysis is preferred over direct SQL execution or plan retrieval. Without any usage context or exclusions, the agent must infer when this tool is appropriate, which could lead to incorrect tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

execute_sqlC

Execute a SQL Query on the Redshift cluster

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYesThe SQL to Execute

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It doesn't address critical aspects such as whether the query is read-only or mutating data, authentication needs, rate limits, error handling, or the format of results. The description merely states what the tool does without revealing operational traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly conveys the tool's function without unnecessary words. It is front-loaded with the core action and resource, making it easy to understand at a glance. Every part of the sentence earns its place by defining the tool's purpose clearly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that executes SQL queries with no annotations and no output schema, the description is insufficient. It lacks details on behavioral aspects like data mutation risks, result formats, error conditions, and usage constraints. Given the complexity of SQL execution and the absence of structured data to compensate, the description does not provide enough context for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'sql' parameter documented as 'The SQL to Execute'. The description adds no additional meaning beyond this, such as SQL dialect specifics, query length limits, or supported operations. Given the high schema coverage, a baseline score of 3 is appropriate as the schema handles parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Execute a SQL Query') and target resource ('on the Redshift cluster'), making the purpose unambiguous. It distinguishes from siblings like 'analyze_table' and 'get_execution_plan' by focusing on direct query execution rather than analysis or planning operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance is provided on when to use this tool versus alternatives. While the description implies it's for executing SQL queries, it doesn't specify scenarios where 'analyze_table' or 'get_execution_plan' might be more appropriate, nor does it mention prerequisites like database permissions or connection requirements.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_execution_planC

Get actual execution plan with runtime statistics for a SQL query

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYesThe SQL query to analyze

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves an execution plan with runtime statistics, which suggests a read-only, analytical operation, but doesn't clarify permissions, performance impact, data returned format, or any side effects. This is inadequate for a tool that likely interacts with a database system.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core functionality ('Get actual execution plan with runtime statistics') and specifies the target ('for a SQL query'). There is zero waste, making it highly concise and well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete for a tool that analyzes SQL queries. It lacks details on behavioral traits (e.g., read-only nature, performance implications), output format, and differentiation from siblings. This leaves significant gaps for an agent to understand the tool's full context and usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'sql' documented as 'The SQL query to analyze'. The description adds no additional meaning beyond this, such as SQL dialect requirements, query length limits, or syntax specifics. Baseline 3 is appropriate as the schema handles parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('execution plan with runtime statistics'), and specifies the target ('for a SQL query'). It doesn't explicitly differentiate from sibling tools like 'execute_sql' or 'analyze_table', but the focus on 'actual execution plan with runtime statistics' implies analytical rather than execution functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives like 'execute_sql' or 'analyze_table' is provided. The description implies usage for SQL query analysis but doesn't specify contexts, prerequisites, or exclusions, leaving the agent to infer appropriate scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updates
    • First observedanalyze_table
    • First observedexecute_sql
    • First observedget_execution_plan

TDQS

B3/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: analyze_table focuses on table statistics, execute_sql runs queries, and get_execution_plan provides query performance insights. There is no overlap in functionality, making it easy for an agent to select the right tool.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (analyze_table, execute_sql, get_execution_plan) with clear, descriptive verbs. The naming is uniform and predictable throughout the set.

Tool Count3/5

With only 3 tools, the set feels thin for a database server like Redshift, which typically involves more operations such as data manipulation, schema management, or monitoring. While the tools cover core query execution and analysis, the scope seems limited.

Completeness2/5

There are significant gaps in the tool surface for a Redshift server. Missing are essential operations like creating/dropping tables, inserting/updating data, listing databases or tables, and user/permission management. This incomplete coverage will likely cause agent failures in broader database workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that provides AI assistants with comprehensive access to SQL databases, enabling schema inspection, query execution, and database operations with enterprise-grade security.
    16 npm
    7
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables AI assistants to interact with Vertica databases through SQL queries, schema inspection, database documentation, and data export capabilities.
    1
    -