@arkty/redash-mcp
Execute SQL queries, explore database schemas, and retrieve query results as JSON or CSV from Redash.
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., "@@arkty/redash-mcplist all data sources"
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.
@arkty/redash-mcp
MCP Server for Redash — execute SQL queries, explore database schemas, and get results as JSON or CSV.
Ad-hoc queries without creating objects in Redash (no trace left)
SQL write guard — destructive operations (INSERT/UPDATE/DELETE/DROP) are blocked
CSV export — saves results to file, returns summary to LLM
Schema exploration — list tables, search columns, inspect structure
Default data source — configure once, query without specifying every time
Installation
npx -y @arkty/redash-mcpRelated MCP server: Database Assistant MCP Server
Configuration
Claude Code (.mcp.json)
{
"mcpServers": {
"redash": {
"command": "npx",
"args": ["-y", "@arkty/redash-mcp"],
"env": {
"REDASH_URL": "https://your-redash.example.com",
"REDASH_API_KEY": "your-api-key",
"REDASH_DEFAULT_DATA_SOURCE_ID": "1"
}
}
}
}Environment Variables
Variable | Required | Default | Description |
| Yes | — | Redash instance URL |
| Yes | — | User API key (from Redash profile settings) |
| No | — | Default data source ID |
| No | — | Default table name (shown in tool description) |
| No | 30000 | Request timeout in ms |
| No | 500 | Max rows in JSON response |
| No | 1000 | Job polling interval in ms |
| No | 120 | Max poll attempts before timeout |
| No |
| Directory for CSV file output |
| No | — | Extra HTTP headers (JSON or |
Tools
execute_adhoc_query
Execute SQL directly against a data source. No query object is created in Redash. Destructive SQL is blocked.
Parameters: query, data_source_id?, format? ("json" | "csv")
list_data_sources
List all available data sources with IDs, names, and types.
get_data_source_schema
Get full database schema (all tables and columns) for a data source.
Parameters: data_source_id
get_table_info
Get column names and types for a specific table.
Parameters: data_source_id, table_name
search_schema
Search tables and columns by name pattern (case-insensitive).
Parameters: data_source_id, search
Security
Destructive SQL (INSERT, UPDATE, DELETE, DROP, ALTER, TRUNCATE, CREATE, etc.) is blocked at the MCP server level. The filter is intentionally simple — it checks for keyword presence in the query text. This means it may produce false positives (e.g.,
SELECT REPLACE(...)is blocked becauseREPLACEis a keyword). This is a safety net, not a bulletproof solution.Use read-only database credentials in your Redash data source configuration — this is the real protection layer
API key is passed via environment variable, never hardcoded
License
MIT
Available Tools
5 toolsexecute_adhoc_queryARead-only
Execute a SQL query directly against a data source. No query object is created in Redash — leaves no trace. Destructive SQL (INSERT/UPDATE/DELETE/DROP etc.) is blocked. For running queries this is the DEFAULT tool. Use create_query only when user explicitly asks to save a query to Redash web UI.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | SQL query to execute (SELECT only) | |
| format | No | Result format: 'json' returns data in response, 'csv' saves to file and returns file path | json |
| output_path | No | Custom file path for CSV output. If omitted, saves to cwd as adhoc_{timestamp}.csv | |
| data_source_id | No | Data source ID (from list_data_sources). Optional if REDASH_DEFAULT_DATA_SOURCE_ID is set. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare readOnlyHint=true, but the description adds valuable behavioral detail: it blocks destructive SQL and leaves no trace, which goes beyond the annotation. It does not cover every possible side effect (e.g., performance or locking), but it provides meaningful context that helps an agent anticipate behavior. Since annotations carry the read-only flag, this additional context earns a 4.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences with zero redundancy. The core action is front-loaded, followed by the no-trace guarantee and the destructive-SQL block, then the usage recommendation and alternative. Every sentence earns its place and the structure is logical and skimmable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the tool's purpose, its side-effect-free nature, the destructive block, and the decision between this and create_query. It does not detail return formats, but the schema already documents format and output_path. It also references data_source_id via list_data_sources in the schema, and siblings include that tool. Minor gaps (e.g., pagination or error handling) are not critical for a straightforward query executor, so a 4 is warranted.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%—all four parameters have descriptive text in the schema. The description itself adds no parameter-specific guidance beyond what the schema already provides, such as the format behavior (csv saves to file) which is already in the schema. Baseline of 3 is appropriate when the schema fully documents parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a precise verb and resource: 'Execute a SQL query directly against a data source.' It immediately differentiates itself from the sibling create_query by noting 'no query object is created in Redash — leaves no trace.' This unambiguously identifies what the tool does and how it differs from related tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit usage direction is provided: 'For running queries this is the DEFAULT tool. Use create_query only when user explicitly asks to save a query to Redash web UI.' This states exactly when to use this tool and when to prefer the alternative, leaving no ambiguity for an agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_data_source_schemaARead-only
Get the full database schema (all tables and their columns) for a data source. Use list_data_sources first to find the data_source_id.
| Name | Required | Description | Default |
|---|---|---|---|
| data_source_id | Yes | Data source ID (from list_data_sources) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The readOnlyHint annotation already establishes that this is a safe read operation, and the description is consistent with it. The description adds the scope of the result but no extra behavioral traits such as output size, pagination, or permission requirements, so it only modestly exceeds the annotation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, with the tool's purpose front-loaded and the prerequisite as the second sentence. No filler or redundant jargon.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple (one required parameter) and annotated as read-only, and the description explains both what is returned and how to obtain the required ID. It would only be more complete by flagging when a narrower sibling like get_table_info is more appropriate, but nothing essential is missing for a correct call.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%: the input schema already documents that data_source_id is a number and says it comes 'from list_data_sources.' The description repeats that same guidance, adding no meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with a specific verb and resource: 'Get the full database schema (all tables and their columns) for a data source.' The parenthetical 'all tables and their columns' makes the scope concrete and separates it from siblings like get_table_info or search_schema, which target narrower information.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives a clear prerequisite: 'Use list_data_sources first to find the data_source_id.' This tells the agent the required sequencing. It does not explicitly state when to prefer get_table_info or search_schema, so it stops short of full when-not/alternative guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_table_infoARead-only
Get detailed column information (names and types) for a specific table. Use search_schema if you don't know the exact table name.
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | Exact table name | |
| data_source_id | Yes | Data source ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The readOnlyHint annotation already signals a safe read operation. The description adds value by disclosing the return content—column names and types—which is beyond the annotation. It does not mention auth, errors, or rate limits, but for a simple getter this is acceptable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no wasted words. The purpose is front-loaded and the usage guidance is appended efficiently. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers what the tool does, what it returns, and provides one key routing hint (search_schema). It does not mention how to obtain data_source_id or contrast with get_data_source_schema, but for a simple read-only tool with full schema coverage and annotations, the remaining gaps are minor.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% with both parameters documented (data_source_id and table_name). The description only repeats the 'specific table' idea already in the schema, adding no meaningful parameter-level semantics, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Get detailed column information (names and types) for a specific table.' It also distinguishes itself from the sibling search_schema by explicitly pointing to it for unknown table names, making the tool's scope clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives an explicit alternative and when-not: 'Use search_schema if you don't know the exact table name.' However, it does not explicitly state when to use this tool over get_data_source_schema or mention prerequisites like obtaining data_source_id, so the guidance is good but not exhaustive.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_data_sourcesARead-only
List all available Redash data sources (databases) with their IDs, names, and types
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The readOnlyHint annotation already signals that this is a safe read operation. The description adds useful context by specifying the return contents (IDs, names, types) and the 'all available' scope, but it does not disclose potential limitations such as pagination, ordering, or auth requirements. This is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with no filler. The action, scope, and output fields are all communicated upfront, making it easy for an agent to parse and act on.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter listing tool with annotations and no output schema, the description is complete: it states what is listed, the scope, and the return fields. The low complexity means no further behavioral or structural detail is necessary.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and the schema description coverage is 100%, so there are no parameter ambiguities. The baseline for zero-parameter tools is 4; the description does not need to add parameter-level meaning because no parameters exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('List') with a clear resource ('all available Redash data sources') and explicitly states the output fields (IDs, names, types). This clearly distinguishes the tool from siblings like get_data_source_schema or get_table_info, which focus on individual source/table details.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide any guidance on when to use this tool versus its siblings. It does not mention that this should be used to discover data source IDs before calling execute_adhoc_query, nor does it direct users to get_data_source_schema or search_schema for more detailed exploration.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_schemaARead-only
Search for tables and columns by name pattern (case-insensitive). Useful when you don't know the exact table or column name.
| Name | Required | Description | Default |
|---|---|---|---|
| search | Yes | Search pattern (matches table names and column names) | |
| data_source_id | Yes | Data source ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The readOnlyHint annotation already covers the safety profile, and the description adds the case-insensitive matching behavior. It does not disclose details such as result limits, whether matching is substring-based or pattern-based, or whether it returns only names or full schema details, so the added behavioral context is modest.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with no wasted words. The core behavior is front-loaded, and the usage note follows immediately, making the description scannable and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only search tool with fully described parameters and a clear use case, the description is nearly complete. The only real omission is the absence of any indication of the return shape, but that is partly mitigated by the tool's simple, search-oriented purpose.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters. The description's phrase 'by name pattern' reinforces the search parameter's meaning but does not add substantive new information beyond what the schema already states.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action ('Search for tables and columns by name pattern') and a clear resource, with the case-insensitive behavior making the matching semantics explicit. It also differentiates the tool from exact-schema siblings like get_data_source_schema and get_table_info by focusing on fuzzy name pattern lookup.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Useful when you don't know the exact table or column name' gives a clear, practical trigger condition for selecting this tool. However, it does not explicitly mention alternative tools like get_data_source_schema or get_table_info for cases where the exact structure is already known.
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.
5 tool updates
v0.1.1- First observed
execute_adhoc_query - First observed
get_data_source_schema - First observed
get_table_info - First observed
list_data_sources - First observed
search_schema
TDQS
Scored across 5 tools
The tools are mostly distinct: execute_adhoc_query handles query execution, list_data_sources handles data sources, and the remaining three handle schema discovery. There is some overlap among get_data_source_schema, get_table_info, and search_schema, but the descriptions clearly separate whole-schema, specific-table, and pattern-search use cases.
All tool names follow a consistent verb_noun snake_case pattern: execute_adhoc_query, list_data_sources, get_data_source_schema, get_table_info, and search_schema. The naming style is uniform and predictable.
With 5 tools, the server is well-scoped for its apparent purpose: running ad-hoc SQL queries and exploring database schemas. Each tool has a clear role and no redundant tools are present.
The server covers ad-hoc query execution and schema discovery well, but it references create_query for saving queries to Redash without actually providing that tool. This leaves a notable gap for users who want to persist or manage queries in the Redash web UI.
Maintenance
Related MCP Connectors
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Read-only MCP access to sessions, funnels, campaigns, errors, live visitors, and anomalies.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Related MCP Servers
- FlicenseBqualityBmaintenanceRead-only MCP server wrapping the Redash REST API, enabling query listing, execution, data source inspection, and dashboard retrieval with optional per-user API key support.7-
- FlicenseAqualityCmaintenanceEnables read-only exploration and querying of PostgreSQL or MySQL databases via MCP, with schema discovery, safe SQL validation, natural language to SQL conversion, and CSV export.111-
- FlicenseNot gradedqualityDmaintenanceEnables read-only SQL querying and schema inspection across MSSQL, PostgreSQL, and MySQL databases via MCP tools.-
- FlicenseNot gradedqualityCmaintenanceEnables running read-only SQL queries and exploring DuckDB databases through MCP tools like listing tables, describing schemas, and fetching paginated data.-