Model Context Protocol (MCP) server for integrating Redash with AI assistants like Claude.
- Connect to Redash instances via the Redash API
- List available queries and dashboards as resources
- Execute queries and retrieve results
- Execute saved parameterized queries with typed values and saved defaults
- Create and manage queries (create, update, archive)
- Manage query parameters, dashboard parameters, and widget parameter mappings
- Inspect and update dashboard widget layouts and grid positions
- List data sources for query creation
- Get dashboard details and visualizations
- Update chart visualization options with Redash chart-specific settings
- Node.js (v18 or later)
- npm or yarn
- Access to a Redash instance
- Redash API key
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 key
Optional variables:
REDASH_TIMEOUT: Timeout for API requests in milliseconds (default: 30000)REDASH_MAX_RESULTS: Maximum number of results to return (default: 1000)REDASH_EXTRA_HEADERS: Extra HTTP headers to include with every Redash request. Accepts either a JSON object string or a semicolon/comma-separated list ofkey=valuepairs.REDASH_SOCKS_PROXY: SOCKS proxy URL for routing requests through a proxy (e.g.,socks5h://localhost:1080). Usesocks5h://(withh) to delegate DNS resolution to the proxy, which is required for internal hostnames that don't resolve on the local machine.
Examples:
JSON (recommended):
REDASH_EXTRA_HEADERS='{"CF-Access-Client-Id":"<client_id>","CF-Access-Client-Secret":"<client_secret>"}'
Key/value list:
REDASH_EXTRA_HEADERS=CF-Access-Client-Id=<client_id>;CF-Access-Client-Secret=<client_secret>
Notes:
- The
Authorizationheader is managed by the server (Key <REDASH_API_KEY>) and cannot be overridden. - All extra headers are added to every request made to Redash.
-
Clone this repository:
git clone https://github.com/suthio/redash-mcp.git cd redash-mcp -
Install dependencies:
npm install
-
Create a
.envfile with your Redash configuration:REDASH_URL=https://your-redash-instance.com REDASH_API_KEY=your_api_key # Optional: Cloudflare Access (or other gateway) headers # REDASH_EXTRA_HEADERS='{"CF-Access-Client-Id":"<client_id>","CF-Access-Client-Secret":"<client_secret>"}' -
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%\Claude\claude_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 querycreate-query: Create a new query in Redashupdate-query: Update an existing query in Redashget-query-parameters: Inspect saved query parameter definitionsupdate-query-parameters: Update saved query parameter definitionsarchive-query: Archive (soft-delete) a querylist-data-sources: List all available data sources
execute-query: Execute a query and return results, with optionalmaxAgeexecute-parameterized-query: Execute a saved parameterized query with type-aware value coercion, saved defaults, and optionalmaxAgeexecute-adhoc-query: Execute an ad-hoc query without saving it to Redashget-query-results-csv: Get query results in CSV format (supports optional refresh for latest data)
list-dashboards: List all available dashboardsget-dashboard: Get dashboard details and visualizationsget-dashboard-layout: Inspect widget positions, sizes, and visibility on a dashboardget-visualization: Get details of a specific visualizationget-dashboard-parameters: Inspect dashboard parameter values and widget mappingsupdate-dashboard-parameters: Update dashboard parameter values and orderupdate-dashboard-layout: Move or resize multiple widgets in one callupdate-widget-layout: Move or resize a single widgetget-widget-parameter-mappings: Inspect a widget's parameter mappingsupdate-widget-parameter-mappings: Update a widget's parameter mappings
create-visualization: Create a new visualization for a queryupdate-visualization: Update an existing visualizationupdate-chart-visualization: Patch chart-specific options likeglobalSeriesType,columnMapping,seriesOptions,legend, and axis settingsdelete-visualization: Delete a visualization
Run in development mode:
npm run devnpm testnpm run e2e:testE2E tests use these default values (can be overridden with environment variables):
REDASH_URL: https://demo.redash.ioREDASH_API_KEY: test_api_key
Override example:
REDASH_URL=https://your-instance.com REDASH_API_KEY=your_key npm run e2e:testnpm run inspector- v1.1.0: Added query management functionality (create, update, archive)
- v1.0.0: Initial release
MIT