
Lightdash 的 MCP 服务器
概览
使用模型上下文协议(MCP)将Claude、Cursor及其他AI助手连接到您的Lightdash分析系统。 一个模型上下文协议(MCP)服务器,用于与Lightdash交互,使LLM能够发现数据、创建图表并以程序管理仪表盘。 该MCP服务器为完整的数据分析工作流程提供了一套全面的工具: * :探索数据目录,查找表格/探索,理解模式 * :执行支持完整筛选、指标和聚合的查询 * :创建、阅读、更新和删除复杂的可视化图表 * :构建和管理带有磁贴、筛选器和布局的仪表盘 * :创建和管理内容组织空间 * Python 3.10+ * Lightdash 实例(云端或自架)* Lightdash 个人访问令牌(可从您的 Lightdash 个人资料设置中获取) 如果你的Lightdash实例位于Google Cloud Identity-Aware代理(例如Cloud Run的--iap),请用IAP Extra安装: 设 IAP_ENABLED=true。
概述(AI 翻译)
通过模型上下文协议(MCP)将 Claude、光标及其他 AI 助手连接到您的 Lightdash 分析系统。
一个模型上下文协议(MCP)服务器,用于与Lightdash交互,使LLM能够发现数据、创建图表并以程序管理仪表盘。
特色
该MCP服务器为完整的数据分析工作流程提供了一套全面的工具:
- 发现:探索数据目录,查找表/探索,理解模式
- 查询:执行支持完整筛选、指标和聚合的查询
- 图表管理:创建、阅读、更新和删除带有复杂可视化的图表
- 仪表盘管理:构建和管理带有磁贴、筛选器和布局的仪表盘
- 资源组织:创建和管理内容组织空间
安装
先决条件
- Python 3.10+
- Lightdash实例(云端或自托管)
- Lightdash个人访问令牌(可从您的Lightdash个人资料设置中获取)
快速入门点数点数(推荐)
快速入门 UVX
快速入门 pipx
从源码安装
谷歌云内购支持
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Lightdash MCP Server
Connect Claude, Cursor, and other AI assistants to your Lightdash analytics using the Model Context Protocol (MCP).
A Model Context Protocol (MCP) server for interacting with Lightdash, enabling LLMs to discover data, create charts, and manage dashboards programmatically.
Features
This MCP server provides a comprehensive set of tools for the full data analytics workflow:
- Discovery: Explore data catalogs, find tables/explores, and understand schemas
- Querying: Execute queries with full filter, metric, and aggregation support
- Chart Management: Create, read, update, and delete charts with complex visualizations
- Dashboard Management: Build and manage dashboards with tiles, filters, and layouts
- Resource Organization: Create and manage spaces for content organization
Installation
Prerequisites
- Python 3.10+
- A Lightdash instance (Cloud or self-hosted)
- Lightdash Personal Access Token (obtain from your Lightdash profile settings)
Quick Start with pip (Recommended)
pip install lightdash-mcp
Quick Start with uvx
uvx lightdash-mcp
Quick Start with pipx
pipx run lightdash-mcp
Install from Source
git clone https://github.com/poddubnyoleg/lightdash_mcp.git
cd lightdash_mcp
pip install .
Google Cloud IAP Support
If your Lightdash instance is behind Google Cloud Identity-Aware Proxy (e.g. Cloud Run with --iap), install with the iap extra:
pip install lightdash-mcp[iap]
# or from source
pip install .[iap]
Set IAP_ENABLED=true. The server will sign a JWT (audience {LIGHTDASH_URL}/*) via the IAM Credentials API and attach it as Proxy-Authorization: Bearer on every request. The Authorization: ApiKey header is preserved for Lightdash.
Both service account credentials and user credentials (Application Default Credentials / ADC) are supported:
Service account credentials (default in Cloud Run, GCE, etc.):
- The runtime service account needs
roles/iam.serviceAccountTokenCreatoron itself - The runtime service account needs
roles/iap.httpsResourceAccessoron the Cloud Run service
User credentials (ADC) (e.g. gcloud auth application-default login):
- Set
IAP_SAto the service account email to impersonate for signing the JWT
安装
uvx lightdash-mcp配置
{
"mcpServers": {
"lightdash": {
"command": "uvx",
"args": ["lightdash-mcp"],
"env": {
"LIGHTDASH_TOKEN": "ldt_your_token_here",
"LIGHTDASH_URL": "https://app.lightdash.cloud",
"LIGHTDASH_PROJECT_UUID": "your-project-uuid"
}
}
}
}