@zereight/mcp-gitlab 2.1.70 → 2.2.1

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.
Files changed (158) hide show
  1. package/README.ko.md +9 -5
  2. package/README.md +15 -11
  3. package/README.pt-BR.md +9 -5
  4. package/README.zh-CN.md +9 -5
  5. package/build/config.js +12 -4
  6. package/build/deprecated-env.js +63 -0
  7. package/build/index.js +430 -200
  8. package/build/oauth-device-flow.js +80 -0
  9. package/build/oauth.js +135 -18
  10. package/build/schemas.js +1 -1
  11. package/build/server/remote-http-stack.js +39 -0
  12. package/build/tools/discover-activation.js +38 -0
  13. package/build/tools/exposed-tools.js +35 -0
  14. package/build/tools/listed-tools.js +76 -0
  15. package/build/tools/registry.js +232 -63
  16. package/build/tools/tool-descriptions.js +3 -3
  17. package/build/tools/tool-profile.js +66 -0
  18. package/build/utils/compact-tool-allowlist.js +14 -0
  19. package/build/utils/logger.js +34 -12
  20. package/package.json +3 -3
  21. package/build/scripts/check-skill-sync.js +0 -143
  22. package/build/scripts/generate-server-card.js +0 -39
  23. package/build/scripts/generate-tool-coverage.js +0 -58
  24. package/build/scripts/generate-tool-docs.js +0 -430
  25. package/build/scripts/tool-coverage/coverage.js +0 -341
  26. package/build/scripts/tool-coverage/coverage.test.js +0 -142
  27. package/build/test/callback-proxy-tests.js +0 -321
  28. package/build/test/cli/args.test.js +0 -175
  29. package/build/test/cli/boolean-flags.test.js +0 -106
  30. package/build/test/cli/compact-mcp-result.test.js +0 -93
  31. package/build/test/cli/credentials.test.js +0 -153
  32. package/build/test/cli/exposure.test.js +0 -104
  33. package/build/test/cli/load-config-snapshot.js +0 -5
  34. package/build/test/cli/output.test.js +0 -74
  35. package/build/test/cli/replay-command.test.js +0 -37
  36. package/build/test/cli/router.test.js +0 -183
  37. package/build/test/client-pool-test.js +0 -109
  38. package/build/test/clients/client.js +0 -34
  39. package/build/test/clients/custom-header-client.js +0 -122
  40. package/build/test/clients/sse-client.js +0 -95
  41. package/build/test/clients/stdio-client.js +0 -113
  42. package/build/test/clients/streamable-http-client.js +0 -95
  43. package/build/test/config-allowed-groups.test.js +0 -97
  44. package/build/test/create-commit-actions.test.js +0 -102
  45. package/build/test/draft-note-schema.test.js +0 -44
  46. package/build/test/dynamic-api-url-allowlist.test.js +0 -121
  47. package/build/test/dynamic-api-url-test.js +0 -304
  48. package/build/test/dynamic-routing-tests.js +0 -495
  49. package/build/test/get-merge-request-discussion-schema.test.js +0 -30
  50. package/build/test/gitlab-api-tool-errors.test.js +0 -112
  51. package/build/test/gitlab-artifact-entry-schema.test.js +0 -44
  52. package/build/test/gitlab-diff-schema.test.js +0 -36
  53. package/build/test/gitlab-pipeline-schedule-schema.test.js +0 -32
  54. package/build/test/gitlab-tag-schema.test.js +0 -51
  55. package/build/test/group-milestone-schema.test.js +0 -45
  56. package/build/test/mcp-oauth-tests.js +0 -905
  57. package/build/test/mcp-server-name.test.js +0 -87
  58. package/build/test/merge-merge-request-schema.test.js +0 -75
  59. package/build/test/multi-server-test.js +0 -190
  60. package/build/test/no-proxy-integration-test.js +0 -183
  61. package/build/test/no-proxy-test.js +0 -149
  62. package/build/test/nullable-gitlab-response-fields.test.js +0 -37
  63. package/build/test/nullish-tool-arguments-schema.test.js +0 -118
  64. package/build/test/oauth-device-flow-tests.js +0 -450
  65. package/build/test/oauth-download-url.test.js +0 -157
  66. package/build/test/oauth-startup.test.js +0 -204
  67. package/build/test/oauth-tests.js +0 -428
  68. package/build/test/path-segment-encoding.test.js +0 -98
  69. package/build/test/remote-auth-simple-test.js +0 -277
  70. package/build/test/remote-auth-tests.js +0 -314
  71. package/build/test/response-masking.test.js +0 -445
  72. package/build/test/schema-tests.js +0 -1679
  73. package/build/test/server/metrics.test.js +0 -47
  74. package/build/test/server/request-helpers.test.js +0 -48
  75. package/build/test/server/version.test.js +0 -13
  76. package/build/test/sse-auth-guard.test.js +0 -96
  77. package/build/test/sse-session-limits.test.js +0 -273
  78. package/build/test/stateless/callback-proxy.test.js +0 -510
  79. package/build/test/stateless/client-id.test.js +0 -177
  80. package/build/test/stateless/codec.test.js +0 -328
  81. package/build/test/stateless/config-ttl.test.js +0 -149
  82. package/build/test/stateless/consumed-proxy-code-cache.test.js +0 -150
  83. package/build/test/stateless/session-id-integration.test.js +0 -675
  84. package/build/test/stateless/session-id.test.js +0 -157
  85. package/build/test/streamable-http-concurrent-session.test.js +0 -171
  86. package/build/test/streamable-http-dns-rebinding.test.js +0 -185
  87. package/build/test/streamable-http-sse-stream.test.js +0 -350
  88. package/build/test/streamable-http-static-token-auth.test.js +0 -157
  89. package/build/test/streamable-http-unauthenticated-discovery.test.js +0 -207
  90. package/build/test/test-all-transport-server.js +0 -255
  91. package/build/test/test-auth-retry.js +0 -195
  92. package/build/test/test-blank-filters.js +0 -156
  93. package/build/test/test-ci-catalog.js +0 -177
  94. package/build/test/test-ci-lint.js +0 -191
  95. package/build/test/test-ci-variables.js +0 -309
  96. package/build/test/test-create-repository.js +0 -120
  97. package/build/test/test-dependency-proxy.js +0 -195
  98. package/build/test/test-deployment-tools.js +0 -463
  99. package/build/test/test-download-attachment.js +0 -190
  100. package/build/test/test-dynamic-project-scope.js +0 -524
  101. package/build/test/test-empty-toolsets.js +0 -535
  102. package/build/test/test-get-file-blame.js +0 -145
  103. package/build/test/test-get-file-contents.js +0 -128
  104. package/build/test/test-geteffectiveprojectid.js +0 -804
  105. package/build/test/test-health-check.js +0 -115
  106. package/build/test/test-issue-description-patch.js +0 -256
  107. package/build/test/test-job-artifacts.js +0 -275
  108. package/build/test/test-json-schema.js +0 -166
  109. package/build/test/test-list-group-members.js +0 -150
  110. package/build/test/test-list-group-merge-requests.js +0 -165
  111. package/build/test/test-list-issues.js +0 -170
  112. package/build/test/test-list-merge-requests.js +0 -201
  113. package/build/test/test-list-milestones.js +0 -145
  114. package/build/test/test-list-project-members.js +0 -132
  115. package/build/test/test-merge-request-approval-state-tools.js +0 -213
  116. package/build/test/test-merge-request-approvals.js +0 -187
  117. package/build/test/test-merge-request-pipelines.js +0 -106
  118. package/build/test/test-mr-diffs-filter.js +0 -132
  119. package/build/test/test-mr-file-diffs.js +0 -251
  120. package/build/test/test-oauth-proxy-rate-limit.js +0 -133
  121. package/build/test/test-orbit.js +0 -155
  122. package/build/test/test-permission-mode.js +0 -424
  123. package/build/test/test-pipeline-schedules.js +0 -484
  124. package/build/test/test-protected-branches.js +0 -174
  125. package/build/test/test-remote-downloads.js +0 -510
  126. package/build/test/test-search-code.js +0 -275
  127. package/build/test/test-snippets.js +0 -735
  128. package/build/test/test-tags.js +0 -220
  129. package/build/test/test-todos.js +0 -195
  130. package/build/test/test-token-optimizations.js +0 -691
  131. package/build/test/test-toolset-filtering.js +0 -499
  132. package/build/test/test-update-issue-slim.js +0 -141
  133. package/build/test/test-update-project.js +0 -112
  134. package/build/test/test-upload-markdown.js +0 -206
  135. package/build/test/test-vulnerabilities.js +0 -399
  136. package/build/test/test-webhooks.js +0 -218
  137. package/build/test/tool-description-quality.test.js +0 -50
  138. package/build/test/utils/bulk-publish-options.test.js +0 -32
  139. package/build/test/utils/download-token.test.js +0 -35
  140. package/build/test/utils/forwarded-public-base-url.test.js +0 -46
  141. package/build/test/utils/gitlab-instance-version.test.js +0 -32
  142. package/build/test/utils/gitlab-version-gate.test.js +0 -74
  143. package/build/test/utils/graphql-query.test.js +0 -168
  144. package/build/test/utils/helpers-path.test.js +0 -104
  145. package/build/test/utils/jmespath-tool-result.test.js +0 -91
  146. package/build/test/utils/masking.test.js +0 -384
  147. package/build/test/utils/merge-request-position.test.js +0 -57
  148. package/build/test/utils/mock-gitlab-server.js +0 -614
  149. package/build/test/utils/proxy-client-ip.test.js +0 -28
  150. package/build/test/utils/redact-sensitive.test.js +0 -32
  151. package/build/test/utils/safe-redirect-fetch.test.js +0 -463
  152. package/build/test/utils/server-launcher.js +0 -231
  153. package/build/test/utils/tool-args.test.js +0 -210
  154. package/build/test/utils/url.test.js +0 -141
  155. package/build/test/utils/version-check.test.js +0 -239
  156. package/build/test/utils/wiki-title.test.js +0 -21
  157. package/build/test-note.js +0 -54
  158. package/build/test-resolve-issue-note.js +0 -127
