mcp-redash
Redash
Documentation
Redash MCPサーバー
Redash APIのMCPサーバーで、クエリの実行、結果の取得などの機能を提供します。
ツール
1. `execute_query_and_wait`
2. `list_data_sources`
3. `get_data_source`
4. `get_query`
5. `search_queries`
6. `get_query_result`
7. `get_saved_query_result`
セットアップ
APIキー
Redash APIキーを取得してください。
1. Redashにログイン
2. 「Edit Profile」をクリック
3. 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-redashClaude Codeの `.mcp.json` 設定例:
{
"mcpServers": {
"redash": {
"type": "stdio",
"command": "npx",
"args": ["mcp-redash"],
"env": {
"REDASH_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": "",
"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"
}
}
}Frequently asked questions
What is mcp-redash?
mcp-redash is Redash
How do I install mcp-redash?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-redash open source?
Yes — it is hosted on GitHub at https://github.com/yuki9541134/mcp-redash and has 4 stars.
Related MCP tools
Model Context Protocol Servers
The Open-Source Multimodal AI Agent Stack: Connecting Cutting-Edge AI Models and Agent Infra
A MCP for Claude Desktop / Claude Code / Windsurf / Cursor to build n8n workflows for you
MCP server to provide Figma layout information to AI coding agents like Cursor
The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
Instant is the best backend for AI-coded apps. You get auth, permissions, storage, presence, and streams — everything you need to ship apps your users will love.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP