@zereight/mcp-gitlab 2.3.8-next.142 → 2.3.8-next.144
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 +13 -3
- package/README.md +13 -3
- package/README.pt-BR.md +13 -3
- package/README.zh-CN.md +13 -3
- package/build/index.js +3 -1
- package/build/tools/registry.js +1 -7
- package/build/tools/tool-descriptions.js +66 -86
- package/package.json +1 -1
package/README.ko.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# GitLab MCP Server
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@zereight/mcp-gitlab)
|
|
4
|
-
[](https://vscode.dev/redirect/mcp/install?name=zereight.gitlab-mcp&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40zereight%2Fmcp-gitlab%40latest%22%5D%2C%22env%22%3A%7B%22GITLAB_PERSONAL_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitlab-token%7D%22%2C%22GITLAB_API_URL%22%3A%22https%3A%2F%2Fgitlab.com%2Fapi%2Fv4%22%
|
|
5
|
-
[](https://cursor.com/en/install-mcp?name=zereight.gitlab-mcp&config=
|
|
4
|
+
[](https://vscode.dev/redirect/mcp/install?name=zereight.gitlab-mcp&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22gitlab-token%22%2C%22description%22%3A%22GitLab%20Personal%20Access%20Token%22%2C%22password%22%3Atrue%7D%5D&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40zereight%2Fmcp-gitlab%40latest%22%5D%2C%22env%22%3A%7B%22GITLAB_PERSONAL_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitlab-token%7D%22%2C%22GITLAB_API_URL%22%3A%22https%3A%2F%2Fgitlab.com%2Fapi%2Fv4%22%7D%7D)
|
|
5
|
+
[](https://cursor.com/en/install-mcp?name=zereight.gitlab-mcp&config=eyJ0eXBlIjoic3RkaW8iLCJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB6ZXJlaWdodC9tY3AtZ2l0bGFiQGxhdGVzdCJdLCJlbnYiOnsiR0lUTEFCX1BFUlNPTkFMX0FDQ0VTU19UT0tFTiI6IiR7ZW52OkdJVExBQl9QRVJTT05BTF9BQ0NFU1NfVE9LRU59IiwiR0lUTEFCX0FQSV9VUkwiOiJodHRwczovL2dpdGxhYi5jb20vYXBpL3Y0In19)
|
|
6
6
|
|
|
7
7
|
[English](./README.md) | [한국어](./README.ko.md) | [简体中文](./README.zh-CN.md) | [Português (Brasil)](./README.pt-BR.md)
|
|
8
8
|
|
|
@@ -55,7 +55,17 @@ PAT, OAuth, 읽기 전용 모드, 동적 API URL, 원격 인증을 지원하며
|
|
|
55
55
|
| **Node.js** | >=18.17 | 보통 >=24 | stdio는 `mcp-remote`, Node.js 20+ |
|
|
56
56
|
| **라이선스** | MIT | 서버마다 다름 | GitLab의 일부 |
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
### tools/list 크기 (2026-10-23 실측)
|
|
59
|
+
|
|
60
|
+
클라이언트는 세션 시작 때 `tools/list` 전체를 모델에 보냅니다. 토큰 추정은 UTF-8 바이트 / 4입니다.
|
|
61
|
+
|
|
62
|
+
| 프로필 | 도구 수 | JSON 바이트 | 추정 토큰 |
|
|
63
|
+
| ------ | ------: | ----------: | --------: |
|
|
64
|
+
| 기본값 (`core` + `discover_tools`) | 39 | 48,069 | 12,018 |
|
|
65
|
+
| `GITLAB_TOOL_PROFILE=slim` | 38 | 47,199 | 11,800 |
|
|
66
|
+
| `GITLAB_TOOLSETS=all` | 275 | 274,896 | 68,724 |
|
|
67
|
+
|
|
68
|
+
설명이나 스키마를 바꾼 뒤에는 `npm run test:mock` (`test/tools-list-budget.test.ts`)으로 다시 측정하세요.
|
|
59
69
|
|
|
60
70
|
GitLab은 [공식 MCP 서버](https://docs.gitlab.com/user/model_context_protocol/mcp_server/)도 제공합니다.
|
|
61
71
|
|
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/@zereight/mcp-gitlab)
|
|
5
5
|
[](https://www.npmjs.com/package/@zereight/mcp-gitlab)
|
|
6
6
|
[](https://github.com/zereight/gitlab-mcp/blob/main/LICENSE)
|
|
7
|
-
[](https://vscode.dev/redirect/mcp/install?name=zereight.gitlab-mcp&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40zereight%2Fmcp-gitlab%40latest%22%5D%2C%22env%22%3A%7B%22GITLAB_PERSONAL_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitlab-token%7D%22%2C%22GITLAB_API_URL%22%3A%22https%3A%2F%2Fgitlab.com%2Fapi%2Fv4%22%
|
|
8
|
-
[](https://cursor.com/en/install-mcp?name=zereight.gitlab-mcp&config=
|
|
7
|
+
[](https://vscode.dev/redirect/mcp/install?name=zereight.gitlab-mcp&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22gitlab-token%22%2C%22description%22%3A%22GitLab%20Personal%20Access%20Token%22%2C%22password%22%3Atrue%7D%5D&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40zereight%2Fmcp-gitlab%40latest%22%5D%2C%22env%22%3A%7B%22GITLAB_PERSONAL_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitlab-token%7D%22%2C%22GITLAB_API_URL%22%3A%22https%3A%2F%2Fgitlab.com%2Fapi%2Fv4%22%7D%7D)
|
|
8
|
+
[](https://cursor.com/en/install-mcp?name=zereight.gitlab-mcp&config=eyJ0eXBlIjoic3RkaW8iLCJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB6ZXJlaWdodC9tY3AtZ2l0bGFiQGxhdGVzdCJdLCJlbnYiOnsiR0lUTEFCX1BFUlNPTkFMX0FDQ0VTU19UT0tFTiI6IiR7ZW52OkdJVExBQl9QRVJTT05BTF9BQ0NFU1NfVE9LRU59IiwiR0lUTEFCX0FQSV9VUkwiOiJodHRwczovL2dpdGxhYi5jb20vYXBpL3Y0In19)
|
|
9
9
|
[](https://deepwiki.com/zereight/gitlab-mcp)
|
|
10
10
|
[](https://mcptoplist.com/server/io.github.zereight%2Fgitlab-mcp) [](https://mcpindex.ai/server/io-github-zereight-gitlab-mcp)
|
|
11
11
|
|
|
@@ -60,7 +60,17 @@ Supports PAT, OAuth, read-only mode, dynamic API URLs, and remote authorization
|
|
|
60
60
|
| **Node.js** | >=18.17 | Often >=24 | Node.js 20+ for stdio via `mcp-remote` |
|
|
61
61
|
| **License** | MIT | Varies | Part of GitLab |
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
### tools/list size (measured 2026-10-23)
|
|
64
|
+
|
|
65
|
+
A client sends the whole `tools/list` result to the model at session start. Token estimate is UTF-8 bytes / 4.
|
|
66
|
+
|
|
67
|
+
| Profile | Tools | JSON bytes | Est. tokens |
|
|
68
|
+
| ------- | ----: | ---------: | ----------: |
|
|
69
|
+
| Default (`core` + `discover_tools`) | 39 | 48,069 | 12,018 |
|
|
70
|
+
| `GITLAB_TOOL_PROFILE=slim` | 38 | 47,199 | 11,800 |
|
|
71
|
+
| `GITLAB_TOOLSETS=all` | 275 | 274,896 | 68,724 |
|
|
72
|
+
|
|
73
|
+
Re-measure with `npm run test:mock` (`test/tools-list-budget.test.ts`) after description or schema changes.
|
|
64
74
|
|
|
65
75
|
GitLab also ships an [official MCP server](https://docs.gitlab.com/user/model_context_protocol/mcp_server/).
|
|
66
76
|
|
package/README.pt-BR.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# GitLab MCP Server
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@zereight/mcp-gitlab)
|
|
4
|
-
[](https://vscode.dev/redirect/mcp/install?name=zereight.gitlab-mcp&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40zereight%2Fmcp-gitlab%40latest%22%5D%2C%22env%22%3A%7B%22GITLAB_PERSONAL_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitlab-token%7D%22%2C%22GITLAB_API_URL%22%3A%22https%3A%2F%2Fgitlab.com%2Fapi%2Fv4%22%
|
|
5
|
-
[](https://cursor.com/en/install-mcp?name=zereight.gitlab-mcp&config=
|
|
4
|
+
[](https://vscode.dev/redirect/mcp/install?name=zereight.gitlab-mcp&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22gitlab-token%22%2C%22description%22%3A%22GitLab%20Personal%20Access%20Token%22%2C%22password%22%3Atrue%7D%5D&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40zereight%2Fmcp-gitlab%40latest%22%5D%2C%22env%22%3A%7B%22GITLAB_PERSONAL_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitlab-token%7D%22%2C%22GITLAB_API_URL%22%3A%22https%3A%2F%2Fgitlab.com%2Fapi%2Fv4%22%7D%7D)
|
|
5
|
+
[](https://cursor.com/en/install-mcp?name=zereight.gitlab-mcp&config=eyJ0eXBlIjoic3RkaW8iLCJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB6ZXJlaWdodC9tY3AtZ2l0bGFiQGxhdGVzdCJdLCJlbnYiOnsiR0lUTEFCX1BFUlNPTkFMX0FDQ0VTU19UT0tFTiI6IiR7ZW52OkdJVExBQl9QRVJTT05BTF9BQ0NFU1NfVE9LRU59IiwiR0lUTEFCX0FQSV9VUkwiOiJodHRwczovL2dpdGxhYi5jb20vYXBpL3Y0In19)
|
|
6
6
|
|
|
7
7
|
[English](./README.md) | [한국어](./README.ko.md) | [简体中文](./README.zh-CN.md) | [Português (Brasil)](./README.pt-BR.md)
|
|
8
8
|
|
|
@@ -55,7 +55,17 @@ Suporta PAT, OAuth, modo somente leitura, URLs de API dinâmicas e autorização
|
|
|
55
55
|
| **Node.js** | >=18.17 | Frequentemente >=24 | Node.js 20+ para stdio via `mcp-remote` |
|
|
56
56
|
| **Licença** | MIT | Varia | Parte do GitLab |
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
### Tamanho do tools/list (medido em 2026-10-23)
|
|
59
|
+
|
|
60
|
+
O cliente envia o `tools/list` inteiro ao modelo no início da sessão. A estimativa de tokens é bytes UTF-8 / 4.
|
|
61
|
+
|
|
62
|
+
| Perfil | Ferramentas | Bytes JSON | Tokens estimados |
|
|
63
|
+
| ------ | ----------: | ---------: | ---------------: |
|
|
64
|
+
| Padrão (`core` + `discover_tools`) | 39 | 48,069 | 12,018 |
|
|
65
|
+
| `GITLAB_TOOL_PROFILE=slim` | 38 | 47,199 | 11,800 |
|
|
66
|
+
| `GITLAB_TOOLSETS=all` | 275 | 274,896 | 68,724 |
|
|
67
|
+
|
|
68
|
+
Após alterar descrições ou schemas, meça de novo com `npm run test:mock` (`test/tools-list-budget.test.ts`).
|
|
59
69
|
|
|
60
70
|
O GitLab também inclui um [servidor MCP oficial](https://docs.gitlab.com/user/model_context_protocol/mcp_server/).
|
|
61
71
|
|
package/README.zh-CN.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# GitLab MCP Server
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@zereight/mcp-gitlab)
|
|
4
|
-
[](https://vscode.dev/redirect/mcp/install?name=zereight.gitlab-mcp&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40zereight%2Fmcp-gitlab%40latest%22%5D%2C%22env%22%3A%7B%22GITLAB_PERSONAL_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitlab-token%7D%22%2C%22GITLAB_API_URL%22%3A%22https%3A%2F%2Fgitlab.com%2Fapi%2Fv4%22%
|
|
5
|
-
[](https://cursor.com/en/install-mcp?name=zereight.gitlab-mcp&config=
|
|
4
|
+
[](https://vscode.dev/redirect/mcp/install?name=zereight.gitlab-mcp&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22gitlab-token%22%2C%22description%22%3A%22GitLab%20Personal%20Access%20Token%22%2C%22password%22%3Atrue%7D%5D&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40zereight%2Fmcp-gitlab%40latest%22%5D%2C%22env%22%3A%7B%22GITLAB_PERSONAL_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitlab-token%7D%22%2C%22GITLAB_API_URL%22%3A%22https%3A%2F%2Fgitlab.com%2Fapi%2Fv4%22%7D%7D)
|
|
5
|
+
[](https://cursor.com/en/install-mcp?name=zereight.gitlab-mcp&config=eyJ0eXBlIjoic3RkaW8iLCJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB6ZXJlaWdodC9tY3AtZ2l0bGFiQGxhdGVzdCJdLCJlbnYiOnsiR0lUTEFCX1BFUlNPTkFMX0FDQ0VTU19UT0tFTiI6IiR7ZW52OkdJVExBQl9QRVJTT05BTF9BQ0NFU1NfVE9LRU59IiwiR0lUTEFCX0FQSV9VUkwiOiJodHRwczovL2dpdGxhYi5jb20vYXBpL3Y0In19)
|
|
6
6
|
|
|
7
7
|
[English](./README.md) | [한국어](./README.ko.md) | [简体中文](./README.zh-CN.md) | [Português (Brasil)](./README.pt-BR.md)
|
|
8
8
|
|
|
@@ -55,7 +55,17 @@ read -rs GITLAB_PERSONAL_ACCESS_TOKEN && export GITLAB_PERSONAL_ACCESS_TOKEN
|
|
|
55
55
|
| **Node.js** | >=18.17 | 通常 >=24 | stdio 经 `mcp-remote`,需要 Node.js 20+ |
|
|
56
56
|
| **许可证** | MIT | 因服务器而异 | GitLab 的一部分 |
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
### tools/list 体积(2026-10-23 实测)
|
|
59
|
+
|
|
60
|
+
客户端会在会话开始时把整份 `tools/list` 发给模型。Token 估算为 UTF-8 字节 / 4。
|
|
61
|
+
|
|
62
|
+
| 配置 | 工具数 | JSON 字节 | 估算 token |
|
|
63
|
+
| ---- | -----: | --------: | ---------: |
|
|
64
|
+
| 默认(`core` + `discover_tools`) | 39 | 48,069 | 12,018 |
|
|
65
|
+
| `GITLAB_TOOL_PROFILE=slim` | 38 | 47,199 | 11,800 |
|
|
66
|
+
| `GITLAB_TOOLSETS=all` | 275 | 274,896 | 68,724 |
|
|
67
|
+
|
|
68
|
+
更改描述或 schema 后,用 `npm run test:mock`(`test/tools-list-budget.test.ts`)重新测量。
|
|
59
69
|
|
|
60
70
|
GitLab 还提供[官方 MCP 服务器](https://docs.gitlab.com/user/model_context_protocol/mcp_server/)。
|
|
61
71
|
|
package/build/index.js
CHANGED
|
@@ -1376,7 +1376,9 @@ if (!isCliInvocation(process.argv) &&
|
|
|
1376
1376
|
// This exit runs before runServer(), so warnings have to be printed here too.
|
|
1377
1377
|
emitDeprecatedEnvWarnings();
|
|
1378
1378
|
logger.error("GITLAB_PERSONAL_ACCESS_TOKEN environment variable is not set");
|
|
1379
|
-
logger.info("Either set GITLAB_PERSONAL_ACCESS_TOKEN or
|
|
1379
|
+
logger.info("Either set GITLAB_PERSONAL_ACCESS_TOKEN (or --token, or GITLAB_PERSONAL_ACCESS_TOKEN_FILE), " +
|
|
1380
|
+
"GITLAB_JOB_TOKEN, or GITLAB_AUTH_COOKIE_PATH, or enable OAuth with GITLAB_USE_OAUTH=true. " +
|
|
1381
|
+
`Setup guide: ${SERVER_WEBSITE_URL}getting-started/`);
|
|
1380
1382
|
exitAfterFlush(1);
|
|
1381
1383
|
}
|
|
1382
1384
|
class GitLabApiError extends Error {
|
package/build/tools/registry.js
CHANGED
|
@@ -2276,15 +2276,9 @@ const discoverTool = allTools.find(t => t.name === "discover_tools");
|
|
|
2276
2276
|
if (discoverTool) {
|
|
2277
2277
|
discoverTool.description = `Discover and activate additional tool categories for this session. Available categories: ${[...DISCOVERABLE_TOOLSET_IDS].join(", ")}. Already-active categories are listed in the response. Explicit-only toolsets are omitted; list them in GITLAB_TOOLSETS.`;
|
|
2278
2278
|
}
|
|
2279
|
-
function acceptsProjectOrGroupId(inputSchema) {
|
|
2280
|
-
const properties = inputSchema?.properties;
|
|
2281
|
-
return (typeof properties === "object" &&
|
|
2282
|
-
properties !== null &&
|
|
2283
|
-
("project_id" in properties || "group_id" in properties));
|
|
2284
|
-
}
|
|
2285
2279
|
const allToolNames = new Set(allTools.map(tool => tool.name));
|
|
2286
2280
|
for (const tool of allTools) {
|
|
2287
|
-
tool.description = getToolDescription(tool.name, tool.description,
|
|
2281
|
+
tool.description = getToolDescription(tool.name, tool.description, allToolNames);
|
|
2288
2282
|
}
|
|
2289
2283
|
export function parseEnabledToolsets(raw) {
|
|
2290
2284
|
if (!raw || raw.trim() === "") {
|
|
@@ -1,70 +1,68 @@
|
|
|
1
1
|
const TOOL_GUIDANCE = {
|
|
2
|
-
merge_merge_request: "Use this only after checking
|
|
3
|
-
approve_merge_request: "
|
|
4
|
-
unapprove_merge_request: "
|
|
5
|
-
rebase_merge_request: "
|
|
6
|
-
get_merge_request_approval_state: "
|
|
7
|
-
get_merge_request_conflicts: "
|
|
8
|
-
list_merge_request_pipelines: "
|
|
9
|
-
create_or_update_file: "
|
|
10
|
-
push_files: "
|
|
11
|
-
create_issue: "
|
|
12
|
-
list_issues: "Use this for issue management: list GitLab issues, optionally scoped with `project_id`. Use `get_issue` when the
|
|
13
|
-
my_issues: "Use this for issue management: list issues assigned to the authenticated user. Use `list_issues` for project-wide
|
|
14
|
-
get_issue: "Use this for issue management: inspect one issue
|
|
15
|
-
create_merge_request: "
|
|
16
|
-
fork_repository: "
|
|
17
|
-
create_branch: "
|
|
18
|
-
delete_branch: "
|
|
19
|
-
protect_branch: "
|
|
20
|
-
update_protected_branch: "
|
|
21
|
-
unprotect_branch: "
|
|
22
|
-
protect_tag: "
|
|
23
|
-
unprotect_tag: "
|
|
24
|
-
update_default_branch: "
|
|
25
|
-
create_note: "
|
|
26
|
-
create_merge_request_thread: "
|
|
27
|
-
resolve_merge_request_thread: "
|
|
28
|
-
mr_discussions: "
|
|
29
|
-
get_merge_request_discussion: "
|
|
30
|
-
create_merge_request_discussion_note: "
|
|
31
|
-
get_merge_request_note: "
|
|
32
|
-
get_merge_request_notes: "
|
|
33
|
-
create_issue_note: "
|
|
34
|
-
list_issue_discussions: "
|
|
35
|
-
update_issue: "
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
orbit_list_tools: "Use this to see which MCP tool definitions Orbit itself exposes; use `orbit_query` to run graph queries directly. It is read-only and free of credit charges, and returns the tool definition list or a permission error.",
|
|
2
|
+
merge_merge_request: "Use this only after checking approval, conflicts, and pipeline state; use `approve_merge_request` to approve rather than merge. Pass `sha` from `get_merge_request`; GitLab 19.2+ groups may reject merges without it.",
|
|
3
|
+
approve_merge_request: "Record an approval on an existing merge request. It does not merge or change the source branch.",
|
|
4
|
+
unapprove_merge_request: "Remove the current user's approval. Use `merge_merge_request` only when you intend to merge.",
|
|
5
|
+
rebase_merge_request: "Rebase the source onto the target (force-push). With `wait` true (default) it returns `previous_sha` and `head_changed`; `merge_error` can be stale. Use `get_merge_request_conflicts` for conflicts.",
|
|
6
|
+
get_merge_request_approval_state: "Inspect approval rules and approvers before merging. Use `approve_merge_request` to change approval state.",
|
|
7
|
+
get_merge_request_conflicts: "Inspect merge conflicts before `merge_merge_request`. It reports conflicts and does not resolve them.",
|
|
8
|
+
list_merge_request_pipelines: "List pipelines for one merge request. Use `list_pipelines` for project-wide filtering.",
|
|
9
|
+
create_or_update_file: "Create or update one repository file. Use `push_files` for a multi-file commit. Optional `encoding` (`text` or `base64`) defaults to `GITLAB_REPO_FILE_ENCODING`.",
|
|
10
|
+
push_files: "Commit several file changes atomically. Each file defaults to action `create`; optional per-file `action` (create/update/delete/move) and `encoding` (text/base64) are additive. `GITLAB_PERMISSION_MODE=modify` rejects `delete` and `move`.",
|
|
11
|
+
create_issue: "Open a new issue. Use `update_issue` for an existing issue and `create_issue_note` for discussion.",
|
|
12
|
+
list_issues: "Use this for issue management: list GitLab issues, optionally scoped with `project_id`. Use `get_issue` when the iid is known and `my_issues` for the current user's assignments.",
|
|
13
|
+
my_issues: "Use this for issue management: list issues assigned to the authenticated user. Use `list_issues` for project-wide listing and `get_issue` for one issue. Requires classic read_user or fine-grained User:Read.",
|
|
14
|
+
get_issue: "Use this for issue management: inspect one issue. Use `list_issues` or `my_issues` to discover issues first.",
|
|
15
|
+
create_merge_request: "Open a merge request from an existing source branch to a target. Use `update_merge_request` after it exists.",
|
|
16
|
+
fork_repository: "Fork an existing project into the current user's namespace or a permitted namespace. Use `search_repositories` or `get_project` to inspect without copying.",
|
|
17
|
+
create_branch: "Create a branch from a source branch, tag, or commit. Use `protect_branch` after creation. Returns already-exists when the name is taken.",
|
|
18
|
+
delete_branch: "Permanently delete a remote branch. Confirm the name first with `get_branch` or `list_branches`; this does not remove branch protection.",
|
|
19
|
+
protect_branch: "Create a protection rule; GitLab returns 409 if one exists. Use `update_protected_branch` to change an existing rule.",
|
|
20
|
+
update_protected_branch: "Change an existing protection rule in place (do not unprotect first). Read record `id`s with `get_protected_branch`. In `allowed_to_push`, `allowed_to_merge`, and `allowed_to_unprotect`, add with `access_level`, `user_id`, `group_id`, or `deploy_key_id` (push only); change with `id`; remove with `{id, _destroy: true}`. `member_role_id` is not supported. A request that would leave `allowed_to_unprotect` empty is refused. GitLab may reject the update unless the caller is on the current unprotect list.",
|
|
21
|
+
unprotect_branch: "Remove protection. Use `update_protected_branch` to change access levels without removing the rule.",
|
|
22
|
+
protect_tag: "Protect a tag or wildcard such as `v*` so protected CI/CD variables reach tag pipelines. Inspect first with `get_protected_tag` or `list_protected_tags`.",
|
|
23
|
+
unprotect_tag: "Remove tag protection. To change create access, `unprotect_tag` then `protect_tag`. Blocked in `modify` mode.",
|
|
24
|
+
update_default_branch: "Change the project's default branch. Use `create_branch` to create a branch rather than changing defaults.",
|
|
25
|
+
create_note: "Add a top-level comment on an issue or merge request. Use `create_merge_request_thread` or `create_issue_note` for typed discussion.",
|
|
26
|
+
create_merge_request_thread: "Start a review thread. Use `create_merge_request_note` for an unthreaded note and `create_merge_request_discussion_note` to reply.",
|
|
27
|
+
resolve_merge_request_thread: "Mark an existing review thread resolved. Use `update_merge_request_discussion_note` to change note text.",
|
|
28
|
+
mr_discussions: "List complete discussion threads. Use `get_merge_request_notes` for flat notes.",
|
|
29
|
+
get_merge_request_discussion: "Fetch one discussion by id. Use `mr_discussions` for a collection and `get_merge_request_note` for a flat note.",
|
|
30
|
+
create_merge_request_discussion_note: "Reply inside an existing discussion. Use `create_merge_request_thread` to start a thread and `create_merge_request_note` for a top-level note.",
|
|
31
|
+
get_merge_request_note: "Fetch one note by id. Use `get_merge_request_notes` for a collection and `mr_discussions` for threads.",
|
|
32
|
+
get_merge_request_notes: "List flat notes. Use `mr_discussions` when thread structure and resolution state are required.",
|
|
33
|
+
create_issue_note: "Add a note to an existing issue, optionally as a reply. Use `update_issue` for issue fields.",
|
|
34
|
+
list_issue_discussions: "List threaded discussions for an issue. Use `list_issues` or `get_issue` for issue records.",
|
|
35
|
+
update_issue: "Change fields on an existing issue. Use `update_issue_description_patch` for a targeted description edit and `create_issue_note` for discussion.",
|
|
36
|
+
delete_issue: "Permanently delete an issue. Use `update_issue` to close or edit without deleting.",
|
|
37
|
+
delete_issue_link: "Remove a relationship between two issues. Verify first with `list_issue_links` or `get_issue_link`.",
|
|
38
|
+
download_job_artifacts: "Retrieve a job artifact archive. Remote HTTP returns a download URL; local stdio saves a file (rejected in readonly mode).",
|
|
39
|
+
download_attachment: "Retrieve a project attachment. Remote HTTP returns inline base64 or a URL; local stdio saves under GITLAB_DOWNLOAD_DIR and never overwrites.",
|
|
40
|
+
gitlab_api_request: "Send one GitLab REST call under /api/v4. Readonly allows GET only; modify rejects DELETE. Enable only by listing api in GITLAB_TOOLSETS; all, discover_tools, and GITLAB_TOOLS do not. Prompt injection can drive this tool, so operators who rely on group, project, or tool restrictions must not enable it. With GITLAB_ALLOWED_PROJECT_IDS or a session project scope, only /projects/:id paths for an allowed project are accepted; body and query parameters that name another project are not checked.",
|
|
41
|
+
execute_graphql: "Use only when no typed REST tool covers the operation. The query is sent directly and may include mutations.",
|
|
42
|
+
whoami: "Requires classic read_user or fine-grained User:Read. Use `get_user` or `get_users` to look up another user.",
|
|
43
|
+
list_project_members: "Search project members by name or username. Use `list_group_members` for a group.",
|
|
44
|
+
get_commit_diff: "Return the file diffs for one commit. Use `get_commit` for metadata without the patch.",
|
|
45
|
+
list_project_runners: "List runners a project can use, including ancestor group and allowed instance runners. Payload omits tags — call `get_runner` for tag_list. Never returns runners_token or the runner authentication token.",
|
|
46
|
+
get_runner: "Get tag_list, run_untagged, locked, and access_level for a runner id. With GITLAB_ALLOWED_PROJECT_IDS or a session project scope, the runner must appear on an allowed project's list — pass project_id when more than one project is allowed. Never returns runners_token or the runner authentication token; token_expires_at is expiry metadata, not the token.",
|
|
47
|
+
list_pipeline_schedules: "List scheduled pipelines (`cron`, `next_run_at`, `active`). The list has no `variables` — call `get_pipeline_schedule` for those.",
|
|
48
|
+
get_pipeline_schedule: "Inspect one schedule including variables and inputs (Maintainer/Owner/schedule owner only).",
|
|
49
|
+
list_pipeline_schedule_pipelines: "List pipelines a schedule has triggered. Use `get_pipeline` for one pipeline and `list_pipelines` for project-wide filtering.",
|
|
50
|
+
create_pipeline_schedule: "Add a recurring pipeline. Prefer a full ref such as `refs/heads/main` when a branch and tag share a name. `cron_timezone` defaults to UTC.",
|
|
51
|
+
update_pipeline_schedule: "Change an existing schedule. Call `take_ownership_pipeline_schedule` first when the schedule belongs to another user.",
|
|
52
|
+
delete_pipeline_schedule: "Permanently remove a schedule and its variables. Pause with `update_pipeline_schedule` `active: false` instead when possible.",
|
|
53
|
+
play_pipeline_schedule: "Run a schedule immediately without shifting `next_run_at`. Rate-limited to once per minute per schedule.",
|
|
54
|
+
take_ownership_pipeline_schedule: "Transfer schedule ownership to the current user. Required before updating or deleting someone else's schedule.",
|
|
55
|
+
get_pipeline_schedule_variable: "Read one schedule variable by key. Separate from project-level CI/CD variables.",
|
|
56
|
+
create_pipeline_schedule_variable: "Attach a new variable to a schedule. `variable_type` defaults to `env_var`; `key` is /[a-zA-Z0-9_]+/ up to 255 characters.",
|
|
57
|
+
update_pipeline_schedule_variable: "Change the value or type of an existing schedule variable.",
|
|
58
|
+
delete_pipeline_schedule_variable: "Permanently remove a schedule variable. Later scheduled pipelines no longer receive it.",
|
|
59
|
+
stop_stale_environments: "Stop eligible stale environments. GitLab excludes protected environments; this does not delete them.",
|
|
60
|
+
delete_review_app_environments: "Schedule deletion of stopped review-app environments one week later. `dry_run` defaults to true.",
|
|
61
|
+
orbit_query: "Answer cross-project relationship questions in one call. Premium/Ultimate; each call consumes GitLab credits. Use `orbit_get_schema` first when types are unknown.",
|
|
62
|
+
orbit_get_schema: "List node and edge types for `orbit_query`. Read-only and free of credit charges.",
|
|
63
|
+
orbit_get_status: "Check whether Orbit indexing has completed. Results reflect the last index cycle.",
|
|
64
|
+
orbit_list_tools: "List MCP tool definitions Orbit itself exposes. Use `orbit_query` to run graph queries.",
|
|
66
65
|
};
|
|
67
|
-
const PARAMETER_GUIDANCE = "`project_id`/`group_id` take a numeric ID or URL-encoded path.";
|
|
68
66
|
function ensureSentence(text) {
|
|
69
67
|
const trimmed = text.trim();
|
|
70
68
|
return /[.!?]$/.test(trimmed) ? trimmed : `${trimmed}.`;
|
|
@@ -128,30 +126,12 @@ function getLifecycleGuidance(name, toolNames) {
|
|
|
128
126
|
}
|
|
129
127
|
return "";
|
|
130
128
|
}
|
|
131
|
-
function
|
|
132
|
-
if (readOnly) {
|
|
133
|
-
return "Read-only; missing resources, denied access, and rate limits return errors.";
|
|
134
|
-
}
|
|
135
|
-
if (destructive) {
|
|
136
|
-
return "Changes or removes GitLab data and may be irreversible; needs permission.";
|
|
137
|
-
}
|
|
138
|
-
return "Changes GitLab data; needs permission and returns validation or conflict errors.";
|
|
139
|
-
}
|
|
140
|
-
export function getToolDescription(name, baseDescription, readOnly, destructive, acceptsProjectOrGroupId, toolNames) {
|
|
129
|
+
export function getToolDescription(name, baseDescription, toolNames) {
|
|
141
130
|
const explicitGuidance = TOOL_GUIDANCE[name];
|
|
142
131
|
if (explicitGuidance) {
|
|
143
132
|
return `${ensureSentence(baseDescription)} ${explicitGuidance}`;
|
|
144
133
|
}
|
|
145
134
|
const normalizedDescription = ensureSentence(baseDescription);
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
return [
|
|
150
|
-
normalizedDescription,
|
|
151
|
-
getLifecycleGuidance(name, toolNames),
|
|
152
|
-
getBehaviorGuidance(readOnly, destructive),
|
|
153
|
-
acceptsProjectOrGroupId ? PARAMETER_GUIDANCE : "",
|
|
154
|
-
]
|
|
155
|
-
.filter(Boolean)
|
|
156
|
-
.join(" ");
|
|
135
|
+
const lifecycle = getLifecycleGuidance(name, toolNames);
|
|
136
|
+
return lifecycle ? `${normalizedDescription} ${lifecycle}` : normalizedDescription;
|
|
157
137
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zereight/mcp-gitlab",
|
|
3
|
-
"version": "2.3.8-next.
|
|
3
|
+
"version": "2.3.8-next.144",
|
|
4
4
|
"mcpName": "io.github.zereight/gitlab-mcp",
|
|
5
5
|
"description": "GitLab MCP server for projects, merge requests, issues, pipelines, wiki, releases, and more",
|
|
6
6
|
"keywords": [
|