package/README.ko.md CHANGED
@@ -17,7 +17,7 @@ PAT, OAuth, 읽기 전용 모드, 동적 API URL, 원격 인증을 지원하며
17
17
 
18
18
  ### 왜 이 GitLab MCP를 사용하나요?
19
19
 
20
- - **267개 도구 + `discover_tools`** — 작은 toolset으로 시작하고, 런타임에 카테고리 활성화
20
+ - **268개 도구: toolset 266개 + `execute_graphql` + `discover_tools`** — 작은 toolset으로 시작하고, 런타임에 카테고리 활성화
21
21
  - **MR 2단계 리뷰** — `list_merge_request_changed_files` → 배치 `get_merge_request_file_diff`
22
22
  - **Agent Skill 내장** — `skills/gitlab-mcp/` 워크플로우 가이드
23
23
  - **유연한 인증** — Personal Access Token, 로컬 OAuth2 브라우저 플로우, MCP OAuth 프록시, 요청별 원격 인증
@@ -31,7 +31,7 @@ PAT, OAuth, 읽기 전용 모드, 동적 API URL, 원격 인증을 지원하며
31
31
  | | @zereight/mcp-gitlab | GitLab MCP A (커뮤니티 CQRS형) |
32
32
  |---|----------------------|--------------------------------|
33
33
  | **적합한 경우** | AI 에이전트 워크플로우 | 엔터프라이즈 멀티 인스턴스 / 그룹형 도구 |
34
- | **도구 모델** | ~267개 세분화 도구 + `discover_tools` | ~50–60개 `browse_*` / `manage_*` 그룹 도구 |
34
+ | **도구 모델** | 268개 도구: toolset 266개 + `execute_graphql` + `discover_tools` | ~50–60개 `browse_*` / `manage_*` 그룹 도구 |
35
35
  | **MR 리뷰** | 2단계 배치 diff | 서버마다 다름 |
36
36
  | **Node.js** | >=18.17 | 보통 >=24 |
37
37
  | **라이선스** | MIT | 서버마다 다름 |
@@ -111,7 +111,7 @@ command = lib.getExe inputs.gitlab-mcp.packages.${system}.default;
111
111
 
