redash mcp
Model 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.
Model 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.
Model Context Protocol (MCP) server for integrating Redash with AI assistants like Claude.
The server requires the following environment variables:
REDASH_URL
: Your Redash instance URL (e.g., https://redash.example.com)REDASH_API_KEY
: Your Redash API keyOptional variables:
- REDASH_TIMEOUT
: Timeout for API requests in milliseconds (default: 30000)
- REDASH_MAX_RESULTS
: Maximum number of results to return (default: 1000)
Clone this repository:
git clone https://github.com/suthio/redash-mcp.git
cd redash-mcp
Install dependencies:
npm install
Create a .env
file with your Redash configuration:
REDASH_URL=https://your-redash-instance.com
REDASH_API_KEY=your_api_key
Build the project:
npm run build
Start the server:
npm start
To use this MCP server with Claude for Desktop, configure it in your Claude for Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%Claudeclaude_desktop_config.json
Add the following configuration (edit paths as needed):
{
"mcpServers": {
"redash": {
"command": "npx",
"args": [
"-y",
"@suthio/redash-mcp"
],
"env": {
"REDASH_API_KEY": "your-api-key",
"REDASH_URL": "https://your-redash-instance.com"
}
}
}
}
list-queries
: List all available queries in Redashget-query
: Get details of a specific query create-query
: Create a new query in Redashupdate-query
: Update an existing query in Redasharchive-query
: Archive (soft-delete) a querylist-data-sources
: List all available data sourcesexecute-query
: Execute a query and return resultslist-dashboards
: List all available dashboardsget-dashboard
: Get dashboard details and visualizations get-visualization
: Get details of a specific visualizationRun in development mode:
npm run dev
MIT
[
{
"description": "List all available queries in Redash",
"inputSchema": {
"properties": {
"page": {
"description": "Page number (starts at 1)",
"type": "number"
},
"pageSize": {
"description": "Number of results per page",
"type": "number"
}
},
"type": "object"
},
"name": "list-queries"
},
{
"description": "Get details of a specific query",
"inputSchema": {
"properties": {
"queryId": {
"description": "ID of the query to get",
"type": "number"
}
},
"required": [
"queryId"
],
"type": "object"
},
"name": "get-query"
},
{
"description": "Create a new query in Redash",
"inputSchema": {
"properties": {
"data_source_id": {
"description": "ID of the data source to use",
"type": "number"
},
"description": {
"description": "Description of the query",
"type": "string"
},
"name": {
"description": "Name of the query",
"type": "string"
},
"options": {
"description": "Query options",
"type": "object"
},
"query": {
"description": "SQL query text",
"type": "string"
},
"schedule": {
"description": "Query schedule",
"type": "object"
},
"tags": {
"description": "Tags for the query",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"name",
"data_source_id",
"query"
],
"type": "object"
},
"name": "create-query"
},
{
"description": "Update an existing query in Redash",
"inputSchema": {
"properties": {
"data_source_id": {
"description": "ID of the data source to use",
"type": "number"
},
"description": {
"description": "Description of the query",
"type": "string"
},
"is_archived": {
"description": "Whether the query is archived",
"type": "boolean"
},
"is_draft": {
"description": "Whether the query is a draft",
"type": "boolean"
},
"name": {
"description": "New name of the query",
"type": "string"
},
"options": {
"description": "Query options",
"type": "object"
},
"query": {
"description": "SQL query text",
"type": "string"
},
"queryId": {
"description": "ID of the query to update",
"type": "number"
},
"schedule": {
"description": "Query schedule",
"type": "object"
},
"tags": {
"description": "Tags for the query",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"queryId"
],
"type": "object"
},
"name": "update-query"
},
{
"description": "Archive (soft-delete) a query in Redash",
"inputSchema": {
"properties": {
"queryId": {
"description": "ID of the query to archive",
"type": "number"
}
},
"required": [
"queryId"
],
"type": "object"
},
"name": "archive-query"
},
{
"description": "List all available data sources in Redash",
"inputSchema": {
"properties": {},
"type": "object"
},
"name": "list-data-sources"
},
{
"description": "Execute a Redash query and return results",
"inputSchema": {
"properties": {
"parameters": {
"additionalProperties": true,
"description": "Parameters to pass to the query (if any)",
"type": "object"
},
"queryId": {
"description": "ID of the query to execute",
"type": "number"
}
},
"required": [
"queryId"
],
"type": "object"
},
"name": "execute-query"
},
{
"description": "List all available dashboards in Redash",
"inputSchema": {
"properties": {
"page": {
"description": "Page number (starts at 1)",
"type": "number"
},
"pageSize": {
"description": "Number of results per page",
"type": "number"
}
},
"type": "object"
},
"name": "list-dashboards"
},
{
"description": "Get details of a specific dashboard",
"inputSchema": {
"properties": {
"dashboardId": {
"description": "ID of the dashboard to get",
"type": "number"
}
},
"required": [
"dashboardId"
],
"type": "object"
},
"name": "get-dashboard"
},
{
"description": "Get details of a specific visualization",
"inputSchema": {
"properties": {
"visualizationId": {
"description": "ID of the visualization to get",
"type": "number"
}
},
"required": [
"visualizationId"
],
"type": "object"
},
"name": "get-visualization"
}
]