Skip to main content
Glama
Redash MCP Server

Redash MCP Server

Redash MCP Server

Model Context Protocol (MCP) server for integrating Redash with AI assistants like Claude.

Features

  • Query Management: Create, update, archive, and execute Redash queries with automatic validation

  • Parameter Management: Add and configure query parameters including dropdown/enum types

  • Dashboard Management: Create, manage dashboards and widgets

  • Visualization Management: Create, update, and delete visualizations

  • Data Source Integration: List and work with multiple data sources

  • Resource Access: Browse queries and dashboards as MCP resources

  • Query Validation: Automatic query execution validation before creation/updates

  • Flexible Authentication: Support for API keys with configurable SSL options

Related MCP server: Redash MCP Server

Prerequisites

  • Node.js (v18 or later)

  • npm or yarn

  • Access to a Redash instance

  • Redash API key

Environment Variables

The server requires the following environment variables:

Optional variables:

  • REDASH_TIMEOUT: Timeout for API requests in milliseconds (default: 30000)

  • NODE_TLS_REJECT_UNAUTHORIZED: Set to '0' to ignore SSL certificate errors (not recommended for production)

  • REDASH_IGNORE_SSL_ERRORS: Set to 'true' to ignore SSL certificate verification errors

Installation

  1. Clone this repository:

    git clone https://github.com/jagadeesh52423/redash-mcp.git
    cd redash-mcp
  2. Install dependencies:

    npm install
  3. Create a .env file with your Redash configuration:

    REDASH_URL=https://your-redash-instance.com
    REDASH_API_KEY=your_api_key
  4. Build the project:

    npm run build
  5. Start the server:

    npm start

Usage with Claude for Desktop

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",
         "@jagadeesh52423/redash-mcp"
      ],
      "env": {
        "REDASH_API_KEY": "your-api-key",
        "REDASH_URL": "https://your-redash-instance.com"
      }
    }
  }
}

Available Tools

Query Management

  • list_queries: List all available queries with pagination and search

  • get_query: Get details of a specific query including parameters

  • create_query: Create a new query with automatic validation

  • update_query: Update an existing query with validation

  • archive_query: Archive (soft-delete) a query

  • list_data_sources: List all available data sources

Query Parameters

  • add_query_parameter: Add parameters to queries (text, number, date, date-range, enum)

  • update_query_parameter_type: Update parameter types and options

Query Execution

  • execute_query: Execute a saved query with parameters

  • execute_raw_query: Execute raw SQL queries directly

Dashboard Management

  • list_dashboards: List all available dashboards with pagination

  • get_dashboard: Get dashboard details including widgets

  • create_dashboard: Create new dashboards with filters

Widget Management

  • create_widget: Create dashboard widgets (text or visualization)

  • update_widget: Update existing widgets

  • delete_widget: Remove widgets from dashboards

Visualization Management

  • get_visualization: Get visualization details and configuration

  • create_visualization: Create new visualizations for queries

  • update_visualization: Update visualization settings

  • delete_visualization: Delete visualizations

Key Features

Automatic Query Validation

The server automatically validates queries before creating or updating them by executing them first. This prevents saving queries with syntax errors or permission issues.

// Query validation is enabled by default
await createQuery({
  name: "Test Query",
  data_source_id: 1,
  query: "SELECT * FROM users", // This will be tested before saving
});

// Skip validation if needed
await createQuery({
  name: "Test Query",
  data_source_id: 1,
  query: "SELECT * FROM users",
  skipValidation: true // Bypasses validation
});

Enum Parameters with Dropdown Options

Create dropdown parameters for queries using the enum type:

// Add an enum parameter with dropdown options
await addQueryParameter({
  queryId: 123,
  parameterName: "status",
  parameterType: "enum",
  enumOptions: "active\ninactive\npending", // Newline-separated options
  defaultValue: "active"
});

// This creates a dropdown with options: active, inactive, pending

Parameter Types Supported

  • text: Text input field

  • number: Numeric input field

  • date: Date picker

  • date-range: Date range picker with start and end dates

  • enum: Dropdown selection with predefined options

Dashboard and Widget Management

Create comprehensive dashboards with widgets:

// Create a dashboard
const dashboard = await createDashboard({
  name: "Analytics Dashboard",
  dashboard_filters_enabled: true
});

// Add a visualization widget
await createWidget({
  dashboard_id: dashboard.id,
  visualization_id: 456,
  options: {
    position: { sizeX: 3, sizeY: 2, col: 0, row: 0 }
  }
});

// Add a text widget
await createWidget({
  dashboard_id: dashboard.id,
  text: "## Welcome to Analytics",
  options: {
    position: { sizeX: 6, sizeY: 1, col: 0, row: 2 }
  }
});

CLI Usage

The server also supports CLI arguments for configuration:

# Using CLI arguments
node dist/index.js --url https://redash.example.com --api-key your_key

