Lightdash MCP Server: Interactive BI Dashboard Access
Explore Lightdash BI dashboards on the MCP server for interactive data analysis, real-time insights, and collaborative reporting.
npx -y @syucream/lightdash-mcp-serverOverview
The Lightdash MCP Server exposes Lightdash BI dashboards through a Model Context Protocol (MCP) compatible API. It acts as a small adapter layer between Lightdash and tools or agents that understand MCP, translating dashboard metadata and visualizations into structured model context that can be consumed programmatically. This enables interactive data analysis workflows, real-time insights, and collaborative reporting driven by tooling such as LLMs, automation scripts, or custom dashboards.
For developers, the server simplifies embedding Lightdash context into external applications. Instead of scraping or building custom connectors, you can run this server alongside your analytics stack to provide standardized endpoints for discovery, metadata inspection, and data retrieval. Typical scenarios include integrating dashboards into chat assistants, automating report generation, or enabling reproducible, context-aware BI queries.
Features
- MCP-compatible endpoints for dashboard discovery and metadata
- Read-only access to Lightdash projects, dashboards, and charts
- Real-time access to chart queries and results via Lightdash API
- Optional dashboard and chart filtering for tenancy or security
- Simple HTTP interface with health and readiness checks
- Docker-friendly for deployment in containerized environments
- Basic authentication support via Lightdash API key (proxying Lightdash auth)
Installation / Configuration
Prerequisites: Node.js (>=16) or Docker, and access to a running Lightdash instance with an API key.
Clone the repository:
Install dependencies and run locally:
# Using npm
# Start with environment variables set
LIGHTDASH_HOST=https://my-lightdash.example.com \
LIGHTDASH_API_KEY=pk_XXXXX \
PORT=8080 \
Run with Docker:
# Build image
# Run container
Environment variables
| Variable | Required | Description |
|---|---|---|
| LIGHTDASH_HOST | yes | Base URL for your Lightdash instance (e.g. https://app.lightdash.com) |
| LIGHTDASH_API_KEY | yes | API key for authenticating requests to Lightdash |
| PORT | no | Port for this MCP server (default: 8080) |
| DASHBOARD_ALLOWLIST | no | Comma-separated dashboard UUIDs to expose (optional) |
| LOG_LEVEL | no | Logging verbosity (e.g. info, debug) |
Tip: Use a read-only Lightdash API key for safety. When deploying, place this service behind your network ACLs or API gateway.
Available Resources
Common HTTP endpoints exposed by the server (adjust base path as configured):
- GET /health — returns 200 OK when server is running
- GET /mcp/describe — high-level MCP information and capabilities
- GET /mcp/models — list of available dashboard models (projects/dashboards)
- GET /mcp/models/:id — metadata for a specific dashboard (charts, filters)
- POST /mcp/execute — request execution of a chart/query and receive results
- GET /dashboards — convenience list of dashboards proxied from Lightdash
- GET /dashboards/:id — raw Lightdash dashboard payload
Example: fetch available models
Example: execute a chart (POST body contains MCP-style execution spec)
Use Cases
- LLM-driven data assistants: Provide an LLM with MCP model context so it can answer questions grounded in your Lightdash dashboards (e.g., “What was revenue last quarter?”) without manual context assembly.
- Automated reporting: Periodically invoke /mcp/execute to pull chart results, format them, and distribute as daily summaries or scheduled reports.
- Embedded analytics in apps: Use /mcp/models to fetch dashboard structure and render lightweight, interactive views in a web or mobile app that mirror Lightdash content.
- Alerting and monitoring: Attach automation that queries key charts and raises alerts when metrics exceed thresholds (e.g., drop in conversion rate).
- Collaborative analysis: Share a model descriptor with teammates or tools so everyone operates on the same dashboard metadata and query definitions.
Security note: The server forwards requests to Lightdash using the configured API key. Limit exposure, use least-privilege API keys, and consider network-level protections or API gateway authentication for production deployments.
For the full code, issues, and contribution guidelines, see the project repository on GitHub: https://github.com/syucream/lightdash-mcp-server.