Redshift MCP サーバー
AI アシスタントが Redshift データベースと対話できるようにする Amazon Redshift 用の Model Context Protocol (MCP) サーバー。
導入
Redshift MCPサーバーは、Amazon Redshiftデータベースと連携するためのツールとリソースを提供する、モデルコンテキストプロトコル(Model Context Protocol)のPythonベースの実装です。これにより、AIアシスタントは以下のことが可能になります。
- Redshift データベース内のスキーマとテーブルを一覧表示する
- テーブルDDL(データ定義言語)スクリプトを取得する
- テーブル統計を取得する
- SQLクエリを実行する
- テーブルを分析して統計情報を収集する
- SQLクエリの実行プランを取得する
インストール
前提条件
- Python 3.13以上
- Amazon Redshift クラスター
- Redshift の資格情報 (ホスト、ポート、ユーザー名、パスワード、データベース)
ソースからインストール
構成
サーバーが Redshift クラスターに接続するには、次の環境変数が必要です。
これらの環境変数を直接設定することも、 .env
ファイルを使用することができます。
使用法
サーバーの起動
AIアシスタントとの統合
このサーバーを MCP をサポートする AI アシスタントで使用するには、MCP 設定に次の構成を追加します。
特徴
リソース
サーバーは次のリソースを提供します。
rs:///schemas
- データベース内のすべてのスキーマを一覧表示しますrs:///{schema}/tables
- 特定のスキーマ内のすべてのテーブルを一覧表示しますrs:///{schema}/{table}/ddl
- 特定のテーブルのDDLスクリプトを取得しますrs:///{schema}/{table}/statistic
- 特定のテーブルの統計情報を取得します
ツール
サーバーは次のツールを提供します。
execute_sql
- RedshiftクラスターでSQLクエリを実行するanalyze_table
- テーブルを分析して統計情報を収集しますget_execution_plan
- SQLクエリの実行時統計を含む実行プランを取得します
例
スキーマの一覧表示
スキーマ内のテーブルの一覧表示
テーブルDDLの取得
SQLの実行
テーブルを分析する
実行計画の取得
発達
プロジェクト構造
依存関係
mcp[cli]>=1.5.0
- モデルコンテキストプロトコルSDKpython-dotenv>=1.1.0
- .env ファイルから環境変数を読み込むためredshift-connector>=2.1.5
- Amazon Redshift 用の Python コネクタ
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
AI アシスタントが Amazon Redshift データベースと対話し、スキーマ探索、クエリ実行、統計収集を実行できるようにするモデルコンテキストプロトコル サーバー。
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server that integrates with Amazon Braket, allowing AI assistants to access, control, and interpret results from quantum computing resources.Last updated -TypeScript
- AsecurityAlicenseAqualityA Model Context Protocol server that provides a standardized interface for AI models to interact with NASA's vast array of data sources including APOD, Mars Rover photos, satellite imagery, and space weather data.Last updated -2418131TypeScriptISC License
- -securityFlicense-qualityA Model Context Protocol server that provides persistent task management capabilities for AI assistants, allowing them to create, update, and track tasks beyond their usual context limitations.Last updated -1TypeScript
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI agents to interact with Alibaba Cloud DataWorks through standardized interfaces, allowing seamless management of DataWorks resources and operations via the DataWorks Open API.Last updated -1698115TypeScriptApache 2.0