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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。