112
112
  예시는 기존 `mcp-gitlab`보다 충돌 가능성이 낮은 `zereight-mcp-gitlab` 별칭을 사용합니다. MCP 클라이언트가 찾지 못하면 `which zereight-mcp-gitlab`의 절대 경로를 사용하세요.
113
113
 
114
- 전역 설치를 쓰지 않으려면 `npx -y @zereight/mcp-gitlab@2.1.69`처럼 직전 안정 버전(문서가 권장하는 버전)으로 고정하세요. 항상 최신 버전을 원하면 `npx -y @zereight/mcp-gitlab@latest`를 사용하세요. 새 버전이 나오면 서버가 시작 시 stderr로 알려줍니다(`GITLAB_DISABLE_VERSION_CHECK=true`로 비활성화 가능).
114
+ 전역 설치를 쓰지 않으려면 `npx -y @zereight/mcp-gitlab@2.2.0`처럼 직전 안정 버전(문서가 권장하는 버전)으로 고정하세요. 항상 최신 버전을 원하면 `npx -y @zereight/mcp-gitlab@latest`를 사용하세요. 새 버전이 나오면 서버가 시작 시 stderr로 알려줍니다(`GITLAB_DISABLE_VERSION_CHECK=true`로 비활성화 가능).
115
115
 
116
116
  #### CLI 인자 사용하기(환경 변수 문제가 있는 클라이언트용)
117
117
 
@@ -135,6 +135,8 @@ command = lib.getExe inputs.gitlab-mcp.packages.${system}.default;
135
135
  - `--api-url` - GitLab API URL (`GITLAB_API_URL` 대체)
136
136
  - `--read-only=true` - 읽기 전용 모드 활성화 (`GITLAB_READ_ONLY_MODE` 대체, deprecated — `--permission-mode=readonly` 권장)
137
137
  - `--permission-mode` - 권한 수준: `readonly`, `modify`(삭제/중단 도구 비활성), `full` (`GITLAB_PERMISSION_MODE` 대체, 기본값 `full`)
138
+ - `--toolsets=all` - 지정한 툴셋 활성화 (`GITLAB_TOOLSETS` 대체, 미설정 시 lean `core` 기본값 사용)
139
+ - `--tools=list_issues` - 개별 도구 추가 (`GITLAB_TOOLS` 대체)
138
140
  - `--use-wiki=true` - 위키 API 활성화 (`USE_GITLAB_WIKI` 대체, 레거시 — `GITLAB_TOOLSETS=wiki` 권장)
139
141
  - `--use-milestone=true` - 마일스톤 API 활성화 (`USE_MILESTONE` 대체, 레거시 — `GITLAB_TOOLSETS=milestones` 권장)
140
142
  - `--use-pipeline=true` - 파이프라인 API 활성화 (`USE_PIPELINE` 대체, 레거시 — `GITLAB_TOOLSETS=pipelines` 권장)
@@ -145,6 +147,8 @@ command = lib.getExe inputs.gitlab-mcp.packages.${system}.default;
145
147
  - `--masking-workspace-dir` - 마스킹 파일 경로를 해석하는 기준 디렉터리 (`GITLAB_MASKING_WORKSPACE_DIR` 대체)
146
148
  - `--compact-results=true` - 큰 MCP 도구 응답을 미리보기와 CLI 명령으로 바꿈 (`GITLAB_MCP_COMPACT_RESULTS` 대체, 기본 꺼짐)
147
149
  - `--compact-result-chars` - compact 임계값 문자 수 (`GITLAB_MCP_COMPACT_RESULT_CHARS` 대체, 기본 `4000`)
150
+ - `--compact-tools` - 전역 compact를 켜지 않고, 응답이 클 때 compact할 도구 이름을 쉼표로 지정 (`GITLAB_MCP_COMPACT_TOOLS` 대체)
151
+ - `--tool-profile` - `full`(기본값) 또는 `slim`. `slim`은 draft note, 이모지 반응, 라벨, CI 카탈로그 도구와 `create_group`을 초기 목록에서 뺌. `GITLAB_TOOLSETS`에 공백이 아닌 값이 설정된 경우에만 무시됨 (`GITLAB_TOOL_PROFILE` 대체)
148
152
 
149
153
  CLI 인자는 환경 변수보다 우선합니다.
150
154
 
