Redash
Execute queries and retrieve results using the Redash API.
Redash MCPサーバー
Redash APIのMCPサーバーで、クエリの実行、結果の取得などの機能を提供します。
ツール
-
execute_query_and_wait- SQLクエリを実行し、結果が利用可能になるまで待機します
- 入力パラメータ:
query(文字列): 実行するSQLクエリdata_source_id(数値, 任意): クエリを実行するデータソースのIDmax_age(数値, 任意): キャッシュ有効期限(秒)
- 戻り値: 利用可能になったクエリ結果
-
list_data_sources- 利用可能なすべてのデータソースを一覧表示します
- 入力パラメータ: なし
- 戻り値: データソースの配列
-
get_data_source- 特定のデータソースに関する詳細を取得します
- 入力パラメータ:
data_source_id(数値): データソースのID
- 戻り値: データソースの詳細情報
-
get_query- クエリIDにより保存済みクエリの詳細を取得します(SQLテキスト含む)
- 入力パラメータ:
query_id(数値): クエリID
- 戻り値: 保存済みクエリの詳細情報
-
search_queries- キーワードで保存済みクエリを検索します
- 入力パラメータ:
q(文字列): 検索キーワードpage(数値, 任意): ページ番号page_size(数値, 任意): ページサイズ
- 戻り値: 検索にマッチした保存済みクエリの一覧
-
get_query_result- クエリ結果IDにより既存のクエリ結果を取得します(再実行なし)
- 入力パラメータ:
query_result_id(数値): クエリ結果ID
- 戻り値: クエリ結果
-
get_saved_query_result- クエリIDにより保存済みクエリの最新キャッシュ結果を取得します
- 入力パラメータ:
query_id(数値): クエリID
- 戻り値: 保存済みクエリの最新キャッシュ結果
セットアップ
APIキー
Redash APIキーを取得してください。
- Redashにログイン
- 「Edit Profile」をクリック
- APIキーをコピーする
環境変数
以下の環境変数が必要です:
REDASH_API_KEY: RedashのAPIキーREDASH_BASE_URL: RedashのURL(例: https://redash.example.com)DATA_SOURCE_ID(任意): デフォルトのデータソースID(execute_query_and_waitでdata_source_idを省略した場合に使用)PORT(任意): HTTPサーバーのポート番号(デフォルト: 3000、Streamable HTTP / SSE で使用)
インストール
git clone https://github.com/yuki9541134/mcp-redash.git
cd mcp-redash
npm install
npm run build
npm link
起動モード
3つの起動モードに対応しています。
| stdio(デフォルト) | Streamable HTTP | SSE(非推奨) | |
|---|---|---|---|
| 起動フラグ | なし | --streamable-http | --sse |
| 通信方式 | 標準入出力 | HTTP | HTTP(Server-Sent Events) |
| ポート | 不要 | デフォルト 3000 | デフォルト 3000 |
| エンドポイント | - | POST/GET/DELETE /mcp | GET /sse, POST /messages |
| 主な用途 | ローカル利用 | リモート・複数クライアント共有 | レガシー互換 |
stdio(デフォルト)
標準入出力で通信するモードです。MCPクライアントからローカルで利用する場合はこちらを使用します。
npm run build
node dist/index.js
開発時は
npm run devでTypeScriptを直接実行できます。
npxで利用する場合
npm link 済みであれば、npxで直接実行できます。
npx mcp-redash
Claude Codeの .mcp.json 設定例:
{
"mcpServers": {
"redash": {
"type": "stdio",
"command": "npx",
"args": ["mcp-redash"],
"env": {
"REDASH_API_KEY": "<YOUR_API_KEY>",
"REDASH_BASE_URL": "https://redash.example.com"
}
}
}
}
Dockerで利用する場合
docker build -t yuki9541134/mcp-redash .
Claude Codeの .mcp.json 設定例:
{
"mcpServers": {
"redash": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "REDASH_API_KEY",
"-e", "REDASH_BASE_URL",
"yuki9541134/mcp-redash"
],
"env": {
"REDASH_API_KEY": "<YOUR_API_KEY>",
"REDASH_BASE_URL": "https://redash.example.com"
}
}
}
}
Streamable HTTP
HTTPサーバーとして起動し、Streamable HTTPプロトコルで通信するモードです。Webクライアントやリモート接続に適しています。
npm run build
node dist/index.js --streamable-http
開発時は
npm run dev -- --streamable-httpでTypeScriptを直接実行できます。
Docker Compose
docker compose up -d
.envのPORTでポートを変更できます(デフォルト: 3000)。
エンドポイント:
POST /mcp- リクエストの送信GET /mcp- SSEストリームの確立(サーバー → クライアント通知用)DELETE /mcp- セッションの終了
Claude Codeの .mcp.json 設定例:
{
"mcpServers": {
"redash": {
"type": "http",
"url": "http://localhost:3000/mcp"
}
}
}
SSE(非推奨)
非推奨: SSEモードはレガシー互換のために残されています。新規利用にはStreamable HTTPモードを推奨します。
HTTPサーバーとして起動し、Server-Sent Events (SSE) で通信するモードです。
npm run build
node dist/index.js --sse
開発時は
npm run dev -- --sseでTypeScriptを直接実行できます。
エンドポイント:
GET /sse- SSE接続の確立POST /messages- メッセージの送信
Claude Codeの .mcp.json 設定例:
{
"mcpServers": {
"redash": {
"type": "sse",
"url": "http://localhost:3000/sse"
}
}
}
İlgili Sunucular
Fantasy Premier League
Access Fantasy Premier League (FPL) data and tools, including player information, team details, and gameweek data.
Unofficial Reactome MCP Server
Access Reactome pathway and systems biology data via its live API.
Personal Memory MCP Server
A TypeScript and SQLite-based server enabling AI to remember personal data for personalized communication.
DICOM MCP Server
Enables AI assistants to query, read, and move data on DICOM servers such as PACS and VNA for medical imaging.
SchemaCrawler
Connect to any relational database, and be able to get valid SQL, and ask questions like what does a certain column prefix mean.
Shardeum MCP Server
An MCP server for interacting with the Shardeum blockchain.
Memory Cache Server
An MCP server that reduces token consumption by efficiently caching data between language model interactions.
Claude Conversation Memory System
Provides searchable local storage for Claude conversation history, enabling context retrieval during sessions.
IGDB MCP Server
Access the IGDB (Internet Game Database) API through Model Context Protocol (MCP)
Kusto MCP Server
An MCP server for Azure Data Explorer (Kusto) that enables AI assistants to interact with Kusto databases.