Redash MCP Server
Enables AI assistants to manage Redash queries, dashboards, visualizations, and data sources via natural language.
README
Redash MCP Server
Model Context Protocol (MCP) server for integrating Redash with AI assistants like Claude.
<a href="https://glama.ai/mcp/servers/j9bl90s3tw"> <img width="380" height="200" src="https://glama.ai/mcp/servers/j9bl90s3tw/badge" alt="Redash Server MCP server" /> </a>
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
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:
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)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
-
Clone this repository:
git clone https://github.com/jagadeesh52423/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 -
Build the project:
npm run build -
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 searchget_query: Get details of a specific query including parameterscreate_query: Create a new query with automatic validationupdate_query: Update an existing query with validationarchive_query: Archive (soft-delete) a querylist_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 parametersexecute_raw_query: Execute raw SQL queries directly
Dashboard Management
list_dashboards: List all available dashboards with paginationget_dashboard: Get dashboard details including widgetscreate_dashboard: Create new dashboards with filters
Widget Management
create_widget: Create dashboard widgets (text or visualization)update_widget: Update existing widgetsdelete_widget: Remove widgets from dashboards
Visualization Management
get_visualization: Get visualization details and configurationcreate_visualization: Create new visualizations for queriesupdate_visualization: Update visualization settingsdelete_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 fieldnumber: Numeric input fielddate: Date pickerdate-range: Date range picker with start and end datesenum: 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
enumOptionsfor dropdown selections - Automatic query validation before create/update operations
- Enhanced parameter management with type-specific options
- Improved error handling and validation feedback
- Enum parameter support with
-
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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.