@@ -164,7 +168,7 @@ CLI 인자는 환경 변수보다 우선합니다.
164
168
  > 유지됩니다. [Tools Reference](./docs/tools/index.md#feature-toggles)와
165
169
  > [Environment Variables](./docs/configuration/environment-variables.md)를 참고하세요.
166
170
 
167
- #### SSE
171
+ - sse
168
172
 
169
173
  ```shell
170
174
  docker run -i --rm \
@@ -193,7 +197,7 @@ docker run -i --rm \
193
197
  }
194
198
  ```
195
199
 
196
- #### Streamable HTTP
200
+ - streamable-http
197
201
 
198
202
  ```shell
199
203
  docker run -i --rm \
package/README.md CHANGED
@@ -22,7 +22,7 @@ Supports PAT, OAuth, read-only mode, dynamic API URLs, and remote authorization
22
22
 
23
23
  ### Why use this GitLab MCP?
24
24
 
25
- - **267 tools + `discover_tools`** — start with a small toolset; activate more at runtime without CQRS-style grouping
25
+ - **268 tools: 266 in toolsets + `execute_graphql` + `discover_tools`** — start with a small toolset; activate more at runtime without CQRS-style grouping
26
26
  - **MR 2-step review** — `list_merge_request_changed_files` → batched `get_merge_request_file_diff`
27
27
  - **Agent Skill built in** — workflow guidance in `skills/gitlab-mcp/`
28
28
  - **Flexible auth** — Personal Access Token, local OAuth2 browser flow, MCP OAuth proxy, and per-request remote authorization
@@ -36,7 +36,7 @@ Supports PAT, OAuth, read-only mode, dynamic API URLs, and remote authorization
36
36
  | | @zereight/mcp-gitlab | GitLab MCP A (community CQRS-style) |
37
37
  |---|----------------------|-------------------------------------|
38
38
  | **Best for** | AI agent workflows | Enterprise multi-instance / grouped tools |
39
- | **Tool model** | ~267 granular tools + `discover_tools` | ~50–60 grouped `browse_*` / `manage_*` tools |
39
+ | **Tool model** | 268 tools: 266 in toolsets + `execute_graphql` + `discover_tools` | ~50–60 grouped `browse_*` / `manage_*` tools |
40
40
  | **MR review** | 2-step batched diff | Varies |
41
41
  | **Node.js** | >=18.17 | Often >=24 |
42
42
  | **License** | MIT | Varies |
@@ -116,7 +116,7 @@ The store path is pinned by your lock file; update it with `nix flake update git
116
116
 
117
117
  The examples use `zereight-mcp-gitlab`, a less collision-prone alias for the legacy `mcp-gitlab` binary. If your MCP client cannot find it, use the absolute path from `which zereight-mcp-gitlab`.
118
118
 
119
- No global install? Pin `npx` to the previous stable release (the version these docs recommend), for example `npx -y @zereight/mcp-gitlab@2.1.69`. If you always want the newest release, use `npx -y @zereight/mcp-gitlab@latest` instead. The server prints a notice to stderr on startup when a newer version is available (disable with `GITLAB_DISABLE_VERSION_CHECK=true`).
119
+ No global install? Pin `npx` to the previous stable release (the version these docs recommend), for example `npx -y @zereight/mcp-gitlab@2.2.0`. If you always want the newest release, use `npx -y @zereight/mcp-gitlab@latest` instead. The server prints a notice to stderr on startup when a newer version is available (disable with `GITLAB_DISABLE_VERSION_CHECK=true`).
120
120
 
121
121
  #### Using CLI Arguments (for clients with env var issues)
122
122
 
@@ -140,6 +140,8 @@ Some MCP clients (like GitHub Copilot CLI) have issues with environment variable
140
140
  - `--api-url` - GitLab API URL (replaces `GITLAB_API_URL`)
141
141
  - `--read-only=true` - Enable read-only mode (replaces `GITLAB_READ_ONLY_MODE`, deprecated — prefer `--permission-mode=readonly`)
142
142
  - `--permission-mode` - Permission level: `readonly`, `modify` (no delete or teardown tools), or `full` (replaces `GITLAB_PERMISSION_MODE`, default `full`)
143
+ - `--toolsets=all` - Enable named toolsets (replaces `GITLAB_TOOLSETS`; unset uses the lean `core` default)
144
+ - `--tools=list_issues` - Add individual tools (replaces `GITLAB_TOOLS`)
143
145
  - `--use-wiki=true` - Enable wiki API (replaces `USE_GITLAB_WIKI`, legacy — prefer `GITLAB_TOOLSETS=wiki`)
144
146
  - `--use-milestone=true` - Enable milestone API (replaces `USE_MILESTONE`, legacy — prefer `GITLAB_TOOLSETS=milestones`)
145
147
  - `--use-pipeline=true` - Enable pipeline API (replaces `USE_PIPELINE`, legacy — prefer `GITLAB_TOOLSETS=pipelines`)
@@ -150,6 +152,8 @@ Some MCP clients (like GitHub Copilot CLI) have issues with environment variable
150
152
  - `--masking-workspace-dir` - Directory used to resolve masking files (replaces `GITLAB_MASKING_WORKSPACE_DIR`)
151
153
  - `--compact-results=true` - Truncate oversized MCP tool replies and attach a CLI command for the full payload (replaces `GITLAB_MCP_COMPACT_RESULTS`; default off)
152
154
  - `--compact-result-chars` - Character threshold for compacting (replaces `GITLAB_MCP_COMPACT_RESULT_CHARS`; default `4000`)
155
+ - `--compact-tools` - Comma-separated tool names to compact when oversized, without turning global compact on (replaces `GITLAB_MCP_COMPACT_TOOLS`)
156
+ - `--tool-profile` - `full` (default) or `slim`. `slim` drops draft notes, emoji reactions, labels, CI catalog tools, and `create_group` from the initial list. Ignored when `GITLAB_TOOLSETS` is set (replaces `GITLAB_TOOL_PROFILE`)
153
157
 
154
158
  CLI arguments take precedence over environment variables.
155
159
 
@@ -630,15 +634,15 @@ Register the skill directory in your AI client to get optimal tool usage guidanc
630
634
  23. `protect_branch` - Protect a repository branch (set push/merge/unprotect access levels)
631
635
  24. `unprotect_branch` - Remove protection from a previously protected branch
632
636
  25. `update_default_branch` - Change the default branch of a project
633
- 26. `get_merge_request` - Get details of a merge request (mergeRequestIid or branchName required). Set include_summaries=true for deployment/commit/approval summaries
634
- 27. `get_merge_request_diffs` - Get the changes/diffs of a merge request (mergeRequestIid or branchName required)
635
- 28. `list_merge_request_changed_files` - List changed file paths in a merge request without diff content (mergeRequestIid or branchName required)
636
- 29. `list_merge_request_diffs` - List merge request diffs with pagination (mergeRequestIid or branchName required)
637
- 30. `get_merge_request_file_diff` - Get diffs for specific files from a merge request (mergeRequestIid or branchName required)
637
+ 26. `get_merge_request` - Get details of a merge request (merge_request_iid or source_branch required). Set include_summaries=true for deployment/commit/approval summaries
638
+ 27. `get_merge_request_diffs` - Get the changes/diffs of a merge request (merge_request_iid or source_branch required)
639
+ 28. `list_merge_request_changed_files` - List changed file paths in a merge request without diff content (merge_request_iid or source_branch required)
640
+ 29. `list_merge_request_diffs` - List merge request diffs with pagination (merge_request_iid or source_branch required)
641
+ 30. `get_merge_request_file_diff` - Get diffs for specific files from a merge request (merge_request_iid or source_branch required)
638
642
  31. `list_merge_request_versions` - List all versions of a merge request
639
643
  32. `get_merge_request_version` - Get a specific version of a merge request
640
644
  33. `get_branch_diffs` - Get diffs between two branches or commits
641
- 34. `update_merge_request` - Update a merge request (mergeRequestIid or branchName required)
645
+ 34. `update_merge_request` - Update a merge request (merge_request_iid or source_branch required)
642
646
  35. `create_note` - Create a new note (comment) to an issue or merge request
643
647
  36. `create_merge_request_thread` - Create a new thread on a merge request
644
648
  37. `resolve_merge_request_thread` - Resolve a thread on a merge request
@@ -675,7 +679,7 @@ Register the skill directory in your AI client to get optimal tool usage guidanc
675
679
  68. `delete_issue_note_emoji_reaction` - Remove an emoji reaction from an issue note. Pass discussion_id for discussion thread replies.
676
680
  69. `list_issues` - List issues (default: created by current user; use scope='all' for all)
677
681
  70. `my_issues` - List issues assigned to the authenticated user
678
- 71. `get_issue` - Get details of a specific issue. Returns a slim milestone by default; set full_response=true for the complete milestone object
682
+ 71. `get_issue` - Get details of a specific issue. Returns the issue with a slim nested milestone by default; set full_response=true for the complete milestone object
679
683
  72. `update_issue` - Update an issue. Returns a slim confirmation by default; set full_response=true for the complete updated issue object
680
684
  73. `update_issue_description_patch` - Apply a patch (search/replace or unified diff) to an issue description. Reduces token usage by allowing small changes without sending the full description. Supports dry_run to preview changes and create_note to summarize updates.
681
685
  74. `delete_issue` - Delete an issue
@@ -872,7 +876,7 @@ Register the skill directory in your AI client to get optimal tool usage guidanc
872
876
  265. `create_snippet` - Create a snippet — project-scoped when project_id is given, otherwise a personal snippet. Requires title plus either file_name + content (single file) or files[] (multi-file); the two shapes cannot be mixed.
873
877
  266. `update_snippet` - Update an existing snippet (provide at least one field to change). For multi-file edits — renames, deletions, additions — pass files[] with action (create/update/delete/move) and previous_path. The file_name + content shortcut still works for single-file content replacement.
874
878
  267. `delete_snippet` - Delete a snippet
875
- 268. `discover_tools` - Discover and activate additional tool categories for this session. Available categories: merge_requests, issues, repositories, branches, projects, labels, ci, groups, pipelines, milestones, wiki, releases, tags, snippets, users, workitems, webhooks, search, variables, dependency_proxy, vulnerabilities, orbit. Already-active categories are listed in the response.
879
+ 268. `discover_tools` - Discover and activate additional tool categories for this session. Available categories: core, merge_requests, issues, repositories, branches, projects, labels, ci, groups, pipelines, milestones, wiki, releases, tags, snippets, users, workitems, webhooks, search, variables, dependency_proxy, vulnerabilities, orbit. Already-active categories are listed in the response.
876
880
 
877
881
  <!-- TOOLS-END -->
878
882
 
package/README.pt-BR.md CHANGED
@@ -17,7 +17,7 @@ Suporta PAT, OAuth, modo somente leitura, URLs de API dinâmicas e autorização
17
17
 
18
18
  ### Por que usar este GitLab MCP?
19
19
 
20
- - **267 ferramentas + `discover_tools`** — comece com um toolset pequeno e ative mais categorias em tempo de execução
20
+ - **268 ferramentas: 266 em toolsets + `execute_graphql` + `discover_tools`** — comece com um toolset pequeno e ative mais categorias em tempo de execução
21
21
  - **Revisão de MR em 2 etapas** — `list_merge_request_changed_files` → `get_merge_request_file_diff` em lote
22
22
  - **Agent Skill integrado** — orientação de workflows em `skills/gitlab-mcp/`
23
23
  - **Autenticação flexível** — Personal Access Token, fluxo OAuth2 local no navegador, proxy MCP OAuth e autorização remota por requisição
@@ -31,7 +31,7 @@ Suporta PAT, OAuth, modo somente leitura, URLs de API dinâmicas e autorização
31
31
  | | @zereight/mcp-gitlab | GitLab MCP A (comunidade, estilo CQRS) |
32
32
  | ------------------------- | ---------------------------------------------- | --------------------------------------------------------- |
33
33
  | **Mais indicado para** | Workflows de agentes de IA | Múltiplas instâncias corporativas / ferramentas agrupadas |
34
- | **Modelo de ferramentas** | ~267 ferramentas granulares + `discover_tools` | ~50–60 ferramentas agrupadas `browse_*` / `manage_*` |
34
+ | **Modelo de ferramentas** | 268 ferramentas: 266 em toolsets + `execute_graphql` + `discover_tools` | ~50–60 ferramentas agrupadas `browse_*` / `manage_*` |
35
35
  | **Revisão de MR** | Diff em lote em 2 etapas | Varia |
36
36
  | **Node.js** | >=18.17 | Frequentemente >=24 |
37
37
  | **Licença** | MIT | Varia |
@@ -111,7 +111,7 @@ O caminho no store é fixado pelo seu lock file; atualize-o com `nix flake updat
111
111
 
112
112
  Os exemplos usam `zereight-mcp-gitlab`, um alias com menor chance de conflito que o binário legado `mcp-gitlab`. Se o seu cliente MCP não o encontrar, use o caminho absoluto retornado por `which zereight-mcp-gitlab`.
113
113
 
114
- Não quer instalar globalmente? Fixe o `npx` na versão estável anterior (a versão recomendada por esta documentação), por exemplo `npx -y @zereight/mcp-gitlab@2.1.69`. Se quiser sempre a versão mais recente, use `npx -y @zereight/mcp-gitlab@latest`. O servidor exibe um aviso no stderr durante a inicialização quando existe uma versão mais nova disponível (desative com `GITLAB_DISABLE_VERSION_CHECK=true`).
114
+ Não quer instalar globalmente? Fixe o `npx` na versão estável anterior (a versão recomendada por esta documentação), por exemplo `npx -y @zereight/mcp-gitlab@2.2.0`. Se quiser sempre a versão mais recente, use `npx -y @zereight/mcp-gitlab@latest`. O servidor exibe um aviso no stderr durante a inicialização quando existe uma versão mais nova disponível (desative com `GITLAB_DISABLE_VERSION_CHECK=true`).
115
115
 
116
116
  #### Usando argumentos de CLI (para clientes com problemas com variáveis de ambiente)
117
117
 
@@ -135,6 +135,8 @@ Alguns clientes MCP, como o GitHub Copilot CLI, têm problemas com variáveis de
135
135
  - `--api-url` - URL da API do GitLab (substitui `GITLAB_API_URL`)
136
136
  - `--read-only=true` - ativa o modo somente leitura (substitui `GITLAB_READ_ONLY_MODE`, obsoleto — prefira `--permission-mode=readonly`)
137
137
  - `--permission-mode` - nível de permissão: `readonly`, `modify` (sem ferramentas de exclusão ou teardown) ou `full` (substitui `GITLAB_PERMISSION_MODE`, padrão `full`)
138
+ - `--toolsets=all` - ativa toolsets nomeados (substitui `GITLAB_TOOLSETS`; sem valor usa o padrão enxuto `core`)
139
+ - `--tools=list_issues` - adiciona ferramentas individuais (substitui `GITLAB_TOOLS`)
138
140
  - `--use-wiki=true` - ativa a API de Wiki (substitui `USE_GITLAB_WIKI`, legado — prefira `GITLAB_TOOLSETS=wiki`)
139
141
  - `--use-milestone=true` - ativa a API de milestones (substitui `USE_MILESTONE`, legado — prefira `GITLAB_TOOLSETS=milestones`)
140
142
  - `--use-pipeline=true` - ativa a API de pipelines (substitui `USE_PIPELINE`, legado — prefira `GITLAB_TOOLSETS=pipelines`)
@@ -145,6 +147,8 @@ Alguns clientes MCP, como o GitHub Copilot CLI, têm problemas com variáveis de
145
147
  - `--masking-workspace-dir` - diretório usado para resolver arquivos de mascaramento (substitui `GITLAB_MASKING_WORKSPACE_DIR`)
146
148
  - `--compact-results=true` - trunca respostas muito grandes de ferramentas MCP e anexa um comando CLI para a carga completa (substitui `GITLAB_MCP_COMPACT_RESULTS`; desativado por padrão)
147
149
  - `--compact-result-chars` - limite de caracteres para compactação (substitui `GITLAB_MCP_COMPACT_RESULT_CHARS`; padrão `4000`)
150
+ - `--compact-tools` - nomes de ferramentas separados por vírgula para compactar quando a resposta for grande, sem ativar o compact global (substitui `GITLAB_MCP_COMPACT_TOOLS`)
151
+ - `--tool-profile` - `full` (padrão) ou `slim`. `slim` remove draft notes, reações com emoji, labels, ferramentas do catálogo de CI e `create_group` da lista inicial. Ignorado apenas quando `GITLAB_TOOLSETS` tem um valor não em branco (substitui `GITLAB_TOOL_PROFILE`)
148
152
 
149
153
  Os argumentos de CLI têm precedência sobre as variáveis de ambiente.
150
154
 
@@ -164,7 +168,7 @@ O mesmo binário também é uma CLI do GitLab no estilo `gh` (`tool <name>` ou f
164
168
  > Consulte a [Referência de ferramentas](./docs/tools/index.md#feature-toggles) e
165
169
  > [Variáveis de ambiente](./docs/configuration/environment-variables.md).
166
170
 
167
- #### SSE
171
+ - sse
168
172
 
169
173
  ```shell
170
174
  docker run -i --rm \
@@ -193,7 +197,7 @@ docker run -i --rm \
193
197
  }
