Redash MCP Server
The Redash MCP Server allows you to interact with a Redash instance via the Redash API to execute queries, manage data sources, and retrieve results.
Capabilities:
Execute SQL queries: Run SQL queries against a data source and wait for results, with optional data source selection and cache expiration (
max_age) settingsList data sources: Retrieve all available data sources configured in Redash
Get data source details: Fetch detailed information about a specific data source by ID
Retrieve saved queries: Get a saved query's details (including SQL text) by ID, or search for saved queries by keyword
Access query results: Fetch existing query results by ID without re-executing, or get the latest cached result for a saved query
The server supports multiple deployment modes (stdio, Streamable HTTP, SSE) and flexible configuration via environment variables or Docker.
Provides tools for interacting with the Redash API, enabling the execution of SQL queries, retrieval of query results, and the management of data sources.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Redash MCP Server List all data sources and count the total users from data source 1"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Redash MCPサーバー
Redash APIのMCPサーバーで、クエリの実行、結果の取得などの機能を提供します。
ツール
execute_query_and_waitSQLクエリを実行し、結果が利用可能になるまで待機します
入力パラメータ:
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
戻り値: 保存済みクエリの最新キャッシュ結果
Related MCP server: Redash MCP Server
セットアップ
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(非推奨) | |
起動フラグ | なし |
|
|
通信方式 | 標準入出力 | HTTP | HTTP(Server-Sent Events) |
ポート | 不要 | デフォルト 3000 | デフォルト 3000 |
エンドポイント | - |
|
|
主な用途 | ローカル利用 | リモート・複数クライアント共有 | レガシー互換 |
stdio(デフォルト)
標準入出力で通信するモードです。MCPクライアントからローカルで利用する場合はこちらを使用します。
npm run build
node dist/index.js開発時は
npm run devでTypeScriptを直接実行できます。
npxで利用する場合
npm link 済みであれば、npxで直接実行できます。
npx mcp-redashClaude 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クライアントやリモート接続に適しています。
.env で PORT REDASH_BASE_URL REDASH_API_KEY を設定してから起動してください。
nodeで起動する場合
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"
}
}
}Codexのconfig.toml 設定例
[mcp_servers.redash]
type = "url"
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"
}
}
}Available Tools
3 toolsexecute_query_and_waitC
Execute a SQL query and wait for the results
Inputs: query (required), data_source_id, max_age.
get_data_sourceC
Get details about a specific data source
Inputs: data_source_id (required).
list_data_sourcesB
List all available data sources
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: execute_query_and_wait runs queries, get_data_source retrieves details for a specific source, and list_data_sources enumerates all sources. There is no overlap or ambiguity between these operations.
All tools follow a consistent verb_noun pattern (execute_query_and_wait, get_data_source, list_data_sources) with clear, descriptive names that align well with their functions.
With only 3 tools, the server feels under-scoped for a Redash-like data querying and visualization platform. Key operations like creating/updating queries, managing dashboards, or fetching query results are missing, making the set too thin for typical agent workflows.
The tool surface is severely incomplete for a Redash server. While it covers basic data source listing and query execution, it lacks essential CRUD operations for queries, dashboards, and visualizations, as well as lifecycle management tools, which will likely cause agent failures in complex tasks.
Related MCP Connectors
Query BigQuery, Snowflake, Redshift & Azure Synapse with natural language
Ask your databases questions in plain English, run read-only SQL and set up data alerts.
Query, explore, and manage your databases through natural conversation.
Query Postgres, MySQL, SQL Server, Oracle, BigQuery, ClickHouse and Redshift from your AI client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Metabase analytics platform, allowing users to query databases, manage dashboards and cards, execute SQL queries, and access analytics data through natural language.119 npm1MIT
- AlicenseBqualityDmaintenanceEnables interaction with Redash instances through a standardized interface, allowing users to execute SQL queries, manage data sources, and retrieve query results using natural language.41,756 npm1MIT
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to interact with Metabase by providing access to dashboards, questions, and databases through the Metabase API. It allows users to list resources, execute existing cards, and run custom SQL queries to retrieve data through natural language.15 npm-
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Metabase for database operations, SQL queries, dashboard management, and analytics automation.28MIT