Lightdash MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| IAP_SA | No | Service account email for IAP when using user credentials (ADC) | |
| IAP_ENABLED | No | Enable Google Cloud IAP authentication (true/1) | |
| LIGHTDASH_URL | Yes | Base URL of your Lightdash Instance | |
| LIGHTDASH_TOKEN | Yes | Your Lightdash Personal Access Token | |
| CF_ACCESS_CLIENT_ID | No | Cloudflare Access Client ID (if behind CF Access) | |
| LIGHTDASH_PROJECT_UUID | No | Default project UUID (falls back to first available project) | |
| CF_ACCESS_CLIENT_SECRET | No | Cloudflare Access Client Secret (if behind CF Access) |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| create-chartA | Create a new saved chart in a space. Requires table name, metric query, and chart configuration. ⚠️ CRITICAL: Chart configuration structure must be precise or the chart will break! ═══════════════════════════════════════════════════════════════════ COMPLETE WORKING EXAMPLE - Line Chart with Count Distinct Metric: ═══════════════════════════════════════════════════════════════════ metricQuery: { "exploreName": "my_table", "dimensions": ["my_table_date_day"], "metrics": [], "filters": { "dimensions": { "id": "root", "and": [ { "id": "filter_1", "target": {"fieldId": "my_table_country"}, "operator": "equals", "values": ["US"] }, { "id": "filter_2", "target": {"fieldId": "my_table_date_day"}, "values": [30], "operator": "inThePast", "required": false, "settings": { "completed": false, "unitOfTime": "days" } } ] } }, "sorts": [{"fieldId": "my_table_date_day", "descending": true}], "limit": 500, "tableCalculations": [], "additionalMetrics": [ { "name": "dau", "label": "Daily Active Users", "description": "Count of unique users", "type": "count_distinct", "sql": "${TABLE}.user_id", "table": "my_table", "baseDimensionName": "user_id", "formatOptions": {"type": "default", "separator": "default"} } ] } chartConfig: { "type": "cartesian", "config": { "layout": { "xField": "my_table_date_day", "yField": ["my_table_dau"], "flipAxes": false }, "eChartsConfig": { "xAxis": [{"name": "Date"}], "yAxis": [{"name": "DAU"}], "series": [ { "type": "line", "encode": { "xRef": {"field": "my_table_date_day"}, "yRef": {"field": "my_table_dau"} }, "yAxisIndex": 0 } ] } } } pivotConfig (optional): { "columns": ["my_table_country"] } ═══════════════════════════════════════════════════════════════════ EXAMPLE WITH CUSTOM DIMENSIONS - Stacked/Segmented Charts: ═══════════════════════════════════════════════════════════════════ Use Case: Create grouped/segmented visualizations by categorizing data into meaningful buckets (e.g., Top N + "Other" pattern, status groupings, etc.) metricQuery: { "exploreName": "your_table", "dimensions": ["your_table_date_day", "category_dimension"], "metrics": [], "filters": { "dimensions": { "id": "root", "and": [ { "id": "filter_1", "target": {"fieldId": "your_table_date_day"}, "values": [30], "operator": "inThePast", "required": false, "settings": {"completed": false, "unitOfTime": "days"} } ] } }, "sorts": [{"fieldId": "your_table_date_day", "descending": true}], "limit": 500, "additionalMetrics": [ { "name": "unique_count", "label": "Unique Count", "type": "count_distinct", "sql": "${TABLE}.identifier_column", "table": "your_table", "baseDimensionName": "identifier_column" } ], "customDimensions": [ { "id": "category_dimension", "name": "Category Dimension", "type": "sql", "table": "your_table", "sql": "CASE\n WHEN raw_field = 'value1' THEN 'Category A'\n WHEN raw_field = 'value2' THEN 'Category B'\n WHEN raw_field IN ('value3', 'value4') THEN 'Category C'\n ELSE 'Other'\n END", "dimensionType": "string" } ] } chartConfig: { "type": "cartesian", "config": { "layout": { "xField": "your_table_date_day", "yField": ["your_table_unique_count"], "flipAxes": false }, "eChartsConfig": { "xAxis": [{"name": "Date"}], "yAxis": [{"name": "Count"}], "series": [ { "type": "bar", "stack": "your_table_unique_count", "encode": { "xRef": {"field": "your_table_date_day"}, "yRef": {"field": "your_table_unique_count"} }, "yAxisIndex": 0 } ] } } } pivotConfig: { "columns": ["category_dimension"] } Key Pattern: The custom dimension "category_dimension" is:
═══════════════════════════════════════════════════════════════════ KEY RULES (MUST FOLLOW): ═══════════════════════════════════════════════════════════════════
═══════════════════════════════════════════════════════════════════ CHART TYPES: ═══════════════════════════════════════════════════════════════════ Line Chart: series[].type = "line" Bar Chart: series[].type = "bar" Area Chart: series[].type = "line" + series[].areaStyle = {} Stacked Area: series[].type = "line" + series[].areaStyle = {} + series[].stack = "stack_name" ═══════════════════════════════════════════════════════════════════ VALIDATION: ═══════════════════════════════════════════════════════════════════ The server will automatically:
If validation fails, you'll get a detailed error message. |
| create-dashboardA | Create a new dashboard in the Lightdash project. You can create an empty dashboard (just name and description) or a fully configured dashboard with tiles and tabs. Tile Types:
Tile Position Properties (required for each tile):
When to use:
Best practice: Start with an empty dashboard, then use create-dashboard-tile to add content. |
| create-dashboard-tileA | Create a new tile and add it to an existing dashboard. Required for all tiles:
Tile-specific requirements: saved_chart tiles:
markdown tiles:
loom tiles:
CRITICAL - Grid system:
When to use:
Best practice: Use get-dashboard-tiles first to see existing layout and find an empty position. |
| create-spaceA | Create a new space (folder) to organize charts and dashboards. Spaces help organize content by:
When to use:
Best practices:
|
| delete-chartA | Delete a saved chart from the project. Warning: This is a destructive operation and cannot be undone. When to use:
Important notes:
Accepts: Either chart UUID or chart name (will search for exact match) |
| delete-dashboard-tileA | Delete a tile from a dashboard. This permanently removes a tile from the dashboard. The operation cannot be undone. When to use:
Important notes:
Search behavior: Matches tile titles case-insensitively with partial matching. |
| delete-spaceA | Delete a space (folder). Important constraints:
When to use:
Steps to delete a space with content:
Accepts: Either space UUID or space name (will search for exact match) |
| duplicate-dashboardA | Create a complete copy of an existing dashboard with a new name. This copies everything from the source dashboard:
What gets regenerated:
What stays the same:
When to use:
Best practice: Use descriptive names to distinguish the copy from the original. |
| get-chart-detailsA | Get detailed information about a specific saved chart. Returns complete chart configuration including:
When to use:
Accepts: Either chart UUID or chart name (will search for exact match) |
| get-custom-metricsA | Get custom metrics defined in the project. Custom metrics are user-defined metrics created in the Lightdash UI that aren't part of the dbt model definitions. These are stored separately and can be used in charts and dashboards. Returns:
When to use:
Note: These are different from metrics defined in your dbt models. |
| get-dashboard-codeA | Get the complete dashboard configuration including full tile definitions. Returns the raw dashboard configuration as code, including:
When to use:
Use cases:
Alternative: Use duplicate-dashboard for a simpler way to copy dashboards. |
| get-dashboard-tile-chart-configA | Get the complete chart configuration for a dashboard tile, including dashboard-only charts. Dashboard-only charts store their full configuration (metric query, chart config, visualization settings) directly in the dashboard tile structure. This tool extracts that complete configuration. Returns:
When to use:
Parameters:
|
| get-dashboard-tilesA | Get all tiles from a specific dashboard. Returns a list of all tiles on the dashboard with their:
When to use:
Search behavior: Matches dashboard names case-insensitively with partial matching. |
| get-explore-schemaA | Get the complete schema for an explore/table including all available dimensions, metrics, and joins. This is essential before creating charts to understand what fields exist and their types. Returns:
Field information includes:
When to use:
Best practices:
Hidden fields: By default, hidden fields are excluded. Set include_hidden=true to see all fields including internal/technical ones. |
| get-projectA | Get detailed information about a specific project. Returns comprehensive project details including:
When to use: When you need detailed configuration information about a specific project, such as its warehouse connection, dbt settings, or other metadata. Parameters:
|
| list-chartsA | List all saved charts in the Lightdash project. Returns chart information including:
When to use:
Optional search_term: Filters the list to only charts matching the search term in their name. |
| list-dashboardsA | List all dashboards in the Lightdash project. Returns dashboard metadata including:
When to use:
Next steps: Use get-dashboard-tiles to see what's on a dashboard, or get-dashboard-code to get the complete configuration. |
| list-exploresA | List all available explores/tables in the project catalog. Returns a catalog of all tables/explores organized by project and dataset:
When to use:
Best practice: Use this for initial discovery to find table names, then use get-explore-schema for detailed dimensions, metrics, and joins. Note: This can return large amounts of data for projects with many explores. |
| list-projectsA | List all projects in your Lightdash organization. Returns project information including:
When to use: Start here to discover available projects or to find the UUID of a project you want to work with. If LIGHTDASH_PROJECT_UUID environment variable is set, most other tools will use that project automatically. |
| list-spacesA | List all spaces (folders) in the Lightdash project. Spaces are organizational folders that contain charts and dashboards. Returns for each space:
When to use:
Space types:
|
| rename-dashboard-tileA | Rename a tile on a dashboard by updating its title property. This is a convenience tool for the common operation of changing a tile's display name. When to use:
For more complex updates: Use update-dashboard-tile to change multiple properties at once. |
| run-chart-queryA | Execute a chart query and return the data results in CSV format. Runs the chart's configured query against the data warehouse and returns the results as CSV. Returns:
When to use:
Performance notes:
Optional limit parameter: Restricts the number of rows returned (useful for large datasets) |
| run-dashboard-tilesA | Run one or multiple dashboard tiles (or all tiles) concurrently. This tool fetches the dashboard configuration once and then executes the selected tiles in parallel. When to use:
Returns:
|
| run-raw-queryA | Execute a raw metric query against a Lightdash explore. This tool allows you to run arbitrary queries by specifying dimensions, metrics, filters, and sorts directly. It is useful for:
Input:
═══════════════════════════════════════════════════════════════════ COMPLETE WORKING EXAMPLE: ═══════════════════════════════════════════════════════════════════ metric_query: { "dimensions": ["my_table_date_day"], "metrics": [], "filters": { "dimensions": { "id": "root", "and": [ { "id": "filter_1", "target": {"fieldId": "my_table_country"}, "operator": "equals", "values": ["US"] }, { "id": "filter_2", "target": {"fieldId": "my_table_date_day"}, "values": [30], "operator": "inThePast", "required": false, "settings": { "completed": false, "unitOfTime": "days" } } ] } }, "sorts": [{"fieldId": "my_table_date_day", "descending": true}], "limit": 500, "tableCalculations": [], "additionalMetrics": [ { "name": "dau", "label": "Daily Active Users", "description": "Count of unique users", "type": "count_distinct", "sql": "${TABLE}.user_id", "table": "my_table", "baseDimensionName": "user_id", "formatOptions": {"type": "default", "separator": "default"} } ] } Key Rules:
|
| search-chartsA | Search for charts by name or description. Performs case-insensitive partial matching against:
Returns matching charts with their UUID, name, space, and description. When to use:
Difference from list-charts: This searches both name AND description, while list-charts only filters by name. |
| update-chartA | Update an existing saved chart's configuration. This tool allows partial updates - you only need to provide the fields you want to change. Updatable fields:
Common use cases:
Important notes:
Example - Change sort to ascending by name: |
| update-dashboard-filtersA | Update dashboard-level filters that apply to all tiles. Dashboard filters allow users to:
Filter configuration structure: Filters use the same structure as chart filters with:
When to use:
Important: Changes apply immediately to all dashboard viewers. Testing: Use run-dashboard-chart after updating to verify filters work as expected. |
| update-dashboard-tileA | Update any properties of a tile on a dashboard. You can modify multiple tile properties in a single operation: Position properties (at tile level):
Display properties (in properties object):
CRITICAL - Grid System: Lightdash uses a 36-column grid horizontally:
When to use:
Example properties_update values:
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/poddubnyoleg/lightdash_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server