194
198
  ```
195
199
 
196
- #### Streamable HTTP
200
+ - streamable-http
197
201
 
198
202
  ```shell
199
203
  docker run -i --rm \
package/README.zh-CN.md CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  ### 为什么使用这个 GitLab MCP?
19
19
 
20
- - **267 个工具 + `discover_tools`** — 从小型 toolset 开始,运行时按需激活类别
20
+ - **268 个工具:toolset 中 266 个 + `execute_graphql` + `discover_tools`** — 从小型 toolset 开始,运行时按需激活类别
21
21
  - **MR 两步审查** — `list_merge_request_changed_files` → 批量 `get_merge_request_file_diff`
22
22
  - **内置 Agent Skill** — `skills/gitlab-mcp/` 工作流指南
23
23
  - **认证灵活** — Personal Access Token、本地 OAuth2 浏览器流程、MCP OAuth 代理、按请求远程授权
@@ -31,7 +31,7 @@
31
31
  | | @zereight/mcp-gitlab | GitLab MCP A(社区 CQRS 型) |
32
32
  |---|----------------------|------------------------------|
33
33
  | **更适合** | AI 代理工作流 | 企业多实例 / 分组工具 |
34
- | **工具模型** | ~267 个细粒度工具 + `discover_tools` | ~50–60 个 `browse_*` / `manage_*` 分组工具 |
34
+ | **工具模型** | 268 个工具:toolset 中 266 个 + `execute_graphql` + `discover_tools` | ~50–60 个 `browse_*` / `manage_*` 分组工具 |
35
35
  | **MR 审查** | 两步批量 diff | 因服务器而异 |
