rakeshgangwar/redash-mcp-server
If you are the rightful owner of redash-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Redash MCP Server is a Model Context Protocol server designed to integrate with Redash, enabling efficient data querying, dashboard management, and data source handling.
Redash MCP Server
A Model Context Protocol (MCP) server that provides integration with Redash for querying data, managing dashboards, and working with data sources.
Features
Query Management
- List, create, update queries
- Execute queries with parameters
- Retrieve query results
- Real-time query execution with polling
Dashboard Management
- List and retrieve dashboards
- Create and update dashboards
- Get dashboard widgets and summaries
- Dashboard layout management
Data Source Management
- List and manage data sources
- Create, update, delete data sources
- Test data source connections
- Data source health monitoring
User Management
- List users and get user information
- Current user details
- User statistics and summaries
- Health checks
Installation
- Clone or create the project:
git clone <repo-url>
cd redash-mcp-server
- Install dependencies:
npm install
- Set up environment variables:
cp .env.example .env
Edit .env
with your Redash configuration:
REDASH_URL=http://your-redash-instance.com
REDASH_API_KEY=your_api_key_here
- Build the project:
npm run build
Getting Your Redash API Key
- Log into your Redash instance
- Go to your user profile (top right menu)
- Click on "Settings"
- Find the "API Key" section
- Copy your API key
Usage
Running the Server
npm start
For development:
npm run dev
Available Tools
Query Tools
list_queries
- List all queries with pagination and searchget_query
- Get a specific query by IDcreate_query
- Create a new queryupdate_query
- Update an existing queryexecute_query
- Execute a query and get resultsget_query_result
- Get query results by query ID or job ID
Dashboard Tools
list_dashboards
- List all dashboardsget_dashboard
- Get dashboard by ID or slugcreate_dashboard
- Create a new dashboardupdate_dashboard
- Update dashboard propertiesget_dashboard_widgets
- Get all widgets from a dashboardget_dashboard_summary
- Get dashboard summary with metrics
Data Source Tools
list_data_sources
- List all data sourcesget_data_source
- Get specific data sourcecreate_data_source
- Create a new data sourceupdate_data_source
- Update data source configurationdelete_data_source
- Delete a data sourcetest_data_source
- Test data source connectionget_data_sources_summary
- Get summary of all data sources
User Tools
list_users
- List all usersget_current_user
- Get current authenticated user infoget_users_summary
- Get user statisticshealth_check
- Check Redash instance health
Integration with Claude Code
Add this server to your Claude Code configuration:
{
"mcpServers": {
"redash": {
"command": "node",
"args": ["/path/to/redash-mcp-server/dist/index.js"],
"env": {
"REDASH_URL": "http://your-redash-instance.com",
"REDASH_API_KEY": "your_api_key_here"
}
}
}
}
Example Usage
After connecting to Claude Code, you can use commands like:
- "Show me all my Redash queries"
- "Execute query ID 123 with parameter user_id=456"
- "Create a new dashboard called 'Sales Analytics'"
- "List all data sources and their connection status"
- "Get the summary of dashboard 'user-engagement'"
Error Handling
The server includes comprehensive error handling:
- API connection errors
- Authentication failures
- Invalid parameters
- Network timeouts
- Query execution failures
All errors are returned with descriptive messages to help troubleshoot issues.
Development
Project Structure
src/
āāā index.ts # Main server entry point
āāā lib/
ā āāā redash-client.ts # Redash API client
āāā tools/
ā āāā query-tools.ts # Query management tools
ā āāā dashboard-tools.ts # Dashboard tools
ā āāā datasource-tools.ts # Data source tools
ā āāā user-tools.ts # User management tools
āāā types/
āāā redash.ts # TypeScript type definitions
Adding New Tools
- Create tool function in appropriate file under
src/tools/
- Register it in the main
src/index.ts
file - Add proper TypeScript types in
src/types/redash.ts
- Test with your Redash instance
License
MIT