Provides tools for executing SQL queries, managing data sources, listing queries, and retrieving query results from a Redash instance through API key-based authentication.
Redash MCP Server
A Model Context Protocol (MCP) server for Redash that provides query execution, data source management, and more through a standardized interface.
โจ Features
๐ Query Execution: Execute SQL queries and retrieve results
๐ Data Source Management: List and inspect data sources
๐ Secure: API key-based authentication
๐ณ Docker Support: Easy deployment with Docker
โ Fully Tested: Comprehensive test coverage with TDD approach
๐ Modern Stack: Built with TypeScript, Vite, and latest tooling
๐ Requirements
Node.js: >= 22.0.0
pnpm: >= 9.0.0
Redash Instance: With API access
Docker (optional): For containerized deployment
๐ Quick Start
Using npx (Recommended)
Clone the repository:
Install dependencies:
Build the project:
Link globally:
Configure your MCP client (Claude Desktop, Cursor, etc.):
Using Docker Hub (Recommended)
Pull the latest image from Docker Hub:
Run with Docker:
Or use Docker Compose:
Configure your MCP client:
Building from Source
If you prefer to build from source:
๐ง Configuration
Environment Variables
Variable | Required | Default | Description |
| โ | - | Your Redash API key |
| โ | - | Redash instance URL |
| โ | 30000 | API request timeout (milliseconds) |
Getting Your Redash API Key
Log in to your Redash instance
Click on your profile icon โ "Edit Profile"
Copy your API key from the "API Key" section
๐ Available Tools
1. list_data_sources
List all available data sources in Redash.
Parameters: None
Example:
2. get_data_source
Get details about a specific data source.
Parameters:
data_source_id(number): The ID of the data source
Example:
3. execute_query_and_wait
Execute a SQL query and wait for the result.
Parameters:
query(string): The SQL query to executedata_source_id(number): The ID of the data sourcemax_age(number, optional): Maximum age of cached results in seconds
Example:
4. list_queries
List all queries in Redash.
Parameters:
page(number, optional): Page number (default: 1)page_size(number, optional): Results per page (default: 25)
Example:
๐งช Development
Setup
Testing with act
Test GitHub Actions locally using act:
Project Structure
๐ฆ Scripts
pnpm dev: Watch mode for developmentpnpm build: Build for productionpnpm test: Run testspnpm test:coverage: Run tests with coverage reportpnpm lint: Lint codepnpm format: Format codepnpm ci: Run all quality checks
๐ Tech Stack
Runtime: Node.js 22+ with ES Modules
Language: TypeScript 5.7+ (strict mode)
Build Tool: Vite 6.x
Package Manager: pnpm 9.x
Testing: Vitest 3.x with coverage
Linting: ESLint 9.x (Flat Config)
Formatting: Prettier 3.x
MCP SDK: @modelcontextprotocol/sdk 1.x
๐ฆ Docker Images
Pre-built Docker images are available on Docker Hub:
Latest stable:
jasonsmithj/redash-mcp:latestSpecific version:
jasonsmithj/redash-mcp:v1.0.0Major version:
jasonsmithj/redash-mcp:1
Supported Platforms
Multi-architecture images are automatically built for both platforms:
linux/amd64(x86_64) - Intel/AMD CPUsWindows PCs
Intel-based Macs
Traditional Linux servers
linux/arm64(ARM64) - ARM CPUsApple Silicon Macs (M1/M2/M3/M4)
ARM-based Linux servers
Raspberry Pi 4+ (64-bit)
Docker will automatically pull the correct image for your platform!
๐ Releasing
To release a new version:
Update version in
package.jsonCommit changes:
git commit -am "chore: bump version to vX.Y.Z"Create and push tag:
git tag vX.Y.Z && git push origin vX.Y.ZGitHub Actions will automatically build and push to Docker Hub
๐ค Contributing
Contributions are welcome! Please follow these steps:
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-featureMake your changes and add tests
Run quality checks:
pnpm ciCommit your changes:
git commit -m 'Add amazing feature'Push to the branch:
git push origin feature/amazing-featureOpen a Pull Request
Development Guidelines
Follow TDD (Test-Driven Development) approach
Write tests before implementation
Maintain test coverage above 85%
Use conventional commits
Add JSDoc comments for public APIs
All code comments should be in English
Setting up GitHub Secrets for CD
To enable automated Docker Hub publishing, add the following secrets to your GitHub repository:
Go to Settings โ Secrets and variables โ Actions
Add the following secrets:
DOCKER_USERNAME: Your Docker Hub usernameDOCKER_PASSWORD: Your Docker Hub password or access token
For enhanced security, use a Docker Hub access token instead of your password:
Log in to Docker Hub
Go to Account Settings โ Security โ New Access Token
Generate a token with "Read, Write, Delete" permissions
Use this token as
DOCKER_PASSWORD
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ฎ Support
Issues: GitHub Issues
Discussions: GitHub Discussions
Made with โค๏ธ by the Redash MCP community
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
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.
- โจ Features
- ๐ Requirements
- ๐ Quick Start
- ๐ง Configuration
- ๐ Available Tools
- ๐งช Development
- ๐ฆ Scripts
- ๐ Tech Stack
- ๐ฆ Docker Images
- ๐ Releasing
- ๐ค Contributing
- ๐ License
- ๐ฎ Support