MCP Connector

Access Lightdash Data via API

MCP server giving AI assistants access to Lightdash projects, charts, dashboards, and metrics catalogs, in both stdio and HTTP modes.

Works with lightdash

Maintainer of this project? Claim this page to edit the listing.


91
Spark score
out of 100
Updated Jun 2025
Version 0.0.12
Models
universal

Add to Favorites

Why it matters

Integrate your AI assistants with Lightdash data. This MCP server provides a standardized interface to interact with your Lightdash projects, enabling AI to query and analyze your business intelligence.

Outcomes

What it gets done

01

List and retrieve details for Lightdash projects, spaces, charts, and dashboards.

02

Access custom metrics and project catalogs.

03

Export charts and dashboards as code.

04

Connect AI assistants to your Lightdash instance using PAT authentication.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-lightdash | bash

Capabilities

Tools your agent gets

list_projects

Get a list of all projects in your Lightdash organization

get_project

Get detailed information about a specific project

list_spaces

Get a list of all spaces in a project

list_charts

Get a list of all charts in a project

list_dashboards

Get a list of all dashboards in a project

get_custom_metrics

Get custom metrics for a project

get_catalog

Get the catalog for a project

get_metrics_catalog

Get the metrics catalog for a project

+2 tools

Overview

Lightdash MCP Server

Gives AI assistants 10 tools to browse Lightdash projects, spaces, charts, dashboards, custom metrics, and catalogs, including exporting charts and dashboards as code, over stdio or HTTP transport. Use when an assistant needs to reference or browse existing Lightdash BI content; requires a Lightdash personal access token and API URL for an existing Lightdash deployment.

What it does

lightdash-mcp-server provides MCP-compatible access to Lightdash's API, letting an AI assistant interact with a Lightdash organization's BI content through a standardized interface. It exposes 10 tools: list_projects lists all projects in the organization, get_project gets details of a specific project, list_spaces lists all spaces in a project, list_charts and list_dashboards list a project's charts and dashboards, get_custom_metrics retrieves a project's custom metrics, get_catalog and get_metrics_catalog retrieve the general and metrics-specific catalogs for a project, and get_charts_as_code/get_dashboards_as_code retrieve a project's charts and dashboards represented as code.

The server supports two transport modes. Stdio (the default) starts the server via npx lightdash-mcp-server and is configured with command/args in an MCP client's configuration, with LIGHTDASH_API_KEY and LIGHTDASH_API_URL passed through the client's env block. HTTP transport starts the server with a -port flag, exposing it as a StreamableHTTPServerTransport endpoint at http://localhost:<port>/mcp; in this mode the client configuration uses a bare url field instead of command/args, and the API key and URL must instead be set as environment variables in the environment where the server itself runs, since they cannot be passed through the client configuration in HTTP mode. Programmatic HTTP access uses the MCP SDK's StreamableHTTPClientTransport pointed at the server's /mcp endpoint.

When to use - and when NOT to

Use this when an AI assistant needs to browse or reference a team's Lightdash projects, spaces, charts, dashboards, or metrics definitions - for example listing what dashboards exist in a project, pulling a project's metrics catalog, or exporting charts and dashboards as code for review. It requires a Lightdash Personal Access Token and API base URL to authenticate, so it depends on an existing Lightdash deployment and account rather than working standalone.

How to install

Installation via Smithery for Claude Desktop:

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

Or manually:

npm install lightdash-mcp-server

Configuration requires LIGHTDASH_API_KEY (a Lightdash personal access token) and LIGHTDASH_API_URL (the Lightdash API base URL). For development, available scripts include hot-reloading dev modes for both stdio (npm run dev) and HTTP (npm run dev:http) transports, a production build (npm run build), linting via ESLint and Prettier (npm run lint, npm run fix), and a runnable examples script - the repository includes a complete example of connecting to the HTTP server programmatically in examples/list_spaces_http.ts.

Who it's for

Analytics and data teams using Lightdash who want an AI assistant to browse projects, charts, dashboards, and metrics catalogs, or pull chart/dashboard definitions as code, without leaving the assistant's interface.

Source README

lightdash-mcp-server

smithery badge
npm version

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.

Lightdash Server MCP server

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": "<your PAT>",
        "LIGHTDASH_API_URL": "https://<your base url>"
      }
    },
...
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';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';

const client = new Client({
  name: 'my-client',
  version: '1.0.0'
}, {
  capabilities: {}
});

const transport = new StreamableHTTPClientTransport(
  new URL('http://localhost:8080/mcp')
);

await client.connect(transport);

Note: When using HTTP mode, ensure the environment variables LIGHTDASH_API_KEY and LIGHTDASH_API_URL are set in the environment where the server is running, as they cannot be passed through MCP client configuration.

See examples/list_spaces_http.ts for a complete example of connecting to the HTTP server programmatically.

Development

Available Scripts

  • npm run dev - Start the server in development mode with hot reloading (stdio transport)
  • npm run dev:http - Start the server in development mode with HTTP transport on port 8080
  • npm run build - Build the project for production
  • npm run start - Start the production server
  • npm run lint - Run linting checks (ESLint and Prettier)
  • npm run fix - Automatically fix linting issues
  • npm run examples - Run the example scripts

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.