redash-mcp 3.1.6 → 3.2.0
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.ja.md +35 -4
- package/README.ko.md +36 -5
- package/README.md +35 -4
- package/dist/index.js +118 -21
- package/manifest.json +1 -1
- package/package.json +5 -2
package/README.ja.md
CHANGED
|
@@ -5,10 +5,14 @@
|
|
|
5
5
|
[](https://nodejs.org)
|
|
6
6
|
[](https://smithery.ai/servers/dev-seob717/redash-mcp)
|
|
7
7
|
[](https://glama.ai/mcp/servers/seob717/redash-mcp)
|
|
8
|
+
[](https://github.com/seob717/redash-mcp#installation)
|
|
9
|
+
[](https://github.com/seob717/redash-mcp#installation)
|
|
10
|
+
[](https://github.com/seob717/redash-mcp#installation)
|
|
11
|
+
[](https://github.com/seob717/redash-mcp#installation)
|
|
8
12
|
|
|
9
13
|
[English](README.md) | [한국어](README.ko.md) | 日本語
|
|
10
14
|
|
|
11
|
-
> [Redash](https://redash.io) を Claude
|
|
15
|
+
> [Redash](https://redash.io) を Claude・Cursor・Gemini CLI・Codex などあらゆる MCP クライアントに接続する MCP サーバー — 自然言語でデータを照会し、ダッシュボードを管理し、SQL を実行します。
|
|
12
16
|
|
|
13
17
|
[なぜ redash-mcp か](#なぜ-redash-mcp-か) · [機能](#機能) · [インストール](#インストール) · [環境変数](#環境変数) · [使用例](#使用例) · [Privacy](#privacy-policy)
|
|
14
18
|
|
|
@@ -24,7 +28,7 @@ Redash MCP サーバーは複数あります。このサーバーは、LLM に *
|
|
|
24
28
|
|
|
25
29
|
- **🛡️ SQL セーフティガード** — `DROP`/`TRUNCATE`/`ALTER`、`WHERE` なしの `DELETE`/`UPDATE` をブロック。`strict`/`warn`/`off` モード、PII 検出、自動 `LIMIT` まで備え、実際の Redash を安心して Claude に任せられます。
|
|
26
30
|
- **🧠 BIRD スマートクエリ** — 質問を解析して適切なテーブルを自動選択し、SQL 生成をガイドします([BIRD text-to-SQL](https://bird-bench.github.io/) 手法ベース)。テーブル選択用の Claude Haiku フォールバックもオプションで利用できます。
|
|
27
|
-
- **⚡ ワンコマンドでセットアップ** — `npx redash-mcp setup` が Claude Desktop / Claude Code の設定を代わりに行います。JSON を手で編集する必要はありません。
|
|
31
|
+
- **⚡ ワンコマンドでセットアップ** — `npx redash-mcp setup` が Claude Desktop / Claude Code / Cursor / Gemini CLI / Codex CLI の設定を代わりに行います。JSON を手で編集する必要はありません。
|
|
28
32
|
- **🔒 完全ローカル** — Redash インスタンスと直接通信し、API キーとクエリ結果が端末から外に出ることはありません。
|
|
29
33
|
- **📊 エンドツーエンド** — 照会・保存・複製、ダッシュボード、ウィジェット、アラートまで、6 カテゴリ・20 以上のツール。
|
|
30
34
|
|
|
@@ -86,7 +90,7 @@ API 呼び出しの重複を減らすため、結果をメモリにキャッシ
|
|
|
86
90
|
npx redash-mcp setup
|
|
87
91
|
```
|
|
88
92
|
|
|
89
|
-
|
|
93
|
+
セットアップウィザードが Claude Desktop・Claude Code (CLI)・Cursor・Gemini CLI・Codex CLI を任意の組み合わせで設定します。
|
|
90
94
|
|
|
91
95
|
### シェルスクリプトでインストール
|
|
92
96
|
|
|
@@ -125,7 +129,16 @@ Redash → 右上のプロフィール → **Edit Profile** → **API Key** を
|
|
|
125
129
|
|
|
126
130
|
#### 2-B. Claude Code (CLI)
|
|
127
131
|
|
|
128
|
-
|
|
132
|
+
```bash
|
|
133
|
+
claude mcp add --scope user redash-mcp \
|
|
134
|
+
-e REDASH_URL=https://your-redash-instance.com \
|
|
135
|
+
-e REDASH_API_KEY=your_api_key_here \
|
|
136
|
+
-- npx -y redash-mcp
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
#### 2-C. Cursor
|
|
140
|
+
|
|
141
|
+
`~/.cursor/mcp.json` を開き(なければ作成)、以下を追加します:
|
|
129
142
|
|
|
130
143
|
```json
|
|
131
144
|
{
|
|
@@ -142,6 +155,24 @@ Redash → 右上のプロフィール → **Edit Profile** → **API Key** を
|
|
|
142
155
|
}
|
|
143
156
|
```
|
|
144
157
|
|
|
158
|
+
#### 2-D. Gemini CLI
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
gemini mcp add -s user \
|
|
162
|
+
-e REDASH_URL=https://your-redash-instance.com \
|
|
163
|
+
-e REDASH_API_KEY=your_api_key_here \
|
|
164
|
+
redash-mcp npx -y redash-mcp
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
#### 2-E. Codex CLI
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
codex mcp add redash-mcp \
|
|
171
|
+
--env REDASH_URL=https://your-redash-instance.com \
|
|
172
|
+
--env REDASH_API_KEY=your_api_key_here \
|
|
173
|
+
-- npx -y redash-mcp
|
|
174
|
+
```
|
|
175
|
+
|
|
145
176
|
> **macOS**: `npx` が見つからない場合は `which npx` でフルパスを確認して置き換えてください。
|
|
146
177
|
|
|
147
178
|
---
|
package/README.ko.md
CHANGED
|
@@ -5,10 +5,14 @@
|
|
|
5
5
|
[](https://nodejs.org)
|
|
6
6
|
[](https://smithery.ai/servers/dev-seob717/redash-mcp)
|
|
7
7
|
[](https://glama.ai/mcp/servers/seob717/redash-mcp)
|
|
8
|
+
[](https://github.com/seob717/redash-mcp#installation)
|
|
9
|
+
[](https://github.com/seob717/redash-mcp#installation)
|
|
10
|
+
[](https://github.com/seob717/redash-mcp#installation)
|
|
11
|
+
[](https://github.com/seob717/redash-mcp#installation)
|
|
8
12
|
|
|
9
13
|
[English](README.md) | 한국어 | [日本語](README.ja.md)
|
|
10
14
|
|
|
11
|
-
> [Redash](https://redash.io)를 Claude
|
|
15
|
+
> [Redash](https://redash.io)를 Claude, Cursor, Gemini CLI, Codex 등 모든 MCP 클라이언트에 연결하는 MCP 서버 — 자연어로 데이터를 조회하고, 대시보드를 관리하고, SQL을 실행합니다.
|
|
12
16
|
|
|
13
17
|
[왜 redash-mcp인가](#왜-redash-mcp인가) · [기능](#기능) · [설치](#설치) · [환경 변수](#환경-변수) · [사용 예시](#사용-예시) · [Privacy](#privacy-policy)
|
|
14
18
|
|
|
@@ -24,7 +28,7 @@ Redash MCP 서버는 여러 개 있습니다. 이 서버는 LLM이 **운영(prod
|
|
|
24
28
|
|
|
25
29
|
- **🛡️ SQL 안전 가드** — `DROP`/`TRUNCATE`/`ALTER`, `WHERE` 없는 `DELETE`/`UPDATE`를 차단합니다. `strict`/`warn`/`off` 모드, PII 감지, 자동 `LIMIT`까지 지원해 실제 Redash를 Claude에 안심하고 맡길 수 있습니다.
|
|
26
30
|
- **🧠 BIRD 스마트 쿼리** — 질문을 분석해 적절한 테이블을 자동 선택하고 SQL 생성을 가이드합니다([BIRD text-to-SQL](https://bird-bench.github.io/) 방법론 기반). 테이블 선택용 Claude Haiku 폴백도 선택적으로 지원합니다.
|
|
27
|
-
- **⚡ 한 번의 명령으로 설치** — `npx redash-mcp setup`이 Claude Desktop / Claude Code 설정을 대신 잡아줍니다. JSON을 직접 손댈 필요가 없습니다.
|
|
31
|
+
- **⚡ 한 번의 명령으로 설치** — `npx redash-mcp setup`이 Claude Desktop / Claude Code / Cursor / Gemini CLI / Codex CLI 설정을 대신 잡아줍니다. JSON을 직접 손댈 필요가 없습니다.
|
|
28
32
|
- **🔒 완전 로컬** — Redash 인스턴스와 직접 통신하며, API 키와 쿼리 결과가 기기를 벗어나지 않습니다.
|
|
29
33
|
- **📊 처음부터 끝까지** — 조회·저장·복제, 대시보드, 위젯, 알림까지 6개 카테고리에 걸친 20개 이상의 툴.
|
|
30
34
|
|
|
@@ -86,7 +90,7 @@ Redash MCP 서버는 여러 개 있습니다. 이 서버는 LLM이 **운영(prod
|
|
|
86
90
|
npx redash-mcp setup
|
|
87
91
|
```
|
|
88
92
|
|
|
89
|
-
|
|
93
|
+
설정 마법사가 Claude Desktop, Claude Code (CLI), Cursor, Gemini CLI, Codex CLI 중 원하는 조합을 골라 설정해줍니다.
|
|
90
94
|
|
|
91
95
|
### 셸 스크립트로 설치
|
|
92
96
|
|
|
@@ -123,9 +127,18 @@ Redash → 우측 상단 프로필 → **Edit Profile** → **API Key** 복사
|
|
|
123
127
|
|
|
124
128
|
저장 후 Claude Desktop을 완전히 종료했다가 다시 시작합니다.
|
|
125
129
|
|
|
126
|
-
#### 2-B. Claude Code (CLI)
|
|
130
|
+
#### 2-B. Claude Code (CLI)
|
|
127
131
|
|
|
128
|
-
|
|
132
|
+
```bash
|
|
133
|
+
claude mcp add --scope user redash-mcp \
|
|
134
|
+
-e REDASH_URL=https://your-redash-instance.com \
|
|
135
|
+
-e REDASH_API_KEY=your_api_key_here \
|
|
136
|
+
-- npx -y redash-mcp
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
#### 2-C. Cursor
|
|
140
|
+
|
|
141
|
+
`~/.cursor/mcp.json` 파일을 열고(없으면 생성) 다음을 추가합니다:
|
|
129
142
|
|
|
130
143
|
```json
|
|
131
144
|
{
|
|
@@ -142,6 +155,24 @@ Redash → 우측 상단 프로필 → **Edit Profile** → **API Key** 복사
|
|
|
142
155
|
}
|
|
143
156
|
```
|
|
144
157
|
|
|
158
|
+
#### 2-D. Gemini CLI
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
gemini mcp add -s user \
|
|
162
|
+
-e REDASH_URL=https://your-redash-instance.com \
|
|
163
|
+
-e REDASH_API_KEY=your_api_key_here \
|
|
164
|
+
redash-mcp npx -y redash-mcp
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
#### 2-E. Codex CLI
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
codex mcp add redash-mcp \
|
|
171
|
+
--env REDASH_URL=https://your-redash-instance.com \
|
|
172
|
+
--env REDASH_API_KEY=your_api_key_here \
|
|
173
|
+
-- npx -y redash-mcp
|
|
174
|
+
```
|
|
175
|
+
|
|
145
176
|
> **macOS**: `npx`를 못 찾는 경우 `which npx` 명령어로 전체 경로를 확인 후 대체하세요.
|
|
146
177
|
|
|
147
178
|
---
|
package/README.md
CHANGED
|
@@ -5,10 +5,14 @@
|
|
|
5
5
|
[](https://nodejs.org)
|
|
6
6
|
[](https://smithery.ai/servers/dev-seob717/redash-mcp)
|
|
7
7
|
[](https://glama.ai/mcp/servers/seob717/redash-mcp)
|
|
8
|
+
[](https://github.com/seob717/redash-mcp#installation)
|
|
9
|
+
[](https://github.com/seob717/redash-mcp#installation)
|
|
10
|
+
[](https://github.com/seob717/redash-mcp#installation)
|
|
11
|
+
[](https://github.com/seob717/redash-mcp#installation)
|
|
8
12
|
|
|
9
13
|
English | [한국어](README.ko.md) | [日本語](README.ja.md)
|
|
10
14
|
|
|
11
|
-
> MCP server that connects [Redash](https://redash.io) to Claude
|
|
15
|
+
> MCP server that connects [Redash](https://redash.io) to Claude, Cursor, Gemini CLI, Codex, and any MCP client — query data, manage dashboards, and run SQL with natural language.
|
|
12
16
|
|
|
13
17
|
[Why](#why-redash-mcp) · [Features](#features) · [Install](#installation) · [Env](#environment-variables) · [Examples](#usage-examples) · [Privacy](#privacy-policy)
|
|
14
18
|
|
|
@@ -22,7 +26,7 @@ There are several Redash MCP servers. This one is built for letting an LLM touch
|
|
|
22
26
|
|
|
23
27
|
- **🛡️ SQL Safety Guard** — blocks `DROP`/`TRUNCATE`/`ALTER` and `DELETE`/`UPDATE` without `WHERE`; `strict`/`warn`/`off` modes, PII detection, and auto-`LIMIT`. Hand Claude your real Redash without flinching.
|
|
24
28
|
- **🧠 BIRD Smart Query** — analyzes the question, auto-selects the right tables, and guides SQL generation (based on the [BIRD text-to-SQL](https://bird-bench.github.io/) methodology). Optional Claude Haiku fallback for table selection.
|
|
25
|
-
- **⚡ One-command setup** — `npx redash-mcp setup` configures Claude Desktop / Claude Code for you. No hand-editing JSON.
|
|
29
|
+
- **⚡ One-command setup** — `npx redash-mcp setup` configures Claude Desktop / Claude Code / Cursor / Gemini CLI / Codex CLI for you. No hand-editing JSON.
|
|
26
30
|
- **🔒 Fully local** — talks directly to your Redash instance. API key and query results never leave your machine.
|
|
27
31
|
- **📊 End-to-end** — query, save, fork, dashboards, widgets, and alerts — 20+ tools across 6 categories.
|
|
28
32
|
|
|
@@ -84,7 +88,7 @@ Results are cached in-memory to reduce redundant API calls:
|
|
|
84
88
|
npx redash-mcp setup
|
|
85
89
|
```
|
|
86
90
|
|
|
87
|
-
The setup wizard will guide you through configuring Claude Desktop, Claude Code (CLI),
|
|
91
|
+
The setup wizard will guide you through configuring Claude Desktop, Claude Code (CLI), Cursor, Gemini CLI, and Codex CLI — pick any combination.
|
|
88
92
|
|
|
89
93
|
### Shell Script Install
|
|
90
94
|
|
|
@@ -123,7 +127,16 @@ Fully quit and restart Claude Desktop after saving.
|
|
|
123
127
|
|
|
124
128
|
#### 2-B. Claude Code (CLI)
|
|
125
129
|
|
|
126
|
-
|
|
130
|
+
```bash
|
|
131
|
+
claude mcp add --scope user redash-mcp \
|
|
132
|
+
-e REDASH_URL=https://your-redash-instance.com \
|
|
133
|
+
-e REDASH_API_KEY=your_api_key_here \
|
|
134
|
+
-- npx -y redash-mcp
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
#### 2-C. Cursor
|
|
138
|
+
|
|
139
|
+
Open `~/.cursor/mcp.json` (create it if missing) and add:
|
|
127
140
|
|
|
128
141
|
```json
|
|
129
142
|
{
|
|
@@ -140,6 +153,24 @@ Open `~/.claude/settings.json` and add:
|
|
|
140
153
|
}
|
|
141
154
|
```
|
|
142
155
|
|
|
156
|
+
#### 2-D. Gemini CLI
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
gemini mcp add -s user \
|
|
160
|
+
-e REDASH_URL=https://your-redash-instance.com \
|
|
161
|
+
-e REDASH_API_KEY=your_api_key_here \
|
|
162
|
+
redash-mcp npx -y redash-mcp
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
#### 2-E. Codex CLI
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
codex mcp add redash-mcp \
|
|
169
|
+
--env REDASH_URL=https://your-redash-instance.com \
|
|
170
|
+
--env REDASH_API_KEY=your_api_key_here \
|
|
171
|
+
-- npx -y redash-mcp
|
|
172
|
+
```
|
|
173
|
+
|
|
143
174
|
> **macOS**: If `npx` is not found, run `which npx` to get the full path and use that instead.
|
|
144
175
|
|
|
145
176
|
---
|
package/dist/index.js
CHANGED
|
@@ -8355,7 +8355,7 @@ import V2 from "node:process";
|
|
|
8355
8355
|
function ee() {
|
|
8356
8356
|
return V2.platform !== "win32" ? V2.env.TERM !== "linux" : !!V2.env.CI || !!V2.env.WT_SESSION || !!V2.env.TERMINUS_SUBLIME || V2.env.ConEmuTask === "{cmd::Cmder}" || V2.env.TERM_PROGRAM === "Terminus-Sublime" || V2.env.TERM_PROGRAM === "vscode" || V2.env.TERM === "xterm-256color" || V2.env.TERM === "alacritty" || V2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
8357
8357
|
}
|
|
8358
|
-
var import_sisteransi2, tt, ot2, w2, Tt, at2, ut2, H, lt, $, x2, _t, xt, z3, U, et2, K2, Y2, Et, st, ct, Gt, $t, dt, Mt, ht2, pt, mt, gt, P, yt, Ot, F, me, ge, ye, Q2, ve, Te, ft, jt, Nt, Pe;
|
|
8358
|
+
var import_sisteransi2, tt, ot2, w2, Tt, at2, ut2, H, lt, $, x2, _t, xt, z3, U, et2, K2, Y2, Et, st, ct, Gt, $t, dt, Mt, ht2, pt, mt, gt, P, yt, Ot, F, R2, me, ge, ye, Q2, ve, Te, ft, jt, Nt, Pe;
|
|
8359
8359
|
var init_dist4 = __esm({
|
|
8360
8360
|
"node_modules/@clack/prompts/dist/index.mjs"() {
|
|
8361
8361
|
init_dist3();
|
|
@@ -8449,6 +8449,32 @@ var init_dist4 = __esm({
|
|
|
8449
8449
|
for (const b2 of m2) for (const G2 of b2) S.push(G2);
|
|
8450
8450
|
return h2 && S.push(l), S;
|
|
8451
8451
|
};
|
|
8452
|
+
R2 = { message: (t = [], { symbol: i = e("gray", $), secondarySymbol: s = e("gray", $), output: r = process.stdout, spacing: u = 1, withGuide: n } = {}) => {
|
|
8453
|
+
const a = [], c = n ?? h.withGuide, o = c ? s : "", l = c ? `${i} ` : "", d = c ? `${s} ` : "";
|
|
8454
|
+
for (let p2 = 0; p2 < u; p2++) a.push(o);
|
|
8455
|
+
const g = Array.isArray(t) ? t : t.split(`
|
|
8456
|
+
`);
|
|
8457
|
+
if (g.length > 0) {
|
|
8458
|
+
const [p2, ...f2] = g;
|
|
8459
|
+
p2.length > 0 ? a.push(`${l}${p2}`) : a.push(c ? i : "");
|
|
8460
|
+
for (const h2 of f2) h2.length > 0 ? a.push(`${d}${h2}`) : a.push(c ? s : "");
|
|
8461
|
+
}
|
|
8462
|
+
r.write(`${a.join(`
|
|
8463
|
+
`)}
|
|
8464
|
+
`);
|
|
8465
|
+
}, info: (t, i) => {
|
|
8466
|
+
R2.message(t, { ...i, symbol: e("blue", ht2) });
|
|
8467
|
+
}, success: (t, i) => {
|
|
8468
|
+
R2.message(t, { ...i, symbol: e("green", pt) });
|
|
8469
|
+
}, step: (t, i) => {
|
|
8470
|
+
R2.message(t, { ...i, symbol: e("green", H) });
|
|
8471
|
+
}, warn: (t, i) => {
|
|
8472
|
+
R2.message(t, { ...i, symbol: e("yellow", mt) });
|
|
8473
|
+
}, warning: (t, i) => {
|
|
8474
|
+
R2.warn(t, i);
|
|
8475
|
+
}, error: (t, i) => {
|
|
8476
|
+
R2.message(t, { ...i, symbol: e("red", gt) });
|
|
8477
|
+
} };
|
|
8452
8478
|
me = (t = "", i) => {
|
|
8453
8479
|
const s = i?.output ?? process.stdout, r = i?.withGuide ?? h.withGuide ? `${e("gray", x2)} ` : "";
|
|
8454
8480
|
s.write(`${r}${e("red", t)}
|
|
@@ -8611,7 +8637,13 @@ ${c}
|
|
|
8611
8637
|
var setup_exports = {};
|
|
8612
8638
|
__export(setup_exports, {
|
|
8613
8639
|
buildClaudeMcpAddArgs: () => buildClaudeMcpAddArgs,
|
|
8614
|
-
|
|
8640
|
+
buildClaudeMcpRemoveArgs: () => buildClaudeMcpRemoveArgs,
|
|
8641
|
+
buildCodexMcpAddArgs: () => buildCodexMcpAddArgs,
|
|
8642
|
+
buildCodexMcpRemoveArgs: () => buildCodexMcpRemoveArgs,
|
|
8643
|
+
buildGeminiMcpAddArgs: () => buildGeminiMcpAddArgs,
|
|
8644
|
+
buildGeminiMcpRemoveArgs: () => buildGeminiMcpRemoveArgs,
|
|
8645
|
+
main: () => main,
|
|
8646
|
+
writeJsonConfig: () => writeJsonConfig
|
|
8615
8647
|
});
|
|
8616
8648
|
import * as fs from "fs";
|
|
8617
8649
|
import * as path3 from "path";
|
|
@@ -8643,6 +8675,35 @@ function getDesktopConfigPath() {
|
|
|
8643
8675
|
return path3.join(os2.homedir(), ".config", "Claude", "claude_desktop_config.json");
|
|
8644
8676
|
}
|
|
8645
8677
|
}
|
|
8678
|
+
function buildGeminiMcpAddArgs(mcpEntry) {
|
|
8679
|
+
return [
|
|
8680
|
+
"mcp",
|
|
8681
|
+
"add",
|
|
8682
|
+
"-s",
|
|
8683
|
+
"user",
|
|
8684
|
+
...Object.entries(mcpEntry.env).flatMap(([key, value]) => ["-e", `${key}=${value}`]),
|
|
8685
|
+
"redash-mcp",
|
|
8686
|
+
mcpEntry.command,
|
|
8687
|
+
...mcpEntry.args
|
|
8688
|
+
];
|
|
8689
|
+
}
|
|
8690
|
+
function buildGeminiMcpRemoveArgs() {
|
|
8691
|
+
return ["mcp", "remove", "-s", "user", "redash-mcp"];
|
|
8692
|
+
}
|
|
8693
|
+
function buildCodexMcpAddArgs(mcpEntry) {
|
|
8694
|
+
return [
|
|
8695
|
+
"mcp",
|
|
8696
|
+
"add",
|
|
8697
|
+
"redash-mcp",
|
|
8698
|
+
...Object.entries(mcpEntry.env).flatMap(([key, value]) => ["--env", `${key}=${value}`]),
|
|
8699
|
+
"--",
|
|
8700
|
+
mcpEntry.command,
|
|
8701
|
+
...mcpEntry.args
|
|
8702
|
+
];
|
|
8703
|
+
}
|
|
8704
|
+
function buildCodexMcpRemoveArgs() {
|
|
8705
|
+
return ["mcp", "remove", "redash-mcp"];
|
|
8706
|
+
}
|
|
8646
8707
|
function buildClaudeMcpAddArgs(mcpEntry) {
|
|
8647
8708
|
return [
|
|
8648
8709
|
"mcp",
|
|
@@ -8662,7 +8723,10 @@ async function main() {
|
|
|
8662
8723
|
message: "Select installation targets (space to select, enter to confirm)",
|
|
8663
8724
|
options: [
|
|
8664
8725
|
{ value: "desktop", label: "Claude Desktop" },
|
|
8665
|
-
{ value: "cli", label: "Claude Code (CLI)" }
|
|
8726
|
+
{ value: "cli", label: "Claude Code (CLI)" },
|
|
8727
|
+
{ value: "cursor", label: "Cursor" },
|
|
8728
|
+
{ value: "gemini", label: "Gemini CLI" },
|
|
8729
|
+
{ value: "codex", label: "Codex CLI" }
|
|
8666
8730
|
],
|
|
8667
8731
|
required: true
|
|
8668
8732
|
});
|
|
@@ -8703,28 +8767,51 @@ async function main() {
|
|
|
8703
8767
|
REDASH_API_KEY: apiKey
|
|
8704
8768
|
}
|
|
8705
8769
|
};
|
|
8706
|
-
const
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
|
|
8710
|
-
|
|
8770
|
+
const registrars = {
|
|
8771
|
+
desktop: { label: "Claude Desktop", run: (entry) => writeJsonConfig(getDesktopConfigPath(), entry) },
|
|
8772
|
+
cli: {
|
|
8773
|
+
label: "Claude Code (CLI)",
|
|
8774
|
+
run: (entry) => registerViaCli("claude", buildClaudeMcpRemoveArgs(), buildClaudeMcpAddArgs(entry))
|
|
8775
|
+
},
|
|
8776
|
+
cursor: { label: "Cursor", run: (entry) => writeJsonConfig(getCursorConfigPath(), entry) },
|
|
8777
|
+
gemini: {
|
|
8778
|
+
label: "Gemini CLI",
|
|
8779
|
+
run: (entry) => registerViaCli("gemini", buildGeminiMcpRemoveArgs(), buildGeminiMcpAddArgs(entry))
|
|
8780
|
+
},
|
|
8781
|
+
codex: {
|
|
8782
|
+
label: "Codex CLI",
|
|
8783
|
+
run: (entry) => registerViaCli("codex", buildCodexMcpRemoveArgs(), buildCodexMcpAddArgs(entry))
|
|
8784
|
+
}
|
|
8785
|
+
};
|
|
8786
|
+
const failed = [];
|
|
8787
|
+
for (const target of targets) {
|
|
8788
|
+
const { label, run } = registrars[target];
|
|
8789
|
+
const s = ft();
|
|
8790
|
+
s.start(`Configuring ${label}...`);
|
|
8791
|
+
try {
|
|
8792
|
+
run(mcpEntry);
|
|
8793
|
+
s.stop(`${label} configured`);
|
|
8794
|
+
} catch (e2) {
|
|
8795
|
+
s.error(`${label} failed`);
|
|
8796
|
+
R2.error(e2?.message ?? String(e2));
|
|
8797
|
+
failed.push(label);
|
|
8798
|
+
}
|
|
8711
8799
|
}
|
|
8712
|
-
if (
|
|
8713
|
-
|
|
8714
|
-
|
|
8715
|
-
|
|
8800
|
+
if (failed.length > 0) {
|
|
8801
|
+
process.exitCode = 1;
|
|
8802
|
+
ye(`Setup finished with errors \u2014 failed: ${failed.join(", ")}`);
|
|
8803
|
+
} else {
|
|
8804
|
+
ye("Setup complete. Restart to start using redash-mcp.");
|
|
8716
8805
|
}
|
|
8717
|
-
ye("Setup complete. Restart to start using redash-mcp.");
|
|
8718
8806
|
}
|
|
8719
|
-
function
|
|
8720
|
-
const configPath = getDesktopConfigPath();
|
|
8807
|
+
function writeJsonConfig(configPath, mcpEntry) {
|
|
8721
8808
|
let config2 = { mcpServers: {} };
|
|
8722
8809
|
if (fs.existsSync(configPath)) {
|
|
8723
8810
|
try {
|
|
8724
8811
|
config2 = JSON.parse(fs.readFileSync(configPath, "utf8"));
|
|
8725
8812
|
config2.mcpServers ??= {};
|
|
8726
8813
|
} catch {
|
|
8727
|
-
throw new Error(`Failed to read
|
|
8814
|
+
throw new Error(`Failed to read config: ${configPath}`);
|
|
8728
8815
|
}
|
|
8729
8816
|
} else {
|
|
8730
8817
|
fs.mkdirSync(path3.dirname(configPath), { recursive: true });
|
|
@@ -8732,14 +8819,24 @@ function setupDesktop(mcpEntry) {
|
|
|
8732
8819
|
config2.mcpServers["redash-mcp"] = mcpEntry;
|
|
8733
8820
|
fs.writeFileSync(configPath, JSON.stringify(config2, null, 2), "utf8");
|
|
8734
8821
|
}
|
|
8735
|
-
function
|
|
8736
|
-
|
|
8822
|
+
function getCursorConfigPath() {
|
|
8823
|
+
return path3.join(os2.homedir(), ".cursor", "mcp.json");
|
|
8824
|
+
}
|
|
8825
|
+
function buildClaudeMcpRemoveArgs() {
|
|
8826
|
+
return ["mcp", "remove", "--scope", "user", "redash-mcp"];
|
|
8827
|
+
}
|
|
8828
|
+
function registerViaCli(bin, removeArgs, addArgs) {
|
|
8737
8829
|
try {
|
|
8738
|
-
execFileSync(
|
|
8830
|
+
execFileSync(bin, removeArgs, { stdio: "pipe" });
|
|
8739
8831
|
} catch {
|
|
8832
|
+
}
|
|
8833
|
+
try {
|
|
8834
|
+
execFileSync(bin, addArgs, { stdio: "pipe" });
|
|
8835
|
+
} catch (e2) {
|
|
8836
|
+
const stderr = e2?.stderr?.toString().trim();
|
|
8740
8837
|
throw new Error(
|
|
8741
|
-
`Failed to run "
|
|
8742
|
-
|
|
8838
|
+
`Failed to run "${bin} mcp add".${stderr ? ` (${stderr})` : ""} Make sure the ${bin} CLI is installed, or run manually:
|
|
8839
|
+
${bin} ${addArgs.join(" ")}`
|
|
8743
8840
|
);
|
|
8744
8841
|
}
|
|
8745
8842
|
}
|
package/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest_version": "0.3",
|
|
3
3
|
"name": "redash-mcp",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.2.0",
|
|
5
5
|
"description": "MCP server for Redash -- query data, manage dashboards, and run SQL with natural language. 24 tools including BIRD SQL methodology.",
|
|
6
6
|
"long_description": "Connects an MCP client to a Redash instance: list data sources, inspect schemas, run SQL, manage saved queries / dashboards / alerts, and use BIRD SQL helpers (smart_query, keyword maps, few-shot examples, feedback, evaluation). Built-in SQL safety guards flag PII access and expensive scans; safety mode can be tuned per install. **Third-party data flow:** if you also set ANTHROPIC_API_KEY in the shell environment, the BIRD smart_query tool may send table-name lists (never query results or row data) to the Anthropic API as a fallback for table selection. Leave ANTHROPIC_API_KEY unset to disable this entirely.",
|
|
7
7
|
"icon": "icon.png",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redash-mcp",
|
|
3
3
|
"mcpName": "io.github.seob717/redash-mcp",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.2.0",
|
|
5
5
|
"description": "MCP server that connects Redash to Claude AI — query data, manage dashboards, and run SQL with natural language, with built-in SQL safety guards.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "seob717",
|
|
@@ -22,7 +22,10 @@
|
|
|
22
22
|
"business-intelligence",
|
|
23
23
|
"dashboard",
|
|
24
24
|
"data-analytics",
|
|
25
|
-
"natural-language"
|
|
25
|
+
"natural-language",
|
|
26
|
+
"cursor",
|
|
27
|
+
"gemini-cli",
|
|
28
|
+
"codex"
|
|
26
29
|
],
|
|
27
30
|
"engines": {
|
|
28
31
|
"node": ">=20"
|