redash-connector-mcp
Provides tools for interacting with the Redash API, including listing, searching, creating, updating, and archiving queries; executing queries with async polling and parameters; retrieving cached results; and browsing dashboards, data sources, and query tags.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@redash-connector-mcp run query 123 with country=US and show me the results"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
redash-connector-mcp
A Model Context Protocol (MCP) server that enables seamless integration between Redash and Claude AI (Desktop & Code). Query your data warehouse, manage queries, and execute analytics workflows directly through natural language conversations with Claude.
Table of Contents
Related MCP server: DB Explorer MCP
Features
🔍 Comprehensive Query Management
List & Search: Browse queries with pagination, filter by tags, search by keywords
CRUD Operations: Create, read, update, and archive queries
Smart Tagging: Organize queries with tags and retrieve tag statistics
⚡ Query Execution
Async Polling: Execute long-running queries with automatic job polling
Parameterized Queries: Pass dynamic parameters to queries
Cached Results: Retrieve cached results without re-execution (configurable TTL)
📊 Dashboard & Data Source Management
Dashboard Access: List and view Redash dashboards
Data Source Discovery: Explore available data sources
🔗 MCP Resources
Resource URIs: Access queries and dashboards as MCP resources (
redash://query/{id},redash://dashboard/{id})Rich Metadata: Get query definitions and execution results in one call
🛡️ Production-Ready
Type Safety: Full TypeScript implementation with strict type checking
Error Handling: Comprehensive error handling with detailed logging
Test Coverage: 86%+ test coverage with 107 unit tests
Logging: Configurable logging levels (DEBUG, INFO, WARNING, ERROR)
Installation
Quick Start (Claude MCP Add)
The easiest way to install is using the claude mcp add command:
claude mcp add redash \
--env REDASH_URL=https://your-redash-instance.com \
--env REDASH_API_KEY=your_api_key_here \
-- npx -y redash-connector-mcpReplace the following:
https://your-redash-instance.com- Your Redash instance URLyour_api_key_here- Your Redash API key (see Getting Your Redash API Key)
This command will:
Automatically install the latest version via npx (no global install needed)
Configure the MCP server with your credentials
Make it available in Claude Desktop/Code
After running this command, restart Claude Desktop/Code to activate the server.
Manual Installation
1. Install the Package
npm install -g redash-connector-mcp2. Configure MCP Settings
Add the following to your Claude MCP configuration file:
macOS/Linux: ~/.claude/config.json
Windows: %APPDATA%\Claude\config.json
{
"mcpServers": {
"redash": {
"command": "redash-connector-mcp",
"env": {
"REDASH_URL": "https://your-redash-instance.com",
"REDASH_API_KEY": "your_api_key_here"
}
}
}
}3. Restart Claude
Restart Claude Desktop or Claude Code to load the MCP server.
Configuration
Environment Variables
The MCP server requires the following environment variables:
Variable | Required | Default | Description |
| Yes | - | Your Redash instance URL (e.g., |
| Yes | - | Your Redash user API key |
| No |
| HTTP request timeout in milliseconds |
| No |
| Query job polling timeout in milliseconds |
| No |
| Job polling interval in milliseconds |
| No |
| Logging level: |
Environment variables can be provided in three ways:
1. .env File (Recommended for team projects)
Create a .env file in your project root (where .mcp.json is located):
REDASH_URL=https://your-redash-instance.com
REDASH_API_KEY=your_api_key_here
REDASH_TIMEOUT=30000
LOG_LEVEL=INFOThen reference them with ${VAR} syntax in .mcp.json:
{
"mcpServers": {
"redash": {
"command": "npx",
"args": ["redash-connector-mcp"],
"env": {
"REDASH_URL": "${REDASH_URL}",
"REDASH_API_KEY": "${REDASH_API_KEY}"
}
}
}
}This approach keeps secrets out of .mcp.json, allowing it to be safely committed to git while .env remains in .gitignore. The CLI entry point uses dotenv with override: true, so .env values always take precedence.
2. claude mcp add Command
Environment variables are passed directly via --env flags (no .env file needed).
3. Direct values in MCP config
Set values directly in the env field of your MCP configuration (not recommended for shared repositories).
Getting Your Redash API Key
Log in to your Redash instance
Click your profile icon (top-right corner)
Navigate to Settings → Account
Find or generate your API Key under the "API Key" section
Copy the key and use it as
REDASH_API_KEY
Security Note: Keep your API key confidential. Never commit it to version control.
Usage
Once configured, interact with Redash through natural language conversations with Claude:
Example Conversations
Query Management
You: "List all queries tagged with 'sales'"
Claude: [Uses list-queries tool with tag filter]
You: "Show me query ID 123"
Claude: [Uses get-query tool]
You: "Create a query named 'Daily Revenue' that selects from the sales table"
Claude: [Uses create-query tool]
You: "Update query 123 to include WHERE date > '2024-01-01'"
Claude: [Uses update-query tool]Query Execution
You: "Execute query 430"
Claude: [Uses execute-query tool, polls async job if needed]
You: "Run query 430 with start_date='2024-01-01' and end_date='2024-12-31'"
Claude: [Uses execute-query tool with parameters]
You: "Get the cached results for query 430"
Claude: [Uses get-query-results tool]Dashboards & Data Sources
You: "Show me all dashboards"
Claude: [Uses list-dashboards tool]
You: "What data sources are available?"
Claude: [Uses list-data-sources tool]
You: "Show me the details of dashboard 5"
Claude: [Uses get-dashboard tool]Analytics & Insights
You: "What are the most commonly used query tags?"
Claude: [Uses list-query-tags tool]
You: "Find all queries about customer churn"
Claude: [Uses list-queries with search parameter]Available Tools
The MCP server provides 11 tools for interacting with Redash:
Query Management (5 tools)
Tool | Description | Parameters |
| List queries with pagination, filtering, and search |
|
| Get detailed information about a query |
|
| Create a new query |
|
| Update an existing query |
|
| Archive (soft delete) a query |
|
Query Execution (2 tools)
Tool | Description | Parameters |
| Execute a query and return results (async polling supported) |
|
| Get cached results without re-execution |
|
Dashboard Management (2 tools)
Tool | Description | Parameters |
| List dashboards with pagination |
|
| Get dashboard details and widgets |
|
Data Source Management (1 tool)
Tool | Description | Parameters |
| List all available data sources | - |
Tag Management (1 tool)
Tool | Description | Parameters |
| List query tags with usage counts (sorted by frequency) | - |
MCP Resources
The server exposes Redash queries and dashboards as MCP resources, enabling Claude to discover and read them:
Resource URIs
Queries:
redash://query/{queryId}Dashboards:
redash://dashboard/{dashboardId}
Resource Discovery
Claude can automatically discover available queries and dashboards through the listResources() MCP endpoint.
Reading Resources
When reading a query resource, the response includes:
Query definition (name, SQL, description, tags, etc.)
Latest execution results (if available)
Metadata (creation date, author, etc.)
Example resource read:
{
"uri": "redash://query/123",
"mimeType": "application/json",
"contents": {
"query": { "id": 123, "name": "Sales Report", "query": "SELECT ..." },
"result": { "data": { "rows": [...], "columns": [...] } }
}
}Development
Prerequisites
Node.js 18+ (recommended: Node.js 20 LTS)
npm 9+
A Redash instance (for testing)
Setup
Clone the repository
git clone https://github.com/yourusername/redash-connector-mcp.git cd redash-connector-mcpInstall dependencies
npm installSet up environment variables
cp .env.example .env # Edit .env with your Redash credentialsBuild the project
npm run build
Testing
The project uses Vitest for testing with 86%+ coverage:
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run tests in watch mode
npm run test:watch
# Run tests with UI
npm run test:uiTest Structure:
tests/unit/- Unit tests for core modulestests/helpers/- Test helpers and mockstests/fixtures/- Test data fixtures
Coverage Report:
File | Lines | Funcs | Branch | Stmts
-----------------|--------|--------|--------|--------
All files | 86.33% | 93.33% | 73.42% | 83.94%
index.ts | 75% | 83.33% | 55.38% | 73.41%
logger.ts | 100% | 100% | 100% | 100%
redashClient.ts | 99.11% | 100% | 88.15% | 95.16%Code Quality
# Type checking
npm run typecheck
# Linting
npm run lint
# Auto-fix linting issues
npm run lint:fix
# Format code
npm run formatPre-commit Hooks: Husky + lint-staged automatically run linting and formatting on staged files.
Local Development with Claude
To test your local build with Claude Desktop/Code:
{
"mcpServers": {
"redash-dev": {
"command": "node",
"args": ["/absolute/path/to/redash-connector-mcp/dist/index.js"],
"env": {
"REDASH_URL": "https://your-redash-instance.com",
"REDASH_API_KEY": "your_api_key_here",
"LOG_LEVEL": "DEBUG"
}
}
}
}Troubleshooting
Common Issues
Error: "Missing required environment variables: REDASH_URL, REDASH_API_KEY"
Cause: Environment variables are not configured correctly.
Solution:
If using
.envfile: Ensure the.envfile exists in your project root (same directory as.mcp.json) and containsREDASH_URLandREDASH_API_KEYIf using MCP config: Ensure
REDASH_URLandREDASH_API_KEYare set in theenvsectionRestart Claude after making changes
Check the MCP server logs for detailed error messages
Error: "Query execution timed out"
Cause: Query is taking longer than the configured timeout.
Solutions:
Increase
REDASH_JOB_TIMEOUT(default: 60000ms)"env": { "REDASH_URL": "...", "REDASH_API_KEY": "...", "REDASH_JOB_TIMEOUT": "120000" }Optimize the query in Redash's web interface
Check if the query executes successfully in Redash directly
Error: "Failed to fetch queries from Redash"
Cause: Connection or authentication issue.
Solutions:
Verify
REDASH_URLis correct and accessible from your machineTest the URL in a browser:
https://your-redash-instance.com/api/queriesVerify
REDASH_API_KEYis valid (regenerate if necessary)Check network connectivity and firewall settings
Ensure your Redash instance is running
MCP Server Not Appearing in Claude
Solutions:
Restart Claude Desktop/Code completely (quit and reopen)
Check the MCP configuration file syntax (must be valid JSON)
Verify the
commandpath is correctCheck Claude's MCP logs for error messages
Debugging
Enable debug logging for detailed information:
{
"mcpServers": {
"redash": {
"command": "redash-connector-mcp",
"env": {
"REDASH_URL": "https://your-redash-instance.com",
"REDASH_API_KEY": "your_api_key_here",
"LOG_LEVEL": "DEBUG"
}
}
}
}Logs will appear in Claude's MCP server logs panel.
Security
Best Practices
API Key Security
Never commit API keys to version control
Use environment variables or secure secret management
Rotate API keys periodically
Use read-only API keys when possible
Network Security
Use HTTPS for Redash instance URLs
Consider IP whitelisting if your Redash instance supports it
Use VPN or private networks for sensitive data
Access Control
The MCP server inherits the permissions of the Redash API key
Use API keys with minimal necessary permissions
Avoid using admin API keys for routine operations
Reporting Security Issues
If you discover a security vulnerability, please email security@example.com instead of using the issue tracker.
Contributing
We welcome contributions! Here's how you can help:
Getting Started
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Make your changes
Write or update tests
Ensure all tests pass (
npm test)Ensure code quality checks pass (
npm run lint && npm run typecheck)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Development Guidelines
Code Style: Follow the existing code style (enforced by ESLint + Prettier)
Tests: Maintain or improve test coverage (currently 86%+)
Documentation: Update README.md for new features
Commits: Use clear, descriptive commit messages
Types: Add proper TypeScript types for all new code
Pull Request Process
Update the README.md with details of changes (if applicable)
Add tests for new functionality
Ensure the test suite passes
Update the version number following SemVer
The PR will be merged once approved by maintainers
Code of Conduct
This project follows the Contributor Covenant Code of Conduct.
Roadmap
Future enhancements under consideration:
Query result caching with configurable TTL
Batch query execution
Query scheduling management
Alert configuration
Visualization metadata extraction
Query performance metrics
Multi-instance support
Webhook support for query completion
See Issues for active feature requests.
Related Projects
Model Context Protocol - The MCP specification
Redash - Open source data visualization platform
Claude Desktop - Desktop app for Claude AI
Claude Code - VS Code extension for Claude AI
License
MIT License - see LICENSE file for details.
Acknowledgments
Built with the Model Context Protocol SDK
Powered by Redash API
TypeScript, Vitest, and the amazing open-source community
Made with ❤️ for the Redash and Claude AI communities
If you find this project useful, please consider giving it a ⭐ on GitHub!
Available Tools
11 toolsarchive-queryB
Archive (soft-delete) a query in Redash
Inputs: queryId (required).
create-queryC
Create a new query in Redash
Inputs: name (required), query (required), data_source_id (required), tags, +3 more.
execute-queryC
Execute a Redash query and return results
Inputs: queryId (required), parameters.
get-dashboardC
Get details of a specific dashboard
Inputs: dashboardId (required).
get-queryC
Get details of a specific query
Inputs: queryId (required).
get-query-resultsA
Get cached query results without executing the query
Inputs: queryId (required), maxAge.
list-dashboardsC
List all available dashboards in Redash
Inputs: page, pageSize.
list-data-sourcesA
List all available data sources in Redash
Inputs: no named parameters.
list-queriesC
List all available queries in Redash with optional filtering by tag or keyword search
Inputs: tag, page, search, pageSize.
list-query-tagsA
List all available query tags in Redash with their usage counts (sorted by usage frequency)
Inputs: no named parameters.
update-queryC
Update an existing query in Redash
Inputs: queryId (required), name, tags, query, +6 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct resource and action: query CRUD is cleanly separated, and execute-query vs get-query-results have clearly different semantics (fresh execution vs cached results). list-query-tags is distinct from list-queries' tag filtering because it returns tag metadata and usage counts. No two tools appear interchangeable.
All 11 tools follow a consistent kebab-case verb_noun pattern (list-queries, get-query, create-query, execute-query, archive-query). Resource nouns are singular for item operations and plural for collection listings, which is a coherent, predictable convention.
At 11 tools, the surface is well-scoped for a Redash connector: 6 query-lifecycle tools plus focused read tools for data sources, tags, and dashboards. No tool looks redundant or like filler.
Query lifecycle is fully covered (list/get/create/update/archive/execute/cached results), but dashboards only support list and get with no create/update/delete, and data sources and tags are read-only. Agents attempting dashboard or data-source management would hit dead ends.
Maintenance
Related MCP Connectors
Query, explore, and manage your databases through natural conversation.
Search, access, and get insights on your Amplitude data
List datasets, schemas, run APL queries, and use prompts for exploration, anomalies, and monitoring.
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
Related MCP Servers
- AlicenseBqualityBmaintenanceQuery and manage Metabase dashboards, cards, and data via Claude121,343 npm5MIT
- AlicenseNot gradedqualityFmaintenanceEnables connecting to any SQL database, exploring schemas, running queries, and visualizing results with interactive charts from Claude Desktop.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to translate natural-language business questions into safe, read-only SQL queries by exposing tools for listing tables, inspecting schemas, and executing row-capped SELECT statements against PostgreSQL.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude Code to inspect and query PostgreSQL, MySQL/MariaDB, IBM Db2, SQLite, and Redis through a small set of tools, with per-connection permission checks, SQL and Redis command guarding, result limits and masking, and audit logging.MIT