@lightdash-tools/mcp 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  MCP server for Lightdash: exposes projects, charts, dashboards, spaces, users, and groups as tools. Uses `@lightdash-tools/client` for all API access.
4
4
 
5
+ ## Installation
6
+
7
+ You can run the MCP server using `npx`:
8
+
9
+ ```bash
10
+ npx @lightdash-tools/mcp
11
+ ```
12
+
13
+ Or install it globally:
14
+
15
+ ```bash
16
+ npm install -g @lightdash-tools/mcp
17
+ ```
18
+
5
19
  ## Transports
6
20
 
7
21
  - **Stdio** — for local use (e.g. Claude Desktop, IDE). One process per client.
@@ -24,20 +38,24 @@ MCP server for Lightdash: exposes projects, charts, dashboards, spaces, users, a
24
38
 
25
39
  ### Stdio (local)
26
40
 
41
+ For use with Claude Desktop or IDEs, use `npx`:
42
+
43
+ ```bash
44
+ npx @lightdash-tools/mcp
45
+ ```
46
+
47
+ Or if installed globally:
48
+
27
49
  ```bash
28
- pnpm build
29
- pnpm start
30
- # or: node dist/index.js
50
+ lightdash-mcp
31
51
  ```
32
52
 
33
- Use with Claude Desktop or an IDE by configuring the MCP server command (e.g. `node` with path to `dist/index.js`). Logging goes to stderr only; stdout is JSON-RPC.
53
+ Logging goes to stderr only; stdout is JSON-RPC.
34
54
 
35
55
  ### Streamable HTTP (remote)
36
56
 
37
57
  ```bash
38
- pnpm build
39
- pnpm start:http
40
- # or: node dist/http.js
58
+ npx @lightdash-tools/mcp --http
41
59
  ```
42
60
 
43
61
  The server listens on `http://localhost:3100` (or `MCP_HTTP_PORT`). MCP endpoint: `POST/GET/DELETE /mcp`. Sessions are created on first `initialize`; subsequent requests must include the `Mcp-Session-Id` header returned by the server.
@@ -46,8 +64,12 @@ With auth disabled (default), any client can call the endpoint. With `MCP_AUTH_E
46
64
 
47
65
  ## Tools
48
66
 
49
- Same set in both modes: `list_projects`, `get_project`, `list_charts`, `list_dashboards`, `list_spaces`, `get_space`, `list_organization_members`, `get_member`, `delete_member`, `list_groups`, `get_group`.
67
+ Same set in both modes: `list_projects`, `get_project`, `list_explores`, `get_explore`, `list_charts`, `list_charts_as_code`, `upsert_chart_as_code`, `list_dashboards`, `list_spaces`, `get_space`, `list_organization_members`, `get_member`, `delete_member`, `list_groups`, `get_group`, `compile_query`.
50
68
 
51
69
  ### Destructive tools
52
70
 
53
71
  Tools with `destructiveHint: true` (e.g. `delete_member`) perform irreversible or high-impact actions. MCP clients should show a warning and/or require user confirmation before executing them. AI agents should ask the user for explicit confirmation before calling such tools.
72
+
73
+ ## License
74
+
75
+ Apache-2.0
package/dist/bin.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * MCP server CLI entrypoint.
4
+ */
5
+ declare const args: string[];
package/dist/bin.js ADDED
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ /**
4
+ * MCP server CLI entrypoint.
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || (function () {
23
+ var ownKeys = function(o) {
24
+ ownKeys = Object.getOwnPropertyNames || function (o) {
25
+ var ar = [];
26
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
+ return ar;
28
+ };
29
+ return ownKeys(o);
30
+ };
31
+ return function (mod) {
32
+ if (mod && mod.__esModule) return mod;
33
+ var result = {};
34
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
+ __setModuleDefault(result, mod);
36
+ return result;
37
+ };
38
+ })();
39
+ const args = process.argv.slice(2);
40
+ if (args.includes('--http')) {
41
+ Promise.resolve().then(() => __importStar(require('./http.js')));
42
+ }
43
+ else {
44
+ Promise.resolve().then(() => __importStar(require('./index.js')));
45
+ }
package/package.json CHANGED
@@ -1,16 +1,19 @@
1
1
  {
2
2
  "name": "@lightdash-tools/mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "MCP server and utilities for Lightdash AI.",
5
5
  "keywords": [],
6
- "license": "ISC",
6
+ "license": "Apache-2.0",
7
7
  "author": "",
8
8
  "main": "dist/index.js",
9
9
  "types": "dist/index.d.ts",
10
+ "bin": {
11
+ "lightdash-mcp": "./dist/bin.js"
12
+ },
10
13
  "dependencies": {
11
14
  "@modelcontextprotocol/sdk": "^1.26.0",
12
15
  "zod": "^4.3.6",
13
- "@lightdash-tools/client": "0.1.0"
16
+ "@lightdash-tools/client": "0.1.1"
14
17
  },
15
18
  "devDependencies": {
16
19
  "@types/node": "^25.2.3"
package/src/bin.ts ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * MCP server CLI entrypoint.
4
+ */
5
+
6
+ const args = process.argv.slice(2);
7
+
8
+ if (args.includes('--http')) {
9
+ import('./http.js');
10
+ } else {
11
+ import('./index.js');
12
+ }