36
36
  | **Node.js** | >=18.17 | 通常 >=24 |
37
37
  | **许可证** | MIT | 因服务器而异 |
@@ -111,7 +111,7 @@ command = lib.getExe inputs.gitlab-mcp.packages.${system}.default;
111
111
 
112
112
  示例使用 `zereight-mcp-gitlab`,这是比旧的 `mcp-gitlab` 更不容易冲突的别名。如果 MCP 客户端找不到它,请使用 `which zereight-mcp-gitlab` 输出的绝对路径。
113
113
 
114
- 如果不想全局安装,请将 `npx` 固定到上一个稳定版本(即文档推荐的版本),例如 `npx -y @zereight/mcp-gitlab@2.1.69`。如果始终想使用最新版本,请改用 `npx -y @zereight/mcp-gitlab@latest`。有新版本发布时,服务器会在启动时通过 stderr 提示(可用 `GITLAB_DISABLE_VERSION_CHECK=true` 关闭)。
114
+ 如果不想全局安装,请将 `npx` 固定到上一个稳定版本(即文档推荐的版本),例如 `npx -y @zereight/mcp-gitlab@2.2.0`。如果始终想使用最新版本,请改用 `npx -y @zereight/mcp-gitlab@latest`。有新版本发布时,服务器会在启动时通过 stderr 提示(可用 `GITLAB_DISABLE_VERSION_CHECK=true` 关闭)。
115
115
 
