使用说明
redash mcp
MCP服务器 红折 --从Claude Code或任何MCP客户端执行查询、创建可视化和构建仪表板。
工具
| 工具 | 说明 |
|---|---|
list_data_sources |
列出所有可用数据源 |
list_queries |
搜索并列出已保存的查询 |
get_query |
获取带有可视化的查询 |
get_query_result |
获取已保存查询的最新结果 |
create_query |
创建新查询 |
update_query |
更新现有查询 |
archive_query |
存档(删除)查询 |
execute_query |
执行SQL并返回结果(使用作业轮询) |
create_visualization |
为查询创建可视化 |
update_visualization |
更新可视化 |
delete_visualization |
删除可视化 |
create_dashboard |
创建新仪表板 |
get_dashboard |
获取一个带有小部件的仪表板 |
update_dashboard |
更新仪表板(名称、标签、选项、过滤器) |
publish_dashboard |
发布仪表板草稿 |
archive_dashboard |
存档(删除)仪表板 |
add_widget |
将小部件添加到仪表板 |
update_widget |
更新小部件(文本或选项) |
delete_widget |
从仪表板中删除小部件 |
设置
先决条件
- Node.js>=20
- pnpm
- 带有API密钥的Redash实例
使用npx
REDASH_URL=https://redash.example.com REDASH_API_KEY=your-api-key npx @frauniki/redash-mcp
克劳德代码
claude mcp add redash -e REDASH_URL=https://redash.example.com -e REDASH_API_KEY=your-api-key -- npx @frauniki/redash-mcp
或添加到 ~/.claude.json 手动:
{
"mcpServers": {
"redash": {
"command": "npx",
"args": ["@frauniki/redash-mcp"],
"env": {
"REDASH_URL": "https://redash.example.com",
"REDASH_API_KEY": "your-api-key"
}
}
}
}
环境变量
| 变量 | 描述 |
|---|---|
REDASH_URL |
Redash实例的基本URL(例如。, https://redash.example.com) |
REDASH_API_KEY |
您的Redash API密钥 |
从源码安装
pnpm install
pnpm build
发展
pnpm test # Run tests
pnpm test:watch # Run tests in watch mode
pnpm lint # Lint
pnpm lint:fix # Lint and fix
pnpm format # Format with Prettier
pnpm format:check # Check formatting
pnpm build # Build
许可证
ISC