SL

syucream/lightdash-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

27 stars 13 forks 质量 60 趋势 11MIT

一个访问Lightdash的MCP(模型上下文协议)服务器

概览

一个MCP(模型上下文协议)服务器,用于访问Lightdash。 该服务器提供兼容MCP的Lightdash API,使AI助手通过标准化界面与您的Lightdash数据交互。 - list_projects - 列出Lightdash组织中的所有项目 - get_project - 获取特定项目的详细信息 - list_spaces - 列出项目中的所有空间 - list_charts - 列出项目中的所有图表 - list_dashboards - 列出项目中的所有仪表盘 - get_custom_metrics - 获取项目的自定义指标 - get_catalog - 获取项目目录 - get_metrics_catalog - 获取项目的指标目录 - get_charts_as_code - 获取项目的图表代码 - get_dashboards_as_code - 获取项目的仪表盘代码 通过Smithery自动安装Lightdash MCP Server for Claude Desktop: - LIGHTDASH_API_KEY:您的Lightdash PAT- LIGHTDASH_API_URL:API 基础URL lightdash-mcp-server 支持两种传输模式:(默认)和 。

概述(AI 翻译)

一个MCP(模型上下文协议)服务器,用于访问Lightdash。

该服务器提供兼容MCP的Lightdash API,使AI助手通过标准化界面与您的Lightdash数据交互。

特色

可用工具:

  • list_projects - 列出Lightdash组织中的所有项目
  • get_project - 获取特定项目的详细信息
  • list_spaces - 列出项目中的所有空间
  • list_charts - 列出项目中的所有图表
  • list_dashboards - 列出项目中的所有仪表盘
  • get_custom_metrics - 为项目获取自定义指标
  • get_catalog - 获取项目目录
  • get_metrics_catalog - 获取项目的指标目录
  • get_charts_as_code - 为项目获取图表代码
  • get_dashboards_as_code - 获取仪表盘作为项目代码

快速启动

安装

通过Smithery安装

通过Smithery自动安装Lightdash MCP Server for Claude Desktop:

手动安装

配置

  • LIGHTDASH_API_KEY:你的Lightdash PAT(轻冲刺附加分)
  • LIGHTDASH_API_URL:API 基础 URL

用途

lightdash-mcp-server 支持两种传输模式:Stdio(默认)和 HTTP。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

lightdash-mcp-server

A MCP(Model Context Protocol) server that accesses to Lightdash.

This server provides MCP-compatible access to Lightdash’s API, allowing AI assistants to interact with your Lightdash data through a standardized interface.

Features

Available tools:

  • list_projects - List all projects in the Lightdash organization
  • get_project - Get details of a specific project
  • list_spaces - List all spaces in a project
  • list_charts - List all charts in a project
  • list_dashboards - List all dashboards in a project
  • get_custom_metrics - Get custom metrics for a project
  • get_catalog - Get catalog for a project
  • get_metrics_catalog - Get metrics catalog for a project
  • get_charts_as_code - Get charts as code for a project
  • get_dashboards_as_code - Get dashboards as code for a project

Quick Start

Installation

Installing via Smithery

To install Lightdash MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install lightdash-mcp-server --client claude

Manual Installation

npm install lightdash-mcp-server

Configuration

  • LIGHTDASH_API_KEY: Your Lightdash PAT
  • LIGHTDASH_API_URL: The API base URL

Usage

The lightdash-mcp-server supports two transport modes: Stdio (default) and HTTP.

Stdio Transport (Default)

  1. Start the MCP server:
npx lightdash-mcp-server
  1. Edit your MCP configuration json:
...
    "lightdash": {
      "command": "npx",
      "args": [
        "-y",
        "lightdash-mcp-server"
      ],
      "env": {
        "LIGHTDASH_API_KEY": "",
        "LIGHTDASH_API_URL": "https://"
      }
    },
...

HTTP Transport (Streamable HTTP)

  1. Start the MCP server in HTTP mode:
npx lightdash-mcp-server -port 8080

This starts the server using StreamableHTTPServerTransport, making it accessible via HTTP at http://localhost:8080/mcp.

  1. Configure your MCP client to connect via HTTP:

For Claude Desktop and other MCP clients:

Edit your MCP configuration json to use the url field instead of command and args:

...
    "lightdash": {
      "url": "http://localhost:8080/mcp"
    },
...

For programmatic access:

Use the streamable HTTP client transport:

import { Client } from '@modelcontextprotocol/sdk/client/index.js';
在 GitHub 查看完整 README

安装

npx -y lightdash-mcp-server
新手?先看 mcpskill.org 教程 →