Skip to content

Commit eda3de5

Browse files
torimwhaleyclaude
andauthored
Add self-hosted MCP setup instructions (#538)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fa8491b commit eda3de5

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@
307307
"group": "Customize deployment",
308308
"pages": [
309309
"self-host/customize-deployment/enterprise-license-keys",
310+
"self-host/customize-deployment/configure-mcp-for-lightdash",
310311
"self-host/customize-deployment/configure-a-slack-app-for-lightdash",
311312
"self-host/customize-deployment/configure-github-for-lightdash",
312313
"self-host/customize-deployment/configure-lightdash-to-use-an-external-database",
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
title: Configure MCP for self-hosted Lightdash
3+
description: "Enable the Model Context Protocol (MCP) integration on your self-hosted Lightdash instance."
4+
sidebarTitle: MCP integration
5+
---
6+
7+
<Note>
8+
🛠 This page is for engineering teams self-hosting their own Lightdash instance. If you want to use MCP with Lightdash Cloud, go to the [Lightdash MCP](/references/integrations/lightdash-mcp) guide.
9+
</Note>
10+
11+
<Warning>
12+
🔑 **Enterprise feature** — MCP on self-hosted instances requires a valid [Enterprise License Key](/self-host/customize-deployment/enterprise-license-keys). Without an active license, the MCP service will not be registered and the `/api/v1/mcp` endpoint will return an error.
13+
</Warning>
14+
15+
## Prerequisites
16+
17+
- A self-hosted Lightdash instance
18+
- A valid `LIGHTDASH_LICENSE_KEY` configured ([setup guide](/self-host/customize-deployment/enterprise-license-keys))
19+
20+
## Enable MCP
21+
22+
Set the following environment variable on your Lightdash deployment:
23+
24+
```bash
25+
MCP_ENABLED=true
26+
```
27+
28+
No additional services or external OAuth configuration is needed — the OAuth server is built into Lightdash, so the authentication flow works the same as Lightdash Cloud once MCP is enabled.
29+
30+
## MCP URL format
31+
32+
Once enabled, the MCP endpoint is available at:
33+
34+
```
35+
https://<your-lightdash-host>/api/v1/mcp
36+
```
37+
38+
Replace `<your-lightdash-host>` with your instance's domain (e.g. `lightdash.yourcompany.com`).
39+
40+
## Connect an AI assistant
41+
42+
Follow the same setup steps as Lightdash Cloud, using your self-hosted URL instead of a `.lightdash.cloud` address. See the [Lightdash MCP installation guide](/references/integrations/lightdash-mcp#installation) for detailed instructions for each AI assistant (Claude, ChatGPT, Codex, Cursor, Claude Code).
43+
44+
For example, with Claude Code:
45+
46+
```bash
47+
claude mcp add lightdash https://<your-lightdash-host>/api/v1/mcp -t http
48+
```
49+
50+
## Network requirements
51+
52+
If your Lightdash instance is behind a firewall or VPN, ensure the MCP client can reach your Lightdash host over HTTPS. See the [network requirements](/references/integrations/lightdash-mcp#network-requirements) section for additional domains that may need to be allowlisted depending on your AI assistant.
53+
54+
## Troubleshooting
55+
56+
| Symptom | Likely cause |
57+
|---------|-------------|
58+
| `/api/v1/mcp` returns an error or 404 | `MCP_ENABLED` is not set to `true`, or the license key is missing/invalid |
59+
| OAuth flow fails | Ensure your Lightdash instance is reachable from the browser performing the OAuth redirect |
60+
| AI assistant can't connect | Check that the MCP URL is correct and the instance is accessible over HTTPS |

self-host/enterprise-on-prem.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Once your license key is active, most Enterprise features are controlled by envi
5353
| AI agents | `AI_AGENTS_ENABLED=true` | [AI agents](/guides/ai-agents) |
5454
| Caching | `RESULTS_CACHE_ENABLED=true` | [Caching](/guides/developer/caching) |
5555
| Embedding | `EMBEDDING_ENABLED=true` | [Embedding](/references/embedding) |
56+
| MCP | `MCP_ENABLED=true` | [MCP integration](/self-host/customize-deployment/configure-mcp-for-lightdash) |
5657

5758
You can [search "enterprise" on the environment variables page](/self-host/customize-deployment/environment-variables) to see all variables that require an Enterprise license key.
5859

0 commit comments

Comments
 (0)