116
116
  #### 使用 CLI 参数(适用于环境变量有问题的客户端)
117
117
 
@@ -135,6 +135,8 @@ command = lib.getExe inputs.gitlab-mcp.packages.${system}.default;
135
135
  - `--api-url` - GitLab API URL(替代 `GITLAB_API_URL`)
136
136
  - `--read-only=true` - 启用只读模式(替代 `GITLAB_READ_ONLY_MODE`,已弃用 — 推荐 `--permission-mode=readonly`)
137
137
  - `--permission-mode` - 权限级别:`readonly`、`modify`(禁用删除/拆除工具)或 `full`(替代 `GITLAB_PERMISSION_MODE`,默认 `full`)
138
+ - `--toolsets=all` - 启用指定工具集(替代 `GITLAB_TOOLSETS`;未设置时使用精简 `core` 默认值)
139
+ - `--tools=list_issues` - 添加单个工具(替代 `GITLAB_TOOLS`)
138
140
  - `--use-wiki=true` - 启用 Wiki API(替代 `USE_GITLAB_WIKI`,旧版 — 推荐 `GITLAB_TOOLSETS=wiki`)
139
141
  - `--use-milestone=true` - 启用里程碑 API(替代 `USE_MILESTONE`,旧版 — 推荐 `GITLAB_TOOLSETS=milestones`)
140
142
  - `--use-pipeline=true` - 启用流水线 API(替代 `USE_PIPELINE`,旧版 — 推荐 `GITLAB_TOOLSETS=pipelines`)
@@ -145,6 +147,8 @@ command = lib.getExe inputs.gitlab-mcp.packages.${system}.default;
145
147
  - `--masking-workspace-dir` - 用于解析掩码文件的目录(替代 `GITLAB_MASKING_WORKSPACE_DIR`)
146
148
  - `--compact-results=true` - 将过大的 MCP 工具回复截断为预览并附带 CLI 命令(替代 `GITLAB_MCP_COMPACT_RESULTS`,默认关闭)
147
149
  - `--compact-result-chars` - compact 字符阈值(替代 `GITLAB_MCP_COMPACT_RESULT_CHARS`,默认 `4000`)
150
+ - `--compact-tools` - 以逗号分隔的工具名,仅在回复过大时对这些工具进行 compact,而不开启全局 compact(替代 `GITLAB_MCP_COMPACT_TOOLS`)
151
+ - `--tool-profile` - `full`(默认)或 `slim`。`slim` 会从初始列表中移除 draft note、表情回应、标签、CI 目录工具以及 `create_group`。仅当 `GITLAB_TOOLSETS` 设置为非空白值时忽略(替代 `GITLAB_TOOL_PROFILE`)
148
152
 
149
153
  CLI 参数优先于环境变量。
150
154
 
