doris-mcp-server 1.0.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/LICENSE +17 -0
- package/README.md +101 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +50 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
Copyright 2024 doris-mcp-server-ts contributors
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# doris-mcp-server
|
|
2
|
+
|
|
3
|
+
Apache Doris MCP Server implemented in TypeScript.
|
|
4
|
+
|
|
5
|
+
Connects to Apache Doris via the MySQL-compatible protocol (port 9030) and exposes the same tool interface as the official [apache/doris-mcp-server](https://github.com/apache/doris-mcp-server), with zero Python dependencies.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- Node.js >= 18
|
|
10
|
+
- Apache Doris (any version with MySQL protocol enabled, default port 9030)
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install -g doris-mcp-server
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
### Stdio mode (for MCP clients like Cursor, Kiro, Claude Desktop)
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
doris-mcp-server \
|
|
24
|
+
--db-host 127.0.0.1 \
|
|
25
|
+
--db-port 9030 \
|
|
26
|
+
--db-user root \
|
|
27
|
+
--db-password your_password
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Environment variables
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
export DORIS_HOST=127.0.0.1
|
|
34
|
+
export DORIS_PORT=9030
|
|
35
|
+
export DORIS_USER=root
|
|
36
|
+
export DORIS_PASSWORD=your_password
|
|
37
|
+
export DORIS_DATABASE=information_schema
|
|
38
|
+
|
|
39
|
+
doris-mcp-server
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### MCP client configuration (Kiro / Cursor)
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"mcpServers": {
|
|
47
|
+
"doris": {
|
|
48
|
+
"command": "doris-mcp-server",
|
|
49
|
+
"args": [
|
|
50
|
+
"--db-host", "127.0.0.1",
|
|
51
|
+
"--db-port", "9030",
|
|
52
|
+
"--db-user", "root",
|
|
53
|
+
"--db-password", "your_password"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Available Tools
|
|
61
|
+
|
|
62
|
+
| Tool | Description |
|
|
63
|
+
|------|-------------|
|
|
64
|
+
| `exec_query` | Execute a SQL query and return results as JSON |
|
|
65
|
+
| `get_catalog_list` | List all catalogs |
|
|
66
|
+
| `get_db_list` | List all databases |
|
|
67
|
+
| `get_db_table_list` | List all tables in a database |
|
|
68
|
+
| `get_table_schema` | Get column definitions for a table |
|
|
69
|
+
| `get_table_comment` | Get the table-level comment |
|
|
70
|
+
| `get_table_column_comments` | Get comments for all columns in a table |
|
|
71
|
+
| `get_table_indexes` | Get index information for a table |
|
|
72
|
+
| `get_recent_audit_logs` | Query recent audit log records |
|
|
73
|
+
| `get_sql_explain` | Get the execution plan for a SQL query |
|
|
74
|
+
| `get_table_data_size` | Get data size information for a table or database |
|
|
75
|
+
|
|
76
|
+
All metadata tools support optional `db_name` and `catalog_name` parameters for multi-catalog environments.
|
|
77
|
+
|
|
78
|
+
## Command Line Arguments
|
|
79
|
+
|
|
80
|
+
| Argument | Description | Default |
|
|
81
|
+
|----------|-------------|---------|
|
|
82
|
+
| `--db-host` | Doris FE host | `127.0.0.1` |
|
|
83
|
+
| `--db-port` | Doris MySQL port | `9030` |
|
|
84
|
+
| `--db-user` | Database username | `root` |
|
|
85
|
+
| `--db-password` | Database password | _(empty)_ |
|
|
86
|
+
| `--db-database` | Default database | `information_schema` |
|
|
87
|
+
|
|
88
|
+
## Comparison with official Python server
|
|
89
|
+
|
|
90
|
+
| Feature | This package | apache/doris-mcp-server |
|
|
91
|
+
|---------|-------------|------------------------|
|
|
92
|
+
| Language | TypeScript / Node.js | Python |
|
|
93
|
+
| Transport | stdio | stdio + HTTP |
|
|
94
|
+
| Core query tools | All 11 | All 11+ |
|
|
95
|
+
| Advanced analytics | No | Yes (7 tools) |
|
|
96
|
+
| ADBC / Arrow Flight | No | Yes |
|
|
97
|
+
| Zero extra runtime | Yes (Node.js only) | No (Python 3.12+) |
|
|
98
|
+
|
|
99
|
+
## License
|
|
100
|
+
|
|
101
|
+
Apache 2.0
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "doris-mcp-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Apache Doris MCP Server - TypeScript implementation using MySQL protocol",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"doris",
|
|
7
|
+
"mcp",
|
|
8
|
+
"model-context-protocol",
|
|
9
|
+
"database",
|
|
10
|
+
"analytics",
|
|
11
|
+
"sql"
|
|
12
|
+
],
|
|
13
|
+
"author": "iakuf",
|
|
14
|
+
"license": "Apache-2.0",
|
|
15
|
+
"homepage": "https://github.com/iakuf/doris-mcp-server-ts#readme",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/iakuf/doris-mcp-server-ts.git"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/iakuf/doris-mcp-server-ts/issues"
|
|
22
|
+
},
|
|
23
|
+
"type": "module",
|
|
24
|
+
"main": "dist/index.js",
|
|
25
|
+
"bin": {
|
|
26
|
+
"doris-mcp-server": "dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"README.md",
|
|
31
|
+
"LICENSE"
|
|
32
|
+
],
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
35
|
+
"mysql2": "^3.14.0",
|
|
36
|
+
"zod": "^3.24.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^22.0.0",
|
|
40
|
+
"tsx": "^4.19.0",
|
|
41
|
+
"typescript": "^5.7.0"
|
|
42
|
+
},
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=18.0.0"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "tsc",
|
|
48
|
+
"start": "tsx src/index.ts"
|
|
49
|
+
}
|
|
50
|
+
}
|