Enterprise The MCP server needs a valid
LIGHTDASH_LICENSE_KEY set on your instance — see enterprise features for applying the key. Without it, the MCP service is never registered and /api/v1/mcp returns an error.Prerequisites
- Enterprise license —
LIGHTDASH_LICENSE_KEYmust be set on your instance. - HTTPS — MCP clients connect over HTTPS. See secure Lightdash with HTTPS if your instance is HTTP-only.
Enable MCP
Set the following environment variable on your Lightdash deployment:Optional configuration
Set
MCP_RUN_SQL_MAX_LIMIT to override the default row cap for the run_sql tool, tuned independently of AI Analyst. For example:
MCP URL format
Once enabled, the MCP endpoint is available at:<your-lightdash-host> with your instance’s domain (e.g. lightdash.yourcompany.com).
Connect an AI assistant
Follow the same steps as Lightdash Cloud, using your self-hosted URL instead of a.lightdash.cloud address. See the Lightdash MCP installation guide for detailed instructions per AI assistant.
For example, with Claude Code: