redash-mcp
redash-mcp is a local MCP server that lets LLM clients work with a Redash instance: query data, manage saved queries, build charts/dashboards, and create alerts.
List data sources, tables, and table columns to explore schemas.
Run ad-hoc SQL through a SQL safety guard with destructive-query blocking, PII/cost warnings, auto-LIMIT, row limits, and in-memory caching.
List, inspect, create, update, fork, archive, and execute saved Redash queries.
Create line, column, area, pie, scatter, and counter visualizations on saved queries.
List, inspect, and create dashboards, and add chart widgets with auto-layout.
List, inspect, and create threshold alerts on saved-query results.
Use BIRD smart-query tools to analyze natural-language questions, select tables, and guide SQL generation.
Manage few-shot examples, keyword maps, feedback, and evaluation test suites locally to improve SQL accuracy.
View BIRD configuration/status and optionally use Claude Haiku fallback when
ANTHROPIC_API_KEYis set.
Allows querying Redash data sources, managing saved queries and dashboards, and running SQL via natural language.
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 show me the top 10 users by signup date"
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
MCP server that connects Redash to Claude, Cursor, Gemini CLI, Codex, and any MCP client — query data, build charts and dashboards, and run SQL with natural language.
Install · Tools · Env · Examples · Troubleshooting · Privacy
What's new in 3.5
create_visualization— create line / column / area / pie / scatter charts or counters on a saved query. If the query has been run, column names are checked against its latest result, so a typo returns an error instead of an empty chart.Dashboard auto-layout —
add_widgetplaces new widgets below existing ones; half-width widgets pair up side by side (previously they all overlapped at the top-left).
Full history: Releases
Related MCP server: redash-mcp
Why redash-mcp?
Built for letting an LLM touch production data safely:
🛡️ SQL Safety Guard — blocks
DROP/TRUNCATE/ALTERandDELETE/UPDATEwithoutWHERE;strict/warn/offmodes, PII detection, and auto-LIMIT.🧠 BIRD Smart Query — analyzes the question, auto-selects tables, and guides SQL generation (BIRD text-to-SQL). Optional Claude Haiku fallback.
📊 End-to-end — query, save, chart, dashboards, and alerts — 25 tools.
⚡ One-command setup —
npx redash-mcp setupconfigures Claude Desktop / Claude Code / Cursor / Gemini CLI / Codex CLI.🔒 Fully local — talks directly to your Redash. API key and results never leave your machine.
Installation
Requirements: Node.js 20+ and a Redash API key (Redash → Profile → Edit Profile → API Key).
npx redash-mcp setupThe wizard configures any combination of Claude Desktop, Claude Code, Cursor, Gemini CLI, and Codex CLI.
Alternatively, install Node.js, Claude Desktop, and the MCP config in one go:
curl -fsSL https://raw.githubusercontent.com/seob717/redash-mcp/main/install.sh | bashClaude Desktop —
~/Library/Application Support/Claude/claude_desktop_config.jsonCursor —
~/.cursor/mcp.json(create it if missing)
{
"mcpServers": {
"redash-mcp": {
"command": "npx",
"args": ["-y", "redash-mcp"],
"env": {
"REDASH_URL": "https://your-redash-instance.com",
"REDASH_API_KEY": "your_api_key_here"
}
}
}
}Fully quit and restart Claude Desktop after saving.
Claude Code
claude mcp add --scope user redash-mcp \
-e REDASH_URL=https://your-redash-instance.com \
-e REDASH_API_KEY=your_api_key_here \
-- npx -y redash-mcpGemini CLI
gemini mcp add -s user \
-e REDASH_URL=https://your-redash-instance.com \
-e REDASH_API_KEY=your_api_key_here \
redash-mcp npx -y redash-mcpCodex CLI
codex mcp add redash-mcp \
--env REDASH_URL=https://your-redash-instance.com \
--env REDASH_API_KEY=your_api_key_here \
-- npx -y redash-mcpTools
Category | Tools |
Data sources & schema |
|
Query |
|
Saved queries |
|
Charts |
|
Dashboards |
|
Alerts |
|
Smart Query (BIRD) |
|
SQL Safety Guard
Applies to ad-hoc SQL run through run_query. Saved queries executed with get_query_result are not checked, so give the Redash data source a read-only DB account.
Always blocked (unless
REDASH_SAFETY_MODE=off):DROP,TRUNCATE,ALTER TABLE,GRANT/REVOKE,DELETE/UPDATEwithoutWHEREWarned (
warn) / blocked (strict):SELECT *, queries withoutWHEREorLIMIT, PII column accessAuto-LIMIT: appends
LIMIT NwhenREDASH_AUTO_LIMITis set
Details: docs/sql-safety-guard.md. Query results are also cached in memory (see REDASH_MCP_CACHE_* below).
Environment Variables
Variable | Default | Description |
| required | Redash instance URL (e.g. |
| required | Redash user API key |
|
| SQL safety level: |
|
| Disable PII detection |
|
| Disable cost warnings |
|
| Auto-append |
|
| Redash cache TTL in seconds |
|
| MCP query cache TTL in seconds (0 = off) |
|
| Max memory for the MCP query cache, in MB |
|
| Where BIRD few-shot, feedback, eval, and keyword-map data live |
|
|
|
|
| Per-request HTTP timeout against the Redash API |
| — | Enables the Claude Haiku fallback for table selection in |
Usage Examples
Just ask in natural language:
"How many new users signed up this month?" →
smart_querypicks the tables →run_query"What percentage of last week's new users made a purchase?" →
smart_queryguides the JOIN →run_query"Create an alert when daily signups drop below 100" →
create_alert
Build a dashboard: "Save a monthly revenue query, chart it as a line, and put it on a new Revenue dashboard."
create_query— save "Monthly Revenue"get_query_result— run it once so the chart columns can be checkedcreate_visualization—type: "line",x_column: "month",y_columns: ["revenue"]create_dashboard— create "Revenue"add_widget— place the chart; more widgets stack below or pair side by side
Troubleshooting
Symptom | Fix |
| Run |
"Authentication failed" | Check |
"Unable to connect to the Redash server" | Check |
"The query timed out" | Simplify the query or pass a larger |
Query blocked by the safety guard | Add |
Tools don't show up | Fully restart the client after editing its config |
Development
npm install
npm run dev # run from source (tsx)
npm test # vitest
npm run build # typecheck + bundle to dist/Privacy Policy
redash-mcp is a local MCP server that talks directly to your Redash instance. No intermediate servers are involved.
Item | Description |
Redash API Key | Stored only as a local environment variable ( |
Query content & results | Delivered only to the local MCP client via the MCP protocol. |
BIRD SQL settings | Stored only in local files ( |
LLM Fallback | Only when |
We do not sell or share user data with third parties.
Retention: config files stay in ~/.redash-mcp/ until you delete them; the query cache is in-memory and cleared on shutdown; the schema cache is in-memory with a 10-minute TTL.
Contact: inquiries and security reports via GitHub Issues.
Disclaimer
redash-mcp is an unofficial, community-built integration and is not affiliated with, endorsed by, or sponsored by Redash. "Redash" is a trademark of its respective owners and is used here only to describe compatibility. This project communicates with Redash solely through its public REST API.
License
MIT
Available Tools
25 toolsadd_widgetADestructive
Add a saved query's visualization onto a dashboard as a widget. Behavior: places the widget below the existing ones (half-width widgets pair up side by side) and returns its id and dashboard_id. Usage: get the dashboard_id from list_dashboards or create_dashboard, and the visualization_id from get_query (each saved query exposes its visualizations) or from create_visualization for a new chart. This is how you build up a dashboard after creating it.
Inputs: dashboard_id (required), visualization_id (required), text, width.
archive_queryADestructive
Archive a saved query, removing it from active query lists. This is Redash's form of deletion and cannot be undone through the API, so confirm with the user before calling it. Behavior: archives the query and returns a confirmation message. Usage: find the query_id with list_queries.
Inputs: query_id (required).
create_alertADestructive
Create an alert that watches a saved query and fires when a chosen result column crosses a threshold (e.g., daily_signups less than 10). Behavior: creates the alert and returns its id and name. Usage: get the query_id from list_queries and confirm the exact column name with get_query / get_query_result first. The alert evaluates the query's latest result on Redash's schedule.
Inputs: op (required), name (required), value (required), column (required), +2 more.
create_dashboardADestructive
Create a new, empty dashboard. Behavior: creates the dashboard and returns its id, name, and slug. Usage: after creating it, populate it with charts using add_widget, passing visualization ids obtained from get_query or create_visualization. To list or inspect existing dashboards instead, use list_dashboards / get_dashboard.
Inputs: name (required).
create_queryADestructive
Save a new named SQL query to Redash so it can be reused, scheduled, visualized, or added to a dashboard. Behavior: creates the query and returns its new id, name, and created_at. Usage: get the data_source_id from list_data_sources and verify the SQL runs with run_query first; to change an existing query use update_query instead. Note: this only saves the query — use get_query_result to execute it.
Inputs: name (required), query (required), data_source_id (required), tags, +1 more.
create_visualizationADestructive
Create a chart (line, column, area, pie, scatter) or counter on a saved query, so it can be shown in Redash and placed on a dashboard. Behavior: creates the visualization and returns its id. Usage: save the SQL with create_query first; column names must exactly match the query's result columns (run get_query_result to see them). Then call add_widget with the returned id to put the chart on a dashboard.
Inputs: name (required), type (required), query_id (required), y_columns (required), +4 more.
evaluate_queriesA
Build and run an accuracy test suite for SQL generation on a data source. Behavior: action 'add_test' stores a question paired with ground-truth SQL; 'list_tests' shows them; 'remove_test' deletes one; 'run' scores generated SQL against the test cases; 'results' shows the latest run. Usage: use this to measure whether keyword maps and few-shot examples actually improve smart_query accuracy over time; test cases and runs are stored locally per data_source_id.
Inputs: action (required), data_source_id (required), test_case, test_case_id, +2 more.
fork_queryADestructive
Fork (duplicate) an existing saved query into a new, independently editable copy, leaving the original unchanged. Behavior: creates the copy and returns its new id and name. Usage: find the query_id to fork with list_queries; use this when you want to experiment with or adapt a query without modifying the original.
Inputs: query_id (required).
get_alertARead-only
Get the full detail of a single alert. Behavior: returns the alert's id, name, current state, last_triggered_at, threshold options (column, operator, value), and the query it monitors (id, name, description, data_source_id). Usage: find the alert_id with list_alerts.
Inputs: alert_id (required).
get_bird_configARead-only
View BIRD SQL configuration and status.
Inputs: no named parameters.
get_dashboardARead-only
Get a dashboard's full layout. Behavior: returns the dashboard's id, name, slug, and every widget, each with its linked visualization (id, name, type) and the query behind it (id, name). Usage: find the dashboard id or slug with list_dashboards; use the returned visualization/query ids to understand or extend the dashboard with add_widget.
Inputs: dashboard_id_or_slug (required).
get_queryARead-only
Get the full definition of a saved query. Behavior: returns the query's SQL text, data_source_id, tags, owner, update time, its parameters (name, type, default value, dropdown options), and its visualizations (each with id, name, type). Usage: find the query_id with list_queries. The returned visualization ids can be placed on a dashboard with add_widget; to actually run the query use get_query_result.
Inputs: query_id (required).
get_query_resultARead-only
Run an existing saved query by its ID and return the latest results. Behavior: executes the query as stored in Redash and returns up to max_rows rows as a markdown table or JSON, with the column list and a truncation note. Usage: find the query_id with list_queries or get_query. If the query has parameters ({{ name }} placeholders), call get_query first to see their names, types, and allowed values, then pass every one in parameters — Redash does not fill in defaults for API calls. Unlike run_query, this executes already-saved SQL rather than ad-hoc SQL, so the safety guard does not apply.
Inputs: query_id (required), format, max_rows, parameters, +1 more.
get_table_columnsARead-only
Get the column names and data types for one or more tables in a data source. Accepts a single table or a comma-separated list of tables. Use this to confirm exact column names and types before writing SQL with run_query or smart_query. Returns each table's columns; if a table name is not found, it suggests verifying it with list_tables.
Inputs: table_name (required), data_source_id (required).
list_alertsARead-only
List all alerts configured in Redash. Behavior: returns an array where each alert has id, name, current state (ok / triggered / unknown), last_triggered_at, its linked query (id, name), and threshold options. Usage: use this to discover alert_ids, then call get_alert for one alert's full detail, or create_alert to add a new one.
Inputs: no named parameters.
list_dashboardsARead-only
List dashboards in Redash, most recently updated first. Behavior: returns a paginated array where each item has id, name, slug, and created/updated timestamps. Usage: use this to discover a dashboard's id or slug, then call get_dashboard to inspect its widgets and visualizations, or create_dashboard to make a new one. Supports keyword search and pagination.
Inputs: page, search, page_size.
list_data_sourcesARead-only
List connected data sources (id, name, type). Call this first to get data_source_id.
Inputs: no named parameters.
list_queriesARead-only
List saved (named) queries in Redash, most recently updated first. Behavior: returns a paginated array where each item has id, name, description, data_source_id, and updated_at. Usage: use this to discover query_ids, then call get_query for a query's full SQL and visualizations, or get_query_result to run it. Supports keyword search and pagination; for ad-hoc SQL that isn't saved, use run_query instead.
Inputs: page, search, page_size.
list_tablesARead-only
List tables in a data source. Use keyword to filter by name. Verify table names here before writing SQL.
Inputs: data_source_id (required), keyword.
manage_few_shot_examplesA
Manage the few-shot examples that smart_query uses to generate more accurate SQL. Behavior: action 'list' returns all stored examples with their ids; 'add' saves a new example (requires the example object); 'remove' deletes one (requires example_id). Each example pairs a natural-language question with the correct SQL and the tables it uses, teaching the model your schema's domain conventions. Usage: examples are stored locally per data_source_id and are retrieved automatically by smart_query — register a few for recurring question patterns to raise accuracy.
Inputs: action (required), data_source_id (required), example, example_id.
manage_keyword_mapA
Manage keyword-to-table-name mappings. After inspecting the schema with list_tables, register domain-specific mappings to improve smart_query table-matching accuracy. e.g., {"revenue": ["payment"], "creator": ["creator"]}
Inputs: action (required), data_source_id (required), keywords, mappings.
run_queryARead-only
Execute an ad-hoc SQL query against a data source and return the resulting rows. Every query passes through the SQL safety guard, which blocks destructive statements (DROP/TRUNCATE/ALTER, DELETE/UPDATE without WHERE) and flags PII columns and expensive full scans; results are cached in memory. Behavior: returns up to max_rows rows as a markdown table or JSON, with the column list and a truncation note when there are more rows. Usage: confirm table and column names with list_tables and get_table_columns first; for natural-language questions, plan the SQL with smart_query before calling this. To run an already-saved query instead, use get_query_result.
Inputs: query (required), data_source_id (required), format, max_age, +2 more.
smart_queryARead-only
BIRD SQL-based intelligent query tool. Analyzes natural-language questions to (1) extract relevant schema, (2) match similar few-shot examples, (3) assess complexity, (4) request clarification for ambiguous questions. Call this tool before run_query. For a new data source, first inspect the schema with list_tables, then register keyword-to-table mappings via manage_keyword_map to significantly improve accuracy. Note: when ANTHROPIC_API_KEY is set, table names, column names, and the question text (never query results or row data) may be sent to the Anthropic API as a fallback for table selection.
Inputs: question (required), data_source_id (required), context.
submit_query_feedbackA
Record whether the SQL produced for a question was correct, so smart_query improves over time. Behavior: stores an up/down rating; when you rate 'down' and supply the correct SQL, the error is classified and, if the same kind of mistake recurs, automatically promoted into a few-shot example. Returns the feedback id and any error type or promotion. Usage: call after reviewing smart_query/run_query output; feedback is stored locally per data_source_id and feeds the learning loop.
Inputs: rating (required), question (required), generated_sql (required), data_source_id (required), +1 more.
update_queryADestructive
Update fields of an existing saved query. Behavior: only the fields you pass are changed (name, SQL, description, or tags); any omitted field is left untouched. Returns the query's id, name, and updated_at. Usage: find the query_id with list_queries or get_query; to create a brand-new query instead, use create_query.
Inputs: query_id (required), name, tags, query, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 25 tools
Core Redash operations are well separated by resource and action, and run_query vs get_query_result vs smart_query are explicitly differentiated in descriptions. The main ambiguity is the smart-query meta-tool cluster (few-shot examples, feedback, query evaluation, keyword maps, BIRD config), whose boundaries are related and could cause misselection.
Almost all tools use consistent snake_case with a verb_noun pattern (list_queries, create_dashboard, get_alert, manage_keyword_map). Minor deviations are smart_query, which is not verb-led, and get_bird_config, but the overall convention remains predictable.
At 25 tools this is at the heavy end for an MCP server and forces agents to choose among many related operations. The core Redash tools are reasonable, but the smart-query learning/evaluation/config tools inflate the surface and make the set feel borderline over-scoped.
The server covers important workflows: query discovery, execution, creation/update/fork/archive, dashboards/widgets, alerts, schema inspection, and ad-hoc SQL. However, notable lifecycle gaps remain, including no dashboard update/delete, no alert update/delete, no widget/visualization removal, and data sources are only listable.
Maintenance
Related MCP Connectors
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
The Ramp MCP server enables users to securely connect Ramp with AI assistants like ChatGPT and Claude to query financial data and take actions using natural language. It transforms Ramp's developer API into a SQL interface that LLMs can query, allowing admins to analyze spend trends, identify cost savings, and run complex SQL analyses on comprehensive datasets (transactions, purchase orders, vendors, users), while all users can manage cards, view transactions, request reimbursements, and get expense policy answers.
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted BigQuery MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseBqualityBmaintenanceModel Context Protocol (MCP) server that integrates Redash with AI assistants like Claude, allowing them to query data, manage visualizations, and interact with dashboards through natural language.674,448 npm108MIT
- AlicenseAqualityDmaintenanceModel Context Protocol (MCP) server for Redash - manage queries, dashboards, and visualizations through AI assistants like Claude.699 PyPIMIT
- FlicenseAqualityDmaintenanceA unified MCP server that lets Claude query any SQLite database and build live Streamlit dashboards — all from a single conversation.101-
- AlicenseAqualityDmaintenanceA database-agnostic MCP server that enables natural language queries to your database through Claude or Copilot, automatically writing and executing SQL.85 npmMIT