@ryan4u/redash-mcp-server
v1.0.0
Published
MCP server for Redash analytics integration - runnable via npx
Maintainers
Readme
Redash MCP Server
MCP (Model Context Protocol) server for Redash API integration. Can be run directly via npx without installation.
Features
- 60+ Tools: Data sources, queries, dashboards, alerts, visualizations, widgets, and more
- Dual Mode: STDIO mode for single-user (Cursor, Claude Desktop) and HTTP mode for multi-user
- No Installation Required: Run directly with
npx - TypeScript: Built with TypeScript for type safety
Quick Start
1. Get Your Redash API Key
Go to your Redash instance: Settings → Account → API Key
2. Configure Your AI Agent
Cursor IDE / Claude Desktop
{
"mcpServers": {
"Redash analytics": {
"command": "npx",
"args": ["-y", "@ryan4u/redash-mcp-server", "--stdio"],
"env": {
"REDASH_API_KEY": "your-api-key-here",
"REDASH_API_URL": "http://your-redash-instance:5000/api"
}
}
}
}Claude Code
claude mcp add redash-analytics \
-e REDASH_API_KEY=your-api-key-here \
-e REDASH_API_URL=http://your-redash-instance:5000/api \
-- npx -y @yourname/redash-mcp-server --stdio3. Run in HTTP Mode (Multi-user)
export REDASH_API_URL="http://your-redash-instance:5000/api"
export MCP_AUTH_TOKENS="token1,token2"
npx -y @yourname/redash-mcp-server --httpEnvironment Variables
| Variable | Mode | Required | Default | Description |
|----------|------|----------|---------|-------------|
| REDASH_API_KEY | STDIO | Yes | — | Redash API key |
| REDASH_API_URL | Both | No | http://localhost:5000/api | Redash instance API URL |
| REDASH_TIMEOUT | Both | No | 30 | Request timeout in seconds (1–300) |
| REDASH_MAX_RETRIES | Both | No | 2 | Max retries on network errors (0–5) |
| MCP_MODE | Both | No | stdio | Server mode: stdio or http |
| MCP_AUTH_TOKENS | HTTP | Yes | — | Comma-separated MCP access tokens |
| MCP_HOST | HTTP | No | 127.0.0.1 | HTTP bind address |
| MCP_PORT | HTTP | No | 3000 | HTTP port number |
| MCP_RATE_LIMIT | HTTP | No | 60 | Max requests/min per IP |
| MCP_SESSION_TIMEOUT | HTTP | No | 1800 | Session TTL in seconds |
| MCP_MAX_BODY_SIZE | HTTP | No | 1048576 | Max request body in bytes |
| LOG_LEVEL | Both | No | info | Log level |
Available Tools
Data Sources (6)
list_data_sources— List all available data sourcesget_data_source— Get data source detailsget_data_source_schema— Get table/column schematest_data_source— Test data source connectionpause_data_source— Pause a data sourceresume_data_source— Resume a paused data source
Queries (12)
list_queries— List saved queries with paginationget_query— Get query details including SQLsearch_queries— Search queries by name/descriptioncreate_query— Create a new queryupdate_query— Update query name, description, or SQLarchive_query— Archive a queryrefresh_query— Force refresh query resultsfork_query— Fork a querylist_my_queries— List my querieslist_recent_queries— List recent querieslist_archived_queries— List archived querieslist_query_tags— List all query tags
Query Execution (4)
execute_query— Execute a saved queryexecute_adhoc_query— Execute an ad-hoc SQL queryget_query_result— Get cached query resultget_job_status— Get background job status
Dashboards (10)
list_dashboards— List dashboards with paginationget_dashboard— Get dashboard with widgetscreate_dashboard— Create a new dashboardupdate_dashboard— Update dashboard name or tagsarchive_dashboard— Archive a dashboardfork_dashboard— Fork a dashboardshare_dashboard— Enable public dashboard accessunshare_dashboard— Disable public dashboard accesslist_my_dashboards— List my dashboardslist_dashboard_tags— List all dashboard tags
Widgets (2)
add_widget— Add a widget to a dashboardremove_widget— Remove a widget from a dashboard
Visualizations (3)
create_visualization— Create a visualization for a queryupdate_visualization— Update a visualizationdelete_visualization— Delete a visualization
Alerts (9)
list_alerts— List all alertsget_alert— Get alert detailscreate_alert— Create an alertupdate_alert— Update an alertdelete_alert— Delete an alertmute_alert— Mute an alertunmute_alert— Unmute an alertlist_alert_subscriptions— List alert subscriptionscreate_alert_subscription— Subscribe a destination to an alertdelete_alert_subscription— Remove an alert subscription
Users (2)
list_users— List usersget_user— Get user details
Favorites (6)
favorite_query/unfavorite_query— Add/remove query from favoritesfavorite_dashboard/unfavorite_dashboard— Add/remove dashboard from favoriteslist_favorite_queries— List favorite querieslist_favorite_dashboards— List favorite dashboards
Query Snippets (5)
list_query_snippets— List query snippetsget_query_snippet— Get snippet detailscreate_query_snippet— Create a query snippetupdate_query_snippet— Update a query snippetdelete_query_snippet— Delete a query snippet
Destinations (1)
list_destinations— List notification destinations
Resources
redash://data_sources— List of all data sourcesredash://queries— List of recent queriesredash://dashboards— List of dashboardsredash://datasource/{id}/schema— Data source schemaredash://query/{id}— Query detailsredash://dashboard/{slug}— Dashboard details
Prompts
explore_data— Explore data from a data sourcebuild_dashboard— Build a new dashboardsetup_alert— Set up an alert for a queryoptimize_query— Optimize a SQL querymonitor_system— Monitor Redash system health
Development
Setup
git clone https://github.com/yourusername/redash-mcp-server.git
cd redash-mcp-server
npm installBuild
npm run buildDevelopment Mode
npm run devLocal Testing
REDASH_API_KEY=your-key REDASH_API_URL=http://localhost:5000/api npm startPublishing to npm
- Update
package.jsonwith your package name (e.g.,@yourusername/redash-mcp-server) - Build the project:
npm run build - Login to npm:
npm login - Publish:
npm publish --access public
License
MIT License — see LICENSE file for details.