# With SSL options
node dist/index.js --url https://redash.example.com --api-key your_key --ignore-ssl

Development

Run in development mode:

npm run dev

Troubleshooting

SSL Certificate Issues

If you encounter SSL certificate errors when connecting to your Redash instance:

# Option 1: Use environment variable (affects all Node.js processes)
export NODE_TLS_REJECT_UNAUTHORIZED=0

# Option 2: Use Redash-specific environment variable
export REDASH_IGNORE_SSL_ERRORS=true

# Option 3: Use CLI flag
node dist/index.js --ignore-ssl

Common Issues

Query Validation Failures: If queries fail validation but you know they're correct, you can skip validation:

await createQuery({
  name: "Complex Query",
  query: "SELECT * FROM complex_view",
  skipValidation: true
});

Parameter Not Found Errors: When updating parameter types, ensure the parameter exists first or create it with add_query_parameter.

Dashboard Widget Positioning: Widget positions use a grid system. Ensure col and row values don't overlap with existing widgets.

Version History

  • v1.3.0: Added enum parameters with dropdown options and automatic query validation

    • Enum parameter support with enumOptions for dropdown selections

    • Automatic query validation before create/update operations

    • Enhanced parameter management with type-specific options

    • Improved error handling and validation feedback

  • v1.2.0: Comprehensive dashboard and widget management

    • Dashboard creation and management

    • Widget creation, updating, and deletion

    • Visualization management (create, update, delete)

    • Enhanced dashboard filtering capabilities

  • v1.1.0: Enhanced query management and SSL improvements

    • Query parameter management (add, update parameter types)

    • SSL certificate verification options

    • CLI argument support for configuration

    • Improved error handling and logging

  • v1.0.0: Initial release with basic query and resource management

License

MIT

Available Tools

15 tools
archive_queryA

Archive (soft-delete) a query in Redash

Inputs: queryId (required).

create_dashboardC

Create a new dashboard in Redash

Inputs: name (required), tags, is_draft, dashboard_filters_enabled.

create_queryB

Create a new query in Redash

Inputs: name (required), query (required), data_source_id (required), tags, +3 more.

create_widgetA

Create a new widget in a dashboard (text or visualization widget)

Inputs: dashboard_id (required), text, width, options, +1 more.

delete_widgetB

Delete a widget from a dashboard

Inputs: widgetId (required).

execute_queryC

Execute a Redash query and return results

Inputs: queryId (required), parameters.

execute_raw_queryB

Execute a raw SQL query directly and return results

Inputs: query (required), dataSourceId (required), maxAge, parameters.

get_dashboardA

Get details of a specific dashboard

Inputs: dashboardId (required).

get_queryB

Get details of a specific query

Inputs: queryId (required).

get_visualizationB

Get details of a specific visualization

Inputs: visualizationId (required).

list_dashboardsB

List all available dashboards in Redash

Inputs: page, pageSize.

list_data_sourcesA

List all available data sources in Redash

Inputs: no named parameters.

list_queriesB

List all available queries in Redash

Inputs: q, page, pageSize.

update_queryC

Update an existing query in Redash

Inputs: queryId (required), name, tags, query, +6 more.

update_widgetB

Update an existing widget in a dashboard

Inputs: widgetId (required), text, width, options.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 15 tools

    Disambiguation5/5

    Each tool maps to a distinct resource-action pair (query, data source, dashboard, visualization, widget), with no meaningful overlap. execute_query and execute_raw_query are clearly differentiated by saved vs. raw SQL.

    Naming Consistency5/5

    All tools follow a consistent verb_noun snake_case pattern (list_queries, get_query, update_query, create_widget, etc.), using standard verbs and plural/singular nouns appropriately. No mixed conventions or vague names.

    Tool Count5/5

    With 15 tools, the server provides broad coverage of Redash's core objects without being bloated. Each tool serves a clear purpose, and the count aligns well with the typical scope for a domain-specific MCP server.

    Completeness4/5

    Queries have full CRUD and execution, dashboards have list/get/create but lack update/delete, and visualizations have only get (no create/update). Widgets are covered, but the missing dashboard lifecycle and visualization management create notable gaps for a management tool.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with Metabase databases and dashboards, allowing users to list and execute queries, access data visualizations, and interact with database resources through natural language.
      490 npm
      151
      -
    • A
      license
      B
      quality
      D
      maintenance
      Enables interaction with Redash instances through a standardized interface, allowing users to execute SQL queries, manage data sources, and retrieve query results using natural language.
      4
      1,756 npm
      1
      MIT
    • F
      license
      B
      quality
      D
      maintenance
      Enables interaction with Redash through its API to execute SQL queries, retrieve results, and manage data sources. It allows users to query data and explore data sources directly through natural language interfaces.
      3
      4
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to interact with Metabase for database operations, SQL queries, dashboard management, and analytics automation.
      28
      MIT