@@ -163,7 +167,7 @@ CLI 参数优先于环境变量。
163
167
  > 参见 [Tools Reference](./docs/tools/index.md#feature-toggles) 和
164
168
  > [Environment Variables](./docs/configuration/environment-variables.md)。
165
169
 
166
- #### SSE
170
+ - sse
167
171
 
168
172
  ```shell
169
173
  docker run -i --rm \
@@ -192,7 +196,7 @@ docker run -i --rm \
192
196
  }
193
197
  ```
194
198
 
195
- #### Streamable HTTP
199
+ - streamable-http
196
200
 
197
201
  ```shell
198
202
  docker run -i --rm \
package/build/config.js CHANGED
@@ -1,4 +1,6 @@
1
1
  import { BOOLEAN_CLI_FLAG_NAMES, nextBooleanFlagValue } from "./cli-boolean-flags.js";
2
+ import { parseToolProfile } from "./tools/tool-profile.js";
3
+ import { parseCompactToolAllowlist } from "./utils/compact-tool-allowlist.js";
2
4
  // Parse CLI arguments before anything else
3
5
  const args = process.argv.slice(2);
4
6
  export const cliArgs = {};
@@ -51,8 +53,9 @@ export const GITLAB_MASKING_CONFIG = getConfig("masking-config", "GITLAB_MASKING
51
53
  export const GITLAB_MASKING_POLICY_FILE = getConfig("masking-policy-file", "GITLAB_MASKING_POLICY_FILE");
52
54
  export const GITLAB_MASKING_WORKSPACE_DIR = getConfig("masking-workspace-dir", "GITLAB_MASKING_WORKSPACE_DIR");
53
55
  const PERMISSION_MODES = ["readonly", "modify", "full"];
56
+ export const GITLAB_PERMISSION_MODE_RAW = getConfig("permission-mode", "GITLAB_PERMISSION_MODE");
54
57
  export const GITLAB_PERMISSION_MODE = (() => {
55
- const raw = getConfig("permission-mode", "GITLAB_PERMISSION_MODE");
58
+ const raw = GITLAB_PERMISSION_MODE_RAW;
56
59
  if (raw !== undefined && !PERMISSION_MODES.includes(raw)) {
57
60
  throw new Error(`Invalid GITLAB_PERMISSION_MODE: "${raw}". Expected one of: ${PERMISSION_MODES.join(", ")}`);
58
61
  }
@@ -62,15 +65,19 @@ export const GITLAB_PERMISSION_MODE = (() => {
62
65
  }
63
66
  return raw ?? "full";
64
67
  })();
65
- export const USE_GITLAB_WIKI = getConfig("use-wiki", "USE_GITLAB_WIKI") === "true";
66
- export const USE_MILESTONE = getConfig("use-milestone", "USE_MILESTONE") === "true";
67
- export const USE_PIPELINE = getConfig("use-pipeline", "USE_PIPELINE") === "true";
68
+ export const USE_GITLAB_WIKI_RAW = getConfig("use-wiki", "USE_GITLAB_WIKI");
69
+ export const USE_GITLAB_WIKI = USE_GITLAB_WIKI_RAW === "true";
70
+ export const USE_MILESTONE_RAW = getConfig("use-milestone", "USE_MILESTONE");
71
+ export const USE_MILESTONE = USE_MILESTONE_RAW === "true";
72
+ export const USE_PIPELINE_RAW = getConfig("use-pipeline", "USE_PIPELINE");
73
+ export const USE_PIPELINE = USE_PIPELINE_RAW === "true";
68
74
  export const GITLAB_DISABLE_VERSION_CHECK = getConfig("disable-version-check", "GITLAB_DISABLE_VERSION_CHECK") === "true";
69
75
  // ---------------------------------------------------------------------------
70
76
  // Tool filtering
71
77
  // ---------------------------------------------------------------------------
72
78
  export const GITLAB_TOOLSETS_RAW = getConfig("toolsets", "GITLAB_TOOLSETS");
73
79
  export const GITLAB_TOOLS_RAW = getConfig("tools", "GITLAB_TOOLS");
80
+ export const GITLAB_TOOL_PROFILE = parseToolProfile(getConfig("tool-profile", "GITLAB_TOOL_PROFILE"));
74
81
  // Tool policy: comma-separated tool names
75
82
  // approve = exposed but requires confirmation; hidden = not exposed at all
76
83
  export const GITLAB_TOOL_POLICY_APPROVE_RAW = getConfig("tool-policy-approve", "GITLAB_TOOL_POLICY_APPROVE");
@@ -185,6 +192,7 @@ const _PORT_DEFAULT = 3002;
185
192
  export const PORT = _intEnv("PORT", "port", _PORT_DEFAULT);
186
193
  /** When true, oversized MCP tool replies are replaced with a preview plus a CLI replay command. */
187
194
  export const GITLAB_MCP_COMPACT_RESULTS = getConfig("compact-results", "GITLAB_MCP_COMPACT_RESULTS") === "true";
195
+ export const GITLAB_MCP_COMPACT_TOOL_NAMES = parseCompactToolAllowlist(getConfig("compact-tools", "GITLAB_MCP_COMPACT_TOOLS"));
188
196
  export const GITLAB_MCP_COMPACT_RESULT_CHARS = _intEnv("GITLAB_MCP_COMPACT_RESULT_CHARS", "compact-result-chars", 4000);
189
197
  // ---------------------------------------------------------------------------
190
198
  // Proxy configuration
@@ -0,0 +1,63 @@
1
+ function shownEnvValue(rawValue) {
2
+ const singleLine = rawValue.replace(/[\r\n]/g, " ");
3
+ if (singleLine.length <= 80) {
4
+ return singleLine;
5
+ }
6
+ return `${singleLine.slice(0, 77)}...`;
7
+ }
8
+ // USE_PIPELINE exposes these two tools, but they live in the `ci` toolset, not `pipelines`.
9
+ // Suggesting `ci` would also turn on catalog tools the flag does not expose.
10
+ const LEGACY_TOOLS_OUTSIDE_NAMED_TOOLSET = {
11
+ pipelines: "validate_ci_lint,validate_project_ci_lint",
12
+ };
13
+ function legacyToolsetReplacement(toolset) {
14
+ const toolsets = `GITLAB_TOOLSETS=core,${toolset}`;
15
+ const extraTools = LEGACY_TOOLS_OUTSIDE_NAMED_TOOLSET[toolset];
16
+ if (extraTools === undefined) {
17
+ return toolsets;
18
+ }
19
+ return `${toolsets} and GITLAB_TOOLS=${extraTools}`;
20
+ }
21
+ function legacyToolsetWarning(envName, rawValue, toolset) {
22
+ // An explicit GITLAB_TOOLSETS list replaces the default toolsets; it does not merge.
23
+ // Legacy USE_* flags add tools on top of defaults, so the hint must keep `core`.
24
+ const replacement = legacyToolsetReplacement(toolset);
25
+ if (rawValue === "true") {
26
+ return (`${envName} is deprecated and will be removed in the next major version. ` +
27
+ `Use ${replacement} instead.`);
28
+ }
29
+ const shown = shownEnvValue(rawValue);
30
+ return (`${envName} is set to "${shown}" and is deprecated. ` +
31
+ `This value does not enable the ${toolset} toolset. Remove it. ` +
32
+ `Set ${replacement} only if you want those tools in addition to core.`);
33
+ }
34
+ /**
35
+ * Builds startup warnings for deprecated env vars / CLI flags.
36
+ * Pure function so the messages and conflict detection are unit-testable.
37
+ */
38
+ export function getDeprecatedEnvWarnings(input) {
39
+ const warnings = [];
40
+ if (input.readOnlyMode) {
41
+ const conflict = input.permissionModeRaw !== undefined && input.permissionModeRaw !== "readonly"
42
+ ? ` It OVERRIDES the configured permission mode "${input.permissionModeRaw}"; the server runs as "readonly".`
43
+ : "";
44
+ warnings.push("GITLAB_READ_ONLY_MODE is deprecated and will be removed in the next major version. " +
45
+ `Use GITLAB_PERMISSION_MODE=readonly or --permission-mode=readonly instead.${conflict}`);
46
+ }
47
+ if (input.allowedGroupsRaw) {
48
+ warnings.push(input.oauthAllowedGroupsRaw
49
+ ? "GITLAB_ALLOWED_GROUPS is deprecated and ignored because GITLAB_OAUTH_ALLOWED_GROUPS is set. Remove it."
50
+ : "GITLAB_ALLOWED_GROUPS is deprecated and will be removed in the next major version. Use GITLAB_OAUTH_ALLOWED_GROUPS instead.");
51
+ }
52
+ const legacyToolsetFlags = [
53
+ [input.useWikiRaw, "USE_GITLAB_WIKI", "wiki"],
54
+ [input.useMilestoneRaw, "USE_MILESTONE", "milestones"],
55
+ [input.usePipelineRaw, "USE_PIPELINE", "pipelines"],
56
+ ];
57
+ for (const [rawValue, envName, toolset] of legacyToolsetFlags) {
58
+ if (rawValue !== undefined) {
59
+ warnings.push(legacyToolsetWarning(envName, rawValue, toolset));
60
+ }
61
+ }
62
+ return warnings;
63
+ }