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 comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.Last updated -31TypeScript
- -securityFlicense-qualityA Model Context Protocol server that enables AI assistants to securely interact with Apache IoTDB databases through a controlled interface for listing tables, reading data, and executing SQL queries.Last updated -Python
MongoDB MCP Serverofficial
AsecurityAlicenseAqualityA Model Context Protocol server that enables AI assistants to interact with MongoDB Atlas resources through natural language, supporting database operations and Atlas management functions.Last updated -2012,662536TypeScriptApache 2.0- AsecurityAlicenseAqualityA Model Context Protocol server that provides read-only MySQL database queries for AI assistants, allowing them to execute queries, explore database structures, and investigate data directly from AI-powered tools.Last updated -37037TypeScriptMIT License