redash-mcp 2.2.1 → 2.2.2

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.ko.md ADDED
@@ -0,0 +1,142 @@
1
+ # redash-mcp
2
+
3
+ [Redash](https://redash.io)를 Claude AI에 연결하는 MCP 서버 — 자연어로 데이터를 조회하고 대시보드를 관리하세요.
4
+
5
+ **[English Documentation](README.md)**
6
+
7
+ ---
8
+
9
+ ## 기능
10
+
11
+ ### 툴 목록
12
+
13
+ | 카테고리 | 툴 | 설명 |
14
+ |---|---|---|
15
+ | 데이터소스 | `list_data_sources` | 연결된 데이터소스 목록 조회 |
16
+ | 스키마 | `list_tables` | 테이블 목록 조회 (키워드 검색 가능) |
17
+ | 스키마 | `get_table_columns` | 테이블 컬럼명 및 타입 조회 |
18
+ | 쿼리 실행 | `run_query` | SQL 직접 실행 후 결과 반환 |
19
+ | 저장 쿼리 | `list_queries` | 저장된 쿼리 목록 조회 |
20
+ | 저장 쿼리 | `get_query` | 쿼리 상세 정보 (SQL, 시각화 등) 조회 |
21
+ | 저장 쿼리 | `get_query_result` | 저장된 쿼리 실행 결과 조회 |
22
+ | 저장 쿼리 | `create_query` | 새 쿼리 저장 |
23
+ | 저장 쿼리 | `update_query` | 쿼리 수정 |
24
+ | 저장 쿼리 | `fork_query` | 쿼리 복제 |
25
+ | 저장 쿼리 | `archive_query` | 쿼리 삭제 (아카이브) |
26
+ | 대시보드 | `list_dashboards` | 대시보드 목록 조회 |
27
+ | 대시보드 | `get_dashboard` | 대시보드 상세 및 위젯 목록 조회 |
28
+ | 대시보드 | `create_dashboard` | 새 대시보드 생성 |
29
+ | 대시보드 | `add_widget` | 대시보드에 시각화 위젯 추가 |
30
+ | 알림 | `list_alerts` | 알림 목록 조회 |
31
+ | 알림 | `get_alert` | 알림 상세 정보 조회 |
32
+ | 알림 | `create_alert` | 새 알림 생성 |
33
+
34
+ ### SQL 안전 가드
35
+
36
+ 위험한 쿼리로부터 데이터베이스를 보호합니다:
37
+
38
+ - **항상 차단**: `DROP`, `TRUNCATE`, `ALTER TABLE`, `GRANT/REVOKE`, `WHERE` 없는 `DELETE/UPDATE`
39
+ - **경고 (warn 모드)** / **차단 (strict 모드)**: `SELECT *`, `WHERE`·`LIMIT` 없는 쿼리, PII 컬럼 접근
40
+ - **자동 LIMIT**: `REDASH_AUTO_LIMIT` 설정 시 LIMIT 없는 쿼리에 자동으로 `LIMIT N` 추가
41
+
42
+ ### 쿼리 캐시
43
+
44
+ 중복 API 호출을 줄이기 위해 결과를 메모리에 캐싱합니다:
45
+
46
+ - TTL: `REDASH_MCP_CACHE_TTL` 환경변수로 설정 (기본값: 300초)
47
+ - 최대 메모리: `REDASH_MCP_CACHE_MAX_MB` 환경변수로 설정 (기본값: 50MB)
48
+
49
+ ---
50
+
51
+ ## 설치
52
+
53
+ ### 자동 설치 (권장)
54
+
55
+ ```bash
56
+ npx redash-mcp setup
57
+ ```
58
+
59
+ 설치 마법사가 실행되며 Claude Desktop, Claude Code(CLI), 또는 둘 다 선택하여 설정할 수 있습니다.
60
+
61
+ ### 수동 설치
62
+
63
+ #### 1. Redash API 키 발급
64
+
65
+ Redash → 우측 상단 프로필 → **Edit Profile** → **API Key** 복사
66
+
67
+ #### 2-A. Claude Desktop 설정
68
+
69
+ `~/Library/Application Support/Claude/claude_desktop_config.json` 파일을 열고 아래 내용을 추가합니다:
70
+
71
+ ```json
72
+ {
73
+ "mcpServers": {
74
+ "redash-mcp": {
75
+ "command": "npx",
76
+ "args": ["-y", "redash-mcp"],
77
+ "env": {
78
+ "REDASH_URL": "https://your-redash-instance.com",
79
+ "REDASH_API_KEY": "your_api_key_here"
80
+ }
81
+ }
82
+ }
83
+ }
84
+ ```
85
+
86
+ 저장 후 Claude Desktop을 완전히 종료했다가 다시 시작합니다.
87
+
88
+ #### 2-B. Claude Code (CLI) 설정
89
+
90
+ `~/.claude/settings.json` 파일을 열고 아래 내용을 추가합니다:
91
+
92
+ ```json
93
+ {
94
+ "mcpServers": {
95
+ "redash-mcp": {
96
+ "command": "npx",
97
+ "args": ["-y", "redash-mcp"],
98
+ "env": {
99
+ "REDASH_URL": "https://your-redash-instance.com",
100
+ "REDASH_API_KEY": "your_api_key_here"
101
+ }
102
+ }
103
+ }
104
+ }
105
+ ```
106
+
107
+ > **macOS**: `npx`를 못 찾는 경우 `which npx` 명령어로 전체 경로를 확인 후 대체하세요.
108
+
109
+ ---
110
+
111
+ ## 환경 변수
112
+
113
+ ### 필수
114
+
115
+ | 변수 | 설명 |
116
+ |---|---|
117
+ | `REDASH_URL` | Redash 인스턴스 URL (예: `https://redash.example.com`) |
118
+ | `REDASH_API_KEY` | Redash 사용자 API 키 |
119
+
120
+ ### 선택
121
+
122
+ | 변수 | 기본값 | 설명 |
123
+ |---|---|---|
124
+ | `REDASH_SAFETY_MODE` | `warn` | SQL 안전 수준: `off` / `warn` / `strict` |
125
+ | `REDASH_SAFETY_DISABLE_PII` | `false` | PII 감지 비활성화 |
126
+ | `REDASH_SAFETY_DISABLE_COST` | `false` | 비용 경고 비활성화 |
127
+ | `REDASH_AUTO_LIMIT` | `0` | LIMIT 없는 쿼리에 자동으로 `LIMIT N` 추가 (0 = 비활성화) |
128
+ | `REDASH_DEFAULT_MAX_AGE` | `0` | Redash 캐시 TTL (초) |
129
+ | `REDASH_MCP_CACHE_TTL` | `300` | MCP 쿼리 캐시 TTL (초, 0 = 비활성화) |
130
+ | `REDASH_MCP_CACHE_MAX_MB` | `50` | MCP 쿼리 캐시 최대 메모리 (MB) |
131
+
132
+ ---
133
+
134
+ ## 사용 예시
135
+
136
+ Claude에게 자연어로 요청하면 됩니다:
137
+
138
+ - "users 테이블 컬럼 보여줘"
139
+ - "최근 7일 주문 수를 SQL로 조회해줘"
140
+ - "저장된 쿼리 목록 보여줘"
141
+ - "매출 대시보드 위젯 목록 알려줘"
142
+ - "일별 가입자 수가 100명 이하로 떨어지면 알림 만들어줘"
package/README.md CHANGED
@@ -1,49 +1,72 @@
1
1
  # redash-mcp
2
2
 
3
- [Redash](https://redash.io) Claude AI에서 직접 조회하고 관리할 있는 MCP(Model Context Protocol) 서버입니다.
3
+ MCP server that connects [Redash](https://redash.io) to Claude AI query data, manage dashboards, and run SQL with natural language.
4
4
 
5
- ## 기능
5
+ **[한국어 문서](README.ko.md)**
6
6
 
7
- | 카테고리 | 툴 | 설명 |
7
+ ---
8
+
9
+ ## Features
10
+
11
+ ### Tools
12
+
13
+ | Category | Tool | Description |
8
14
  |---|---|---|
9
- | 데이터소스 | `list_data_sources` | 연결된 데이터소스 목록 조회 |
10
- | 스키마 | `list_tables` | 테이블 목록 조회 (키워드 검색 가능) |
11
- | 스키마 | `get_table_columns` | 테이블 컬럼명/타입 조회 |
12
- | 쿼리 실행 | `run_query` | SQL 직접 실행 결과 반환 |
13
- | 저장 쿼리 | `list_queries` | 저장된 쿼리 목록 조회 |
14
- | 저장 쿼리 | `get_query` | 쿼리 상세 정보(SQL, 시각화 등) 조회 |
15
- | 저장 쿼리 | `get_query_result` | 저장된 쿼리 실행 결과 조회 |
16
- | 저장 쿼리 | `create_query` | 쿼리 저장 |
17
- | 저장 쿼리 | `update_query` | 쿼리 수정 |
18
- | 저장 쿼리 | `fork_query` | 쿼리 복제 |
19
- | 저장 쿼리 | `archive_query` | 쿼리 삭제 |
20
- | 대시보드 | `list_dashboards` | 대시보드 목록 조회 |
21
- | 대시보드 | `get_dashboard` | 대시보드 상세 위젯 목록 조회 |
22
- | 대시보드 | `create_dashboard` | 대시보드 생성 |
23
- | 대시보드 | `add_widget` | 대시보드에 시각화 위젯 추가 |
24
- | 알림 | `list_alerts` | 알림 목록 조회 |
25
- | 알림 | `get_alert` | 알림 상세 정보 조회 |
26
- | 알림 | `create_alert` | 알림 생성 |
27
-
28
- ## 설치
29
-
30
- ### 자동 설치 (권장)
15
+ | Data Sources | `list_data_sources` | List connected data sources |
16
+ | Schema | `list_tables` | List tables (supports keyword search) |
17
+ | Schema | `get_table_columns` | Get column names and types |
18
+ | Query | `run_query` | Execute SQL and return results |
19
+ | Saved Queries | `list_queries` | List saved queries |
20
+ | Saved Queries | `get_query` | Get query details (SQL, visualizations) |
21
+ | Saved Queries | `get_query_result` | Run a saved query and get results |
22
+ | Saved Queries | `create_query` | Save a new query |
23
+ | Saved Queries | `update_query` | Update a saved query |
24
+ | Saved Queries | `fork_query` | Fork a saved query |
25
+ | Saved Queries | `archive_query` | Archive (delete) a query |
26
+ | Dashboards | `list_dashboards` | List dashboards |
27
+ | Dashboards | `get_dashboard` | Get dashboard details and widgets |
28
+ | Dashboards | `create_dashboard` | Create a new dashboard |
29
+ | Dashboards | `add_widget` | Add a visualization widget to a dashboard |
30
+ | Alerts | `list_alerts` | List alerts |
31
+ | Alerts | `get_alert` | Get alert details |
32
+ | Alerts | `create_alert` | Create a new alert |
33
+
34
+ ### SQL Safety Guard
35
+
36
+ Protects your database from dangerous queries:
37
+
38
+ - **Blocked always**: `DROP`, `TRUNCATE`, `ALTER TABLE`, `GRANT/REVOKE`, `DELETE/UPDATE` without `WHERE`
39
+ - **Warned (warn mode)** / **Blocked (strict mode)**: `SELECT *`, queries without `WHERE` or `LIMIT`, PII column access
40
+ - **Auto-LIMIT**: Automatically appends `LIMIT N` when `REDASH_AUTO_LIMIT` is set
41
+
42
+ ### Query Cache
43
+
44
+ Results are cached in-memory to reduce redundant API calls:
45
+
46
+ - TTL: configurable via `REDASH_MCP_CACHE_TTL` (default: 300s)
47
+ - Max memory: configurable via `REDASH_MCP_CACHE_MAX_MB` (default: 50MB)
48
+
49
+ ---
50
+
51
+ ## Installation
52
+
53
+ ### Auto Setup (Recommended)
31
54
 
32
55
  ```bash
33
56
  npx redash-mcp setup
34
57
  ```
35
58
 
36
- 설치 마법사가 실행되며 Claude Desktop, Claude Code(CLI), 또는 둘 다 선택하여 설정할 수 있습니다.
59
+ The setup wizard will guide you through configuring Claude Desktop, Claude Code (CLI), or both.
37
60
 
38
- ### 수동 설치
61
+ ### Manual Setup
39
62
 
40
- #### 1. Redash API 키 발급
63
+ #### 1. Get your Redash API Key
41
64
 
42
- Redash → 우측 상단 프로필 → **Edit Profile** → **API Key** 복사
65
+ Go to Redash → Profile (top right) → **Edit Profile** → Copy **API Key**
43
66
 
44
- #### 2-A. Claude Desktop 설정
67
+ #### 2-A. Claude Desktop
45
68
 
46
- `~/Library/Application Support/Claude/claude_desktop_config.json` 파일을 열고 아래 내용을 추가합니다:
69
+ Open `~/Library/Application Support/Claude/claude_desktop_config.json` and add:
47
70
 
48
71
  ```json
49
72
  {
@@ -60,11 +83,11 @@ Redash → 우측 상단 프로필 → **Edit Profile** → **API Key** 복사
60
83
  }
61
84
  ```
62
85
 
63
- 설정 저장 Claude Desktop 완전히 종료했다가 다시 시작합니다.
86
+ Fully quit and restart Claude Desktop after saving.
64
87
 
65
- #### 2-B. Claude Code (CLI) 설정
88
+ #### 2-B. Claude Code (CLI)
66
89
 
67
- `~/.claude/settings.json` 파일을 열고 아래 내용을 추가합니다:
90
+ Open `~/.claude/settings.json` and add:
68
91
 
69
92
  ```json
70
93
  {
@@ -81,23 +104,39 @@ Redash → 우측 상단 프로필 → **Edit Profile** → **API Key** 복사
81
104
  }
82
105
  ```
83
106
 
84
- Claude Code 세션에서 바로 사용할 있습니다.
107
+ > **macOS**: If `npx` is not found, run `which npx` to get the full path and use that instead.
85
108
 
86
- > **Windows/Linux**: `command`를 `npx`로 그대로 사용하면 됩니다.
87
- > **macOS**: `npx`를 못 찾는 경우 `which npx` 명령어로 전체 경로를 확인 후 대체하세요.
109
+ ---
88
110
 
89
- ## 환경 변수
111
+ ## Environment Variables
90
112
 
91
- | 변수 | 필수 | 설명 |
113
+ ### Required
114
+
115
+ | Variable | Description |
116
+ |---|---|
117
+ | `REDASH_URL` | Redash instance URL (e.g. `https://redash.example.com`) |
118
+ | `REDASH_API_KEY` | Redash user API key |
119
+
120
+ ### Optional
121
+
122
+ | Variable | Default | Description |
92
123
  |---|---|---|
93
- | `REDASH_URL` | | Redash 인스턴스 URL (예: `https://redash.example.com`) |
94
- | `REDASH_API_KEY` | | Redash 사용자 API |
124
+ | `REDASH_SAFETY_MODE` | `warn` | SQL safety level: `off` / `warn` / `strict` |
125
+ | `REDASH_SAFETY_DISABLE_PII` | `false` | Disable PII detection |
126
+ | `REDASH_SAFETY_DISABLE_COST` | `false` | Disable cost warnings |
127
+ | `REDASH_AUTO_LIMIT` | `0` | Auto-append `LIMIT N` to queries without one (0 = disabled) |
128
+ | `REDASH_DEFAULT_MAX_AGE` | `0` | Redash cache TTL in seconds |
129
+ | `REDASH_MCP_CACHE_TTL` | `300` | MCP query cache TTL in seconds (0 = disabled) |
130
+ | `REDASH_MCP_CACHE_MAX_MB` | `50` | Max memory for MCP query cache in MB |
131
+
132
+ ---
95
133
 
96
- ## 사용 예시
134
+ ## Usage Examples
97
135
 
98
- Claude에게 자연어로 요청하면 됩니다:
136
+ Just ask Claude in natural language:
99
137
 
100
- - "Redash에서 users 테이블 컬럼 보여줘"
101
- - "최근 7일 주문 수를 SQL로 조회해줘"
102
- - "저장된 쿼리 목록 보여줘"
103
- - "매출 대시보드 위젯 목록 알려줘"
138
+ - "Show me the columns in the users table"
139
+ - "Run a query to get order counts for the last 7 days"
140
+ - "List all saved queries"
141
+ - "Show widgets in the revenue dashboard"
142
+ - "Create an alert when daily signups drop below 100"
package/dist/setup.js CHANGED
@@ -76,65 +76,6 @@ export async function main() {
76
76
  p.cancel("설치가 취소되었습니다.");
77
77
  process.exit(0);
78
78
  }
79
- // ── 안전 모드 설정 ────────────────────────────────────────────────────────
80
- const safetyMode = await p.select({
81
- message: "SQL 안전 모드를 선택하세요",
82
- options: [
83
- { value: "warn", label: "warn — 위험 쿼리 경고 후 실행 (권장)" },
84
- { value: "strict", label: "strict — 위험 쿼리 차단" },
85
- { value: "off", label: "off — 제한 없음 (관리자 전용)" },
86
- ],
87
- initialValue: "warn",
88
- });
89
- if (p.isCancel(safetyMode)) {
90
- p.cancel("설치가 취소되었습니다.");
91
- process.exit(0);
92
- }
93
- const autoLimitRaw = await p.text({
94
- message: "자동 LIMIT 값을 입력하세요 (0 = 비활성화)",
95
- placeholder: "1000",
96
- initialValue: "1000",
97
- validate(value) {
98
- if (!value)
99
- return undefined;
100
- if (isNaN(parseInt(value, 10)))
101
- return "숫자를 입력해주세요.";
102
- },
103
- });
104
- if (p.isCancel(autoLimitRaw)) {
105
- p.cancel("설치가 취소되었습니다.");
106
- process.exit(0);
107
- }
108
- const defaultMaxAgeRaw = await p.text({
109
- message: "Redash 캐시 유지 시간을 입력하세요 (초, 0 = 항상 새로 실행)",
110
- placeholder: "600",
111
- initialValue: "600",
112
- validate(value) {
113
- if (!value)
114
- return undefined;
115
- if (isNaN(parseInt(value, 10)))
116
- return "숫자를 입력해주세요.";
117
- },
118
- });
119
- if (p.isCancel(defaultMaxAgeRaw)) {
120
- p.cancel("설치가 취소되었습니다.");
121
- process.exit(0);
122
- }
123
- const mcpCacheTtlRaw = await p.text({
124
- message: "MCP 레이어 캐시 TTL을 입력하세요 (초, 0 = 비활성화)",
125
- placeholder: "300",
126
- initialValue: "300",
127
- validate(value) {
128
- if (!value)
129
- return undefined;
130
- if (isNaN(parseInt(value, 10)))
131
- return "숫자를 입력해주세요.";
132
- },
133
- });
134
- if (p.isCancel(mcpCacheTtlRaw)) {
135
- p.cancel("설치가 취소되었습니다.");
136
- process.exit(0);
137
- }
138
79
  const url = redashUrl.replace(/\/$/, "");
139
80
  const npxPath = findNpxPath();
140
81
  const mcpEntry = {
@@ -143,10 +84,6 @@ export async function main() {
143
84
  env: {
144
85
  REDASH_URL: url,
145
86
  REDASH_API_KEY: apiKey,
146
- REDASH_SAFETY_MODE: String(safetyMode),
147
- REDASH_AUTO_LIMIT: String(autoLimitRaw || "1000"),
148
- REDASH_DEFAULT_MAX_AGE: String(defaultMaxAgeRaw || "600"),
149
- REDASH_MCP_CACHE_TTL: String(mcpCacheTtlRaw || "300"),
150
87
  },
151
88
  };
152
89
  const s = p.spinner();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redash-mcp",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "MCP server for Redash",
5
5
  "repository": {
6
6
  "type": "git",