Skip to main content
Glama
yuki9541134

Redash MCP Server

by yuki9541134

Redash MCPサーバー

Redash APIのMCPサーバーで、クエリの実行、結果の取得などの機能を提供します。

ツール

  1. execute_query_and_wait

    • SQLクエリを実行し、結果が利用可能になるまで待機します

    • 入力パラメータ:

      • query (文字列): 実行するSQLクエリ

      • data_source_id (数値, 任意): クエリを実行するデータソースのID

      • max_age (数値, 任意): キャッシュ有効期限(秒)

    • 戻り値: 利用可能になったクエリ結果

  2. list_data_sources

    • 利用可能なすべてのデータソースを一覧表示します

    • 入力パラメータ: なし

    • 戻り値: データソースの配列

  3. get_data_source

    • 特定のデータソースに関する詳細を取得します

    • 入力パラメータ:

      • data_source_id (数値): データソースのID

    • 戻り値: データソースの詳細情報

  4. get_query

    • クエリIDにより保存済みクエリの詳細を取得します(SQLテキスト含む)

    • 入力パラメータ:

      • query_id (数値): クエリID

    • 戻り値: 保存済みクエリの詳細情報

  5. search_queries

    • キーワードで保存済みクエリを検索します

    • 入力パラメータ:

      • q (文字列): 検索キーワード

      • page (数値, 任意): ページ番号

      • page_size (数値, 任意): ページサイズ

    • 戻り値: 検索にマッチした保存済みクエリの一覧

  6. get_query_result

    • クエリ結果IDにより既存のクエリ結果を取得します(再実行なし)

    • 入力パラメータ:

      • query_result_id (数値): クエリ結果ID

    • 戻り値: クエリ結果

  7. get_saved_query_result

    • クエリIDにより保存済みクエリの最新キャッシュ結果を取得します

    • 入力パラメータ:

      • query_id (数値): クエリID

    • 戻り値: 保存済みクエリの最新キャッシュ結果

Related MCP server: Redash MCP Server

セットアップ

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_waitdata_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クライアントやリモート接続に適しています。

.envPORT 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

.envPORT でポートを変更できます(デフォルト: 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 tools
execute_query_and_waitC

Execute a SQL query and wait for the results

ParametersJSON Schema
NameRequiredDescriptionDefault
data_source_idNo
queryYes
max_ageNo

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'wait for the results', implying synchronous behavior, but fails to address critical aspects like error handling, timeout behavior (despite a 'max_age' parameter), authentication requirements, or rate limits. For a tool that executes queries, this leaves significant gaps in understanding its operational characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise—a single sentence that directly states the tool's function without any fluff. It's front-loaded with the core action and efficiently communicates the basic purpose. Every word earns its place, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of executing SQL queries (which involves data sources, query syntax, and result handling), the description is incomplete. With no annotations, no output schema, and 0% schema description coverage, it fails to provide necessary context about inputs, outputs, or behavioral expectations. The agent would struggle to use this tool effectively without additional information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning none of the three parameters (data_source_id, query, max_age) are documented in the schema. The description adds no semantic information about these parameters—it doesn't explain what 'data_source_id' refers to, what format 'query' should be in, or what 'max_age' represents. This forces the agent to guess parameter meanings, which is inadequate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('execute a SQL query and wait for the results'), which is specific and unambiguous. It distinguishes itself from sibling tools like 'get_data_source' and 'list_data_sources' by focusing on query execution rather than data source retrieval. However, it doesn't explicitly mention what resource it acts upon beyond 'SQL query', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites like needing a valid data source ID, nor does it differentiate from potential other query execution tools. Without any context on when or why to choose this tool, the agent lacks decision-making support.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_data_sourceC

Get details about a specific data source

ParametersJSON Schema
NameRequiredDescriptionDefault
data_source_idYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves details, implying a read-only operation, but doesn't cover aspects like authentication needs, rate limits, error handling, or what 'details' include. For a tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a read operation with one parameter), no annotations, no output schema, and 0% schema description coverage, the description is incomplete. It doesn't explain return values, error cases, or parameter semantics, leaving significant gaps for the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, and the description adds no information about the parameter 'data_source_id'. It doesn't explain what a data source ID is, its format, or where to find it. With one undocumented parameter, the description fails to compensate for the schema's lack of details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('details about a specific data source'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'list_data_sources', which might retrieve multiple data sources rather than a specific one. This prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list_data_sources' or 'execute_query_and_wait', nor does it specify prerequisites or contexts for usage. This leaves the agent without explicit direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_data_sourcesB

List all available data sources

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action but doesn't describe traits like whether this is a read-only operation, if it requires authentication, rate limits, pagination, or the format of returned data. For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place by conveying essential information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects like safety, performance, or return format, which are crucial for an agent to use the tool effectively. For a tool with no structured data support, the description should compensate more.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate here, but it could have mentioned if there are implicit filters or options, though not required. Baseline is 4 for zero parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and the resource 'all available data sources', which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_data_source', which might retrieve a single data source, leaving some room for improvement in sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_data_source' or 'execute_query_and_wait'. It lacks context about use cases, prerequisites, or exclusions, leaving the agent to infer usage based on the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • First observedexecute_query_and_wait
    • First observedget_data_source
    • First observedlist_data_sources

TDQS

B3.1/5.0

Scored across 3 tools

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count2/5

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.

Completeness2/5

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.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables 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.
    29 npm
    1
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    Enables interaction with Redash instances through a standardized interface, allowing users to execute SQL queries, manage data sources, and retrieve query results using natural language.
    4
    175 npm
    1
    MIT
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables 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
    -
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to interact with Metabase for database operations, SQL queries, dashboard management, and analytics automation.
    28
    MIT