@youcloud/mantis-mcp 1.0.1 → 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/README.md +21 -7
- package/docs/clients.md +3 -3
- package/docs/configuration.md +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -2,21 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
内部研发团队使用的 MantisBT MCP 服务,通过 stdio 为 Coding Agent 提供缺陷查询、修复登记、附件上传和可恢复的工作流操作。
|
|
4
4
|
|
|
5
|
-
项目与问题反馈:[内部 GitLab](https://git.umlife.net/ai-tools/mantis-mcp)。npm
|
|
5
|
+
项目与问题反馈:[内部 GitLab](https://git.umlife.net/ai-tools/mantis-mcp)。npm 包:[@youcloud/mantis-mcp](https://www.npmjs.com/package/@youcloud/mantis-mcp)。
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 开始使用
|
|
8
8
|
|
|
9
|
-
需要 Node.js
|
|
9
|
+
需要 Node.js ≥ 22(至少 22.12),并准备 MantisBT API 令牌(在“我的账户 → 个人资料 → API令牌”下创建)。
|
|
10
10
|
|
|
11
|
+
### CodeX
|
|
11
12
|
```bash
|
|
12
|
-
|
|
13
|
+
codex mcp add mantis \
|
|
14
|
+
--env MANTIS_API_KEY="$MANTIS_API_KEY" \
|
|
15
|
+
-- npx -y @youcloud/mantis-mcp@latest
|
|
13
16
|
```
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
### Claude Code
|
|
19
|
+
```bash
|
|
20
|
+
# Claude Code 不加 --scope user 时,默认仅在添加时所在的项目中生效
|
|
21
|
+
claude mcp add --scope user mantis \
|
|
22
|
+
--env MANTIS_API_KEY="$MANTIS_API_KEY" \
|
|
23
|
+
-- npx -y @youcloud/mantis-mcp@latest
|
|
24
|
+
```
|
|
16
25
|
|
|
17
|
-
|
|
26
|
+
### 全局安装
|
|
27
|
+
```bash
|
|
28
|
+
npm install -g @youcloud/mantis-mcp
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### 自定义配置
|
|
18
32
|
|
|
19
|
-
1. 在 Mantis 生成个人 API Key,通过 `MANTIS_API_KEY` 传入;默认连接内部 Mantis
|
|
33
|
+
1. 在 Mantis 生成个人 API Key,通过 `MANTIS_API_KEY` 传入;默认连接内部 Mantis,详见[服务配置](docs/configuration.md)。
|
|
20
34
|
2. 按[客户端接入](docs/clients.md)配置 Codex、Claude Code、Cursor 或 Trae。
|
|
21
35
|
3. 调用 `get_project_context({})` 确认当前身份与可见项目,再按[调用手册](docs/cookbook.md)查询和处理缺陷。
|
|
22
36
|
|
package/docs/clients.md
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
```toml
|
|
25
25
|
[mcp_servers.mantis]
|
|
26
26
|
command = "npx"
|
|
27
|
-
args = ["-y", "@youcloud/mantis-mcp@
|
|
27
|
+
args = ["-y", "@youcloud/mantis-mcp@latest"]
|
|
28
28
|
env_vars = ["MANTIS_API_KEY"]
|
|
29
29
|
startup_timeout_sec = 60
|
|
30
30
|
tool_timeout_sec = 180
|
|
@@ -42,7 +42,7 @@ tool_timeout_sec = 180
|
|
|
42
42
|
"mantis": {
|
|
43
43
|
"type": "stdio",
|
|
44
44
|
"command": "npx",
|
|
45
|
-
"args": ["-y", "@youcloud/mantis-mcp@
|
|
45
|
+
"args": ["-y", "@youcloud/mantis-mcp@latest"],
|
|
46
46
|
"env": {
|
|
47
47
|
"MANTIS_API_KEY": "${MANTIS_API_KEY}"
|
|
48
48
|
}
|
|
@@ -63,7 +63,7 @@ tool_timeout_sec = 180
|
|
|
63
63
|
"mantis": {
|
|
64
64
|
"type": "stdio",
|
|
65
65
|
"command": "npx",
|
|
66
|
-
"args": ["-y", "@youcloud/mantis-mcp@
|
|
66
|
+
"args": ["-y", "@youcloud/mantis-mcp@latest"],
|
|
67
67
|
"env": {
|
|
68
68
|
"MANTIS_API_KEY": "${env:MANTIS_API_KEY}"
|
|
69
69
|
}
|
package/docs/configuration.md
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
| 变量 | 用途与默认值 |
|
|
8
8
|
|---|---|
|
|
9
|
-
| `MANTIS_BASE_URL` | 可选;未设置或为空白时默认 `https://mantis.umlife.net`。显式值须为完整 HTTP(S) 基地址,可含部署子路径或 `/api/rest/` 后缀,不含 `index.php`、用户凭据、查询参数或片段 |
|
|
10
9
|
| `MANTIS_API_KEY` | 必填;当前使用者的个人 Key,权限由 Mantis 裁决 |
|
|
10
|
+
| `MANTIS_BASE_URL` | 可选;未设置或为空白时默认 `https://mantis.umlife.net`。显式值须为完整 HTTP(S) 基地址,可含部署子路径或 `/api/rest/` 后缀 |
|
|
11
11
|
| `MANTIS_WORKFLOW_CONFIG` | 可选;工作流 JSON 路径,建议使用稳定的绝对路径;未设置时使用内置标准映射 |
|
|
12
12
|
| `MANTIS_MCP_ENABLE_DESTRUCTIVE_TOOLS` | 默认 `false`;设为 `true` 后统一开放关闭、删除和版本管理,只接受 `true`/`false`(空值按关闭处理) |
|
|
13
13
|
| `MANTIS_CACHE_DIR` | 账本与缓存根目录,默认 `~/.cache/mantis-mcp` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youcloud/mantis-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "面向研发工作流的 MantisBT MCP 服务,支持缺陷查询、修复登记、附件和可恢复操作",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://git.umlife.net/ai-tools/mantis-mcp",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"scripts": {
|
|
37
37
|
"prebuild": "node --input-type=module -e \"import { rmSync } from 'node:fs'; rmSync('dist', { recursive: true, force: true });\"",
|
|
38
38
|
"build": "tsc -p tsconfig.build.json",
|
|
39
|
+
"prepublishOnly": "npm run typecheck && npm test && npm run test:package && npm audit --audit-level=high",
|
|
39
40
|
"prepack": "npm run build",
|
|
40
41
|
"test:package": "node scripts/verify-package.mjs",
|
|
41
42
|
"typecheck": "tsc --noEmit",
|