doris-mcp-server 1.0.0 → 1.0.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/LICENSE +17 -17
- package/README.md +101 -101
- package/dist/index.d.ts +2 -0
- package/dist/index.js +249 -1
- package/dist/index.js.map +1 -1
- package/package.json +44 -50
package/LICENSE
CHANGED
|
@@ -1,17 +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.
|
|
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
CHANGED
|
@@ -1,101 +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
|
|
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
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,250 @@
|
|
|
1
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
+
import mysql from "mysql2/promise";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
// Parse CLI args or env vars
|
|
8
|
+
function getConfig() {
|
|
9
|
+
const args = process.argv.slice(2);
|
|
10
|
+
const get = (flag, env, def = "") => {
|
|
11
|
+
const i = args.indexOf(flag);
|
|
12
|
+
return i !== -1 ? args[i + 1] : process.env[env] ?? def;
|
|
13
|
+
};
|
|
14
|
+
return {
|
|
15
|
+
host: get("--db-host", "DORIS_HOST", "127.0.0.1"),
|
|
16
|
+
port: parseInt(get("--db-port", "DORIS_PORT", "9030")),
|
|
17
|
+
user: get("--db-user", "DORIS_USER", "root"),
|
|
18
|
+
password: get("--db-password", "DORIS_PASSWORD", ""),
|
|
19
|
+
database: get("--db-name", "DORIS_DATABASE", ""),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
const config = getConfig();
|
|
23
|
+
async function getConnection() {
|
|
24
|
+
return mysql.createConnection({
|
|
25
|
+
host: config.host,
|
|
26
|
+
port: config.port,
|
|
27
|
+
user: config.user,
|
|
28
|
+
password: config.password,
|
|
29
|
+
database: config.database || undefined,
|
|
30
|
+
connectTimeout: 10000,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async function query(sql, params) {
|
|
34
|
+
const conn = await getConnection();
|
|
35
|
+
try {
|
|
36
|
+
const [rows] = params ? await conn.execute(sql, params) : await conn.execute(sql);
|
|
37
|
+
return rows;
|
|
38
|
+
}
|
|
39
|
+
finally {
|
|
40
|
+
await conn.end();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const server = new Server({ name: "doris-mcp-server", version: "1.0.2" }, { capabilities: { tools: {} } });
|
|
44
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
45
|
+
tools: [
|
|
46
|
+
{
|
|
47
|
+
name: "exec_query",
|
|
48
|
+
description: "Execute a read-only SQL query on Apache Doris",
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: {
|
|
52
|
+
sql: { type: "string", description: "SQL query to execute" },
|
|
53
|
+
database: { type: "string", description: "Database to use (optional)" },
|
|
54
|
+
},
|
|
55
|
+
required: ["sql"],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "get_db_list",
|
|
60
|
+
description: "List all databases in Doris",
|
|
61
|
+
inputSchema: { type: "object", properties: {} },
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "get_db_table_list",
|
|
65
|
+
description: "List all tables in a database",
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: "object",
|
|
68
|
+
properties: {
|
|
69
|
+
database: { type: "string", description: "Database name" },
|
|
70
|
+
},
|
|
71
|
+
required: ["database"],
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "get_table_schema",
|
|
76
|
+
description: "Get the schema (columns) of a table",
|
|
77
|
+
inputSchema: {
|
|
78
|
+
type: "object",
|
|
79
|
+
properties: {
|
|
80
|
+
database: { type: "string", description: "Database name" },
|
|
81
|
+
table: { type: "string", description: "Table name" },
|
|
82
|
+
},
|
|
83
|
+
required: ["database", "table"],
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "get_table_comment",
|
|
88
|
+
description: "Get table and column comments",
|
|
89
|
+
inputSchema: {
|
|
90
|
+
type: "object",
|
|
91
|
+
properties: {
|
|
92
|
+
database: { type: "string", description: "Database name" },
|
|
93
|
+
table: { type: "string", description: "Table name" },
|
|
94
|
+
},
|
|
95
|
+
required: ["database", "table"],
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "get_table_indexes",
|
|
100
|
+
description: "Get indexes of a table",
|
|
101
|
+
inputSchema: {
|
|
102
|
+
type: "object",
|
|
103
|
+
properties: {
|
|
104
|
+
database: { type: "string", description: "Database name" },
|
|
105
|
+
table: { type: "string", description: "Table name" },
|
|
106
|
+
},
|
|
107
|
+
required: ["database", "table"],
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "get_table_partitions",
|
|
112
|
+
description: "Get partition info of a table",
|
|
113
|
+
inputSchema: {
|
|
114
|
+
type: "object",
|
|
115
|
+
properties: {
|
|
116
|
+
database: { type: "string", description: "Database name" },
|
|
117
|
+
table: { type: "string", description: "Table name" },
|
|
118
|
+
},
|
|
119
|
+
required: ["database", "table"],
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: "get_table_status",
|
|
124
|
+
description: "Get table status including row count and size",
|
|
125
|
+
inputSchema: {
|
|
126
|
+
type: "object",
|
|
127
|
+
properties: {
|
|
128
|
+
database: { type: "string", description: "Database name" },
|
|
129
|
+
table: { type: "string", description: "Table name (optional, lists all if omitted)" },
|
|
130
|
+
},
|
|
131
|
+
required: ["database"],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: "explain_query",
|
|
136
|
+
description: "Explain a SQL query execution plan",
|
|
137
|
+
inputSchema: {
|
|
138
|
+
type: "object",
|
|
139
|
+
properties: {
|
|
140
|
+
sql: { type: "string", description: "SQL query to explain" },
|
|
141
|
+
database: { type: "string", description: "Database to use (optional)" },
|
|
142
|
+
},
|
|
143
|
+
required: ["sql"],
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "get_running_queries",
|
|
148
|
+
description: "Get currently running queries in Doris",
|
|
149
|
+
inputSchema: { type: "object", properties: {} },
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: "get_backends",
|
|
153
|
+
description: "Get Doris backend node status",
|
|
154
|
+
inputSchema: { type: "object", properties: {} },
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
}));
|
|
158
|
+
server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
159
|
+
const { name, arguments: args } = req.params;
|
|
160
|
+
try {
|
|
161
|
+
let rows;
|
|
162
|
+
switch (name) {
|
|
163
|
+
case "exec_query": {
|
|
164
|
+
const { sql, database } = z.object({ sql: z.string(), database: z.string().optional() }).parse(args);
|
|
165
|
+
if (database)
|
|
166
|
+
await query(`USE \`${database}\``);
|
|
167
|
+
rows = await query(sql);
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
case "get_db_list":
|
|
171
|
+
rows = await query("SELECT SCHEMA_NAME as db_name FROM information_schema.SCHEMATA ORDER BY SCHEMA_NAME");
|
|
172
|
+
break;
|
|
173
|
+
case "get_db_table_list": {
|
|
174
|
+
const { database } = z.object({ database: z.string() }).parse(args);
|
|
175
|
+
rows = await query("SELECT TABLE_NAME as `Table` FROM information_schema.TABLES WHERE TABLE_SCHEMA = ? ORDER BY TABLE_NAME", [database]);
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
case "get_table_schema": {
|
|
179
|
+
const { database, table } = z.object({ database: z.string(), table: z.string() }).parse(args);
|
|
180
|
+
rows = await query(`DESCRIBE \`${database}\`.\`${table}\``);
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
case "get_table_comment": {
|
|
184
|
+
const { database, table } = z.object({ database: z.string(), table: z.string() }).parse(args);
|
|
185
|
+
rows = await query(`SELECT COLUMN_NAME, COLUMN_COMMENT, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT
|
|
186
|
+
FROM information_schema.COLUMNS
|
|
187
|
+
WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ?
|
|
188
|
+
ORDER BY ORDINAL_POSITION`, [database, table]);
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
case "get_table_indexes": {
|
|
192
|
+
const { database, table } = z.object({ database: z.string(), table: z.string() }).parse(args);
|
|
193
|
+
rows = await query(`SELECT INDEX_NAME, COLUMN_NAME, INDEX_TYPE, NON_UNIQUE
|
|
194
|
+
FROM information_schema.STATISTICS
|
|
195
|
+
WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ?
|
|
196
|
+
ORDER BY INDEX_NAME, SEQ_IN_INDEX`, [database, table]);
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
case "get_table_partitions": {
|
|
200
|
+
const { database, table } = z.object({ database: z.string(), table: z.string() }).parse(args);
|
|
201
|
+
rows = await query(`SHOW PARTITIONS FROM \`${database}\`.\`${table}\``);
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
case "get_table_status": {
|
|
205
|
+
const { database, table } = z.object({ database: z.string(), table: z.string().optional() }).parse(args);
|
|
206
|
+
const sql = table
|
|
207
|
+
? `SELECT TABLE_NAME, TABLE_ROWS, DATA_LENGTH, INDEX_LENGTH, TABLE_COMMENT, CREATE_TIME
|
|
208
|
+
FROM information_schema.TABLES WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ?`
|
|
209
|
+
: `SELECT TABLE_NAME, TABLE_ROWS, DATA_LENGTH, INDEX_LENGTH, TABLE_COMMENT, CREATE_TIME
|
|
210
|
+
FROM information_schema.TABLES WHERE TABLE_SCHEMA = ? ORDER BY TABLE_NAME`;
|
|
211
|
+
rows = table ? await query(sql, [database, table]) : await query(sql, [database]);
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
case "explain_query": {
|
|
215
|
+
const { sql, database } = z.object({ sql: z.string(), database: z.string().optional() }).parse(args);
|
|
216
|
+
if (database)
|
|
217
|
+
await query(`USE \`${database}\``);
|
|
218
|
+
rows = await query(`EXPLAIN ${sql}`);
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
case "get_running_queries":
|
|
222
|
+
rows = await query("SHOW PROC '/current_queries'");
|
|
223
|
+
break;
|
|
224
|
+
case "get_backends":
|
|
225
|
+
rows = await query("SHOW BACKENDS");
|
|
226
|
+
break;
|
|
227
|
+
default:
|
|
228
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
229
|
+
}
|
|
230
|
+
return {
|
|
231
|
+
content: [{ type: "text", text: JSON.stringify(rows, null, 2) }],
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
catch (err) {
|
|
235
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
236
|
+
return {
|
|
237
|
+
content: [{ type: "text", text: `Error: ${msg}` }],
|
|
238
|
+
isError: true,
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
async function main() {
|
|
243
|
+
const transport = new StdioServerTransport();
|
|
244
|
+
await server.connect(transport);
|
|
245
|
+
}
|
|
246
|
+
main().catch((err) => {
|
|
247
|
+
console.error(err);
|
|
248
|
+
process.exit(1);
|
|
249
|
+
});
|
|
2
250
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,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K,CAAC,eAAe,CAAC,CAAC;gBACpC,MAAM;YACR;gBACE,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;QAC7C,CAAC;QAED,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACjE,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,EAAE,EAAE,CAAC;YAClD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,50 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "doris-mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Apache Doris MCP Server - TypeScript implementation using MySQL protocol",
|
|
5
|
-
"keywords": [
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
"scripts": {
|
|
47
|
-
"build": "tsc",
|
|
48
|
-
"start": "tsx src/index.ts"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "doris-mcp-server",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Apache Doris MCP Server - TypeScript implementation using MySQL protocol",
|
|
5
|
+
"keywords": ["doris", "mcp", "model-context-protocol", "database", "analytics", "sql"],
|
|
6
|
+
"author": "iakuf",
|
|
7
|
+
"license": "Apache-2.0",
|
|
8
|
+
"homepage": "https://github.com/iakuf/doris-mcp-server-ts#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/iakuf/doris-mcp-server-ts.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/iakuf/doris-mcp-server-ts/issues"
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"main": "dist/index.js",
|
|
18
|
+
"bin": {
|
|
19
|
+
"doris-mcp-server": "dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"README.md",
|
|
24
|
+
"LICENSE"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsc",
|
|
28
|
+
"start": "tsx src/index.ts",
|
|
29
|
+
"prepublishOnly": "pnpm run build"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
33
|
+
"mysql2": "^3.14.0",
|
|
34
|
+
"zod": "^3.24.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "^22.0.0",
|
|
38
|
+
"tsx": "^4.19.0",
|
|
39
|
+
"typescript": "^5.7.0"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=18.0.0"
|
|
43
|
+
}
|
|
44
|
+
}
|