redash-mcp-server

rakeshgangwar/redash-mcp-server

3.2

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.

Tools
19
Resources
0
Prompts
0

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

  1. Clone or create the project:
git clone <repo-url>
cd redash-mcp-server
  1. Install dependencies:
npm install
  1. 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
  1. Build the project:
npm run build

Getting Your Redash API Key

  1. Log into your Redash instance
  2. Go to your user profile (top right menu)
  3. Click on "Settings"
  4. Find the "API Key" section
  5. 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 search
  • get_query - Get a specific query by ID
  • create_query - Create a new query
  • update_query - Update an existing query
  • execute_query - Execute a query and get results
  • get_query_result - Get query results by query ID or job ID
Dashboard Tools
  • list_dashboards - List all dashboards
  • get_dashboard - Get dashboard by ID or slug
  • create_dashboard - Create a new dashboard
  • update_dashboard - Update dashboard properties
  • get_dashboard_widgets - Get all widgets from a dashboard
  • get_dashboard_summary - Get dashboard summary with metrics
Data Source Tools
  • list_data_sources - List all data sources
  • get_data_source - Get specific data source
  • create_data_source - Create a new data source
  • update_data_source - Update data source configuration
  • delete_data_source - Delete a data source
  • test_data_source - Test data source connection
  • get_data_sources_summary - Get summary of all data sources
User Tools
  • list_users - List all users
  • get_current_user - Get current authenticated user info
  • get_users_summary - Get user statistics
  • health_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

  1. Create tool function in appropriate file under src/tools/
  2. Register it in the main src/index.ts file
  3. Add proper TypeScript types in src/types/redash.ts
  4. Test with your Redash instance

License

MIT