@zereight/mcp-gitlab 2.2.5 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.ko.md CHANGED
@@ -36,7 +36,7 @@ PAT, OAuth, 읽기 전용 모드, 동적 API URL, 원격 인증을 지원하며
36
36
 
37
37
  ### 왜 이 GitLab MCP를 사용하나요?
38
38
 
39
- - **275개 도구: toolset 273개 + `execute_graphql` + `discover_tools`** — 작은 toolset으로 시작하고, 런타임에 카테고리 활성화
39
+ - **276개 도구: toolset 274개 + `execute_graphql` + `discover_tools`** — 작은 toolset으로 시작하고, 런타임에 카테고리 활성화
40
40
  - **MR 2단계 리뷰** — `list_merge_request_changed_files` → 배치 `get_merge_request_file_diff`
41
41
  - **Agent Skill 내장** — `skills/gitlab-mcp/` 워크플로우 가이드
42
42
  - **유연한 인증** — Personal Access Token, 로컬 OAuth2 브라우저 플로우, MCP OAuth 프록시, 요청별 원격 인증
@@ -50,7 +50,7 @@ PAT, OAuth, 읽기 전용 모드, 동적 API URL, 원격 인증을 지원하며
50
50
  | | @zereight/mcp-gitlab | GitLab MCP A (커뮤니티 CQRS형) | GitLab 공식 MCP 서버 |
51
51
  | --------------- | ---------------------------------------------------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
52
52
  | **적합한 경우** | AI 에이전트 워크플로우 | 엔터프라이즈 멀티 인스턴스 / 그룹형 도구 | GitLab에 내장, 별도 설치 없음 |
53
- | **도구 모델** | 275개 도구: toolset 273개 + `execute_graphql` + `discover_tools` | ~50–60개 `browse_*` / `manage_*` 그룹 도구 | HTTP 헤더로 고르는 toolset |
53
+ | **도구 모델** | 276개 도구: toolset 274개 + `execute_graphql` + `discover_tools` | ~50–60개 `browse_*` / `manage_*` 그룹 도구 | HTTP 헤더로 고르는 toolset |
54
54
  | **MR 리뷰** | 2단계 배치 diff | 서버마다 다름 | `get_merge_request`에 diffs |
55
55
  | **Node.js** | >=18.17 | 보통 >=24 | stdio는 `mcp-remote`, Node.js 20+ |
56
56
  | **라이선스** | MIT | 서버마다 다름 | GitLab의 일부 |
@@ -138,7 +138,7 @@ command = lib.getExe inputs.gitlab-mcp.packages.${system}.default;
138
138
 
139
139
  예시는 기존 `mcp-gitlab`보다 충돌 가능성이 낮은 `zereight-mcp-gitlab` 별칭을 사용합니다. MCP 클라이언트가 찾지 못하면 `which zereight-mcp-gitlab`의 절대 경로를 사용하세요.
140
140
 
141
- 전역 설치를 쓰지 않으려면 `npx -y @zereight/mcp-gitlab@2.2.4`처럼 직전 안정 버전(문서가 권장하는 버전)으로 고정하세요. 항상 최신 버전을 원하면 `npx -y @zereight/mcp-gitlab@latest`를 사용하세요. 새 버전이 나오면 서버가 시작 시 stderr로 알려줍니다(`GITLAB_DISABLE_VERSION_CHECK=true`로 비활성화 가능).
141
+ 전역 설치를 쓰지 않으려면 `npx -y @zereight/mcp-gitlab@2.2.6`처럼 직전 안정 버전(문서가 권장하는 버전)으로 고정하세요. 항상 최신 버전을 원하면 `npx -y @zereight/mcp-gitlab@latest`를 사용하세요. 새 버전이 나오면 서버가 시작 시 stderr로 알려줍니다(`GITLAB_DISABLE_VERSION_CHECK=true`로 비활성화 가능).
142
142
 
143
143
  #### CLI 인자 사용하기(환경 변수 문제가 있는 클라이언트용)
144
144
 
@@ -172,6 +172,7 @@ command = lib.getExe inputs.gitlab-mcp.packages.${system}.default;
172
172
  - `--masking-config` - 마스킹 설정 파일 경로 (`GITLAB_MASKING_CONFIG` 대체)
173
173
  - `--masking-policy-file` - 보호된 관리형 정책 파일 경로 (`GITLAB_MASKING_POLICY_FILE` 대체)
174
174
  - `--masking-workspace-dir` - 마스킹 파일 경로를 해석하는 기준 디렉터리 (`GITLAB_MASKING_WORKSPACE_DIR` 대체)
175
+ - `--download-dir` - `download_attachment`가 파일을 저장하는 디렉터리 (`GITLAB_DOWNLOAD_DIR` 대체, 기본값 `.gitlab-mcp-downloads`)
175
176
  - `--compact-results=true` - 큰 MCP 도구 응답을 미리보기와 CLI 명령으로 바꿈 (`GITLAB_MCP_COMPACT_RESULTS` 대체, 기본 꺼짐)
176
177
  - `--compact-result-chars` - compact 임계값 문자 수 (`GITLAB_MCP_COMPACT_RESULT_CHARS` 대체, 기본 `4000`)
177
178
  - `--compact-tools` - 전역 compact를 켜지 않고, 응답이 클 때 compact할 도구 이름을 쉼표로 지정 (`GITLAB_MCP_COMPACT_TOOLS` 대체)
@@ -302,8 +303,9 @@ MCP 서버가 직접 로컬 브라우저 callback을 받을 때만 `GITLAB_OAUTH
302
303
  | `MCP_SERVER_URL` | 예 | 이 MCP 서버의 공개 HTTPS URL |
303
304
  | `STREAMABLE_HTTP` | 예 | 반드시 `true` |
304
305
  | `GITLAB_OAUTH_CALLBACK_PROXY` | 선택 | MCP 서버의 고정 `/callback` URL을 사용하려면 `true` |
306
+ | `GITLAB_OAUTH_ALLOWED_REDIRECT_URIS` | 선택 | 콜백 프록시 모드가 리다이렉트할 클라이언트 callback URL 목록 (기본값: Claude, ChatGPT, Cursor, 루프백 callback. 추가하려면 `defaults,<url>`) |
305
307
  | `GITLAB_OAUTH_SCOPES` | 선택 | 쉼표로 구분된 scope 목록(기본값: `api,read_api,read_user`) |
306
- | `GITLAB_OAUTH_ALLOWED_GROUPS` | 선택 | 쉼표로 구분된 GitLab 그룹 전체 경로 — 해당 그룹 및 하위 그룹 멤버만 토큰을 발급받을 수 있음 (기존 `GITLAB_ALLOWED_GROUPS` 대체) |
308
+ | `GITLAB_OAUTH_ALLOWED_GROUPS` | 선택 | 쉼표로 구분된 GitLab 그룹 전체 경로 — 해당 그룹 및 하위 그룹 멤버만 서버를 사용할 수 있음 (기존 `GITLAB_ALLOWED_GROUPS` 대체) |
307
309
 
308
310
  `STREAMABLE_HTTP=true`일 때 서버 측 GitLab 자격 증명(`GITLAB_PERSONAL_ACCESS_TOKEN`, `GITLAB_JOB_TOKEN`, `GITLAB_AUTH_COOKIE_PATH`, 또는 `GITLAB_USE_OAUTH`)은 `REMOTE_AUTHORIZATION=true`, `GITLAB_MCP_OAUTH=true`, 또는 `STREAMABLE_HTTP_AUTH_TOKEN`이 필요합니다.
309
311
 
@@ -406,6 +408,7 @@ Authorization: Bearer glpat-xxxxxxxxxxxxxxxxxxxx
406
408
  - `MCP_ALLOWED_ORIGINS`
407
409
  - `GITLAB_MCP_OAUTH`
408
410
  - `GITLAB_OAUTH_CALLBACK_PROXY`
411
+ - `GITLAB_OAUTH_ALLOWED_REDIRECT_URIS`
409
412
  - `OAUTH_REGISTER_RATE_LIMIT_PER_HOUR`
410
413
  - `OAUTH_STATELESS_MODE`
411
414
  - `OAUTH_STATELESS_SECRET`
package/README.md CHANGED
@@ -41,7 +41,7 @@ Supports PAT, OAuth, read-only mode, dynamic API URLs, and remote authorization
41
41
 
42
42
  ### Why use this GitLab MCP?
43
43
 
44
- - **275 tools: 273 in toolsets + `execute_graphql` + `discover_tools`** — start with a small toolset; activate more at runtime without CQRS-style grouping
44
+ - **276 tools: 274 in toolsets + `execute_graphql` + `discover_tools`** — start with a small toolset; activate more at runtime without CQRS-style grouping
45
45
  - **MR 2-step review** — `list_merge_request_changed_files` → batched `get_merge_request_file_diff`
46
46
  - **Agent Skill built in** — workflow guidance in `skills/gitlab-mcp/`
47
47
  - **Flexible auth** — Personal Access Token, local OAuth2 browser flow, MCP OAuth proxy, and per-request remote authorization
@@ -55,7 +55,7 @@ Supports PAT, OAuth, read-only mode, dynamic API URLs, and remote authorization
55
55
  | | @zereight/mcp-gitlab | GitLab MCP A (community CQRS-style) | GitLab official MCP server |
56
56
  | -------------- | ----------------------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
57
57
  | **Best for** | AI agent workflows | Enterprise multi-instance / grouped tools | Built into GitLab, no separate install |
58
- | **Tool model** | 275 tools: 273 in toolsets + `execute_graphql` + `discover_tools` | ~50–60 grouped `browse_*` / `manage_*` tools | Toolsets chosen with an HTTP header |
58
+ | **Tool model** | 276 tools: 274 in toolsets + `execute_graphql` + `discover_tools` | ~50–60 grouped `browse_*` / `manage_*` tools | Toolsets chosen with an HTTP header |
59
59
  | **MR review** | 2-step batched diff | Varies | `get_merge_request` with diffs |
60
60
  | **Node.js** | >=18.17 | Often >=24 | Node.js 20+ for stdio via `mcp-remote` |
61
61
  | **License** | MIT | Varies | Part of GitLab |
@@ -143,7 +143,7 @@ The store path is pinned by your lock file; update it with `nix flake update git
143
143
 
144
144
  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`.
145
145
 
146
- No global install? Pin `npx` to the previous stable release (the version these docs recommend), for example `npx -y @zereight/mcp-gitlab@2.2.4`. 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`).
146
+ No global install? Pin `npx` to the previous stable release (the version these docs recommend), for example `npx -y @zereight/mcp-gitlab@2.2.6`. 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`).
147
147
 
148
148
  #### Using CLI Arguments (for clients with env var issues)
149
149
 
@@ -177,6 +177,7 @@ Some MCP clients (like GitHub Copilot CLI) have issues with environment variable
177
177
  - `--masking-config` - Path to a masking configuration file (replaces `GITLAB_MASKING_CONFIG`)
178
178
  - `--masking-policy-file` - Path to a protected managed-policy file (replaces `GITLAB_MASKING_POLICY_FILE`)
179
179
  - `--masking-workspace-dir` - Directory used to resolve masking files (replaces `GITLAB_MASKING_WORKSPACE_DIR`)
180
+ - `--download-dir` - Directory `download_attachment` saves files under (replaces `GITLAB_DOWNLOAD_DIR`; default `.gitlab-mcp-downloads`)
180
181
  - `--compact-results=true` - Truncate oversized MCP tool replies and attach a CLI command for the full payload (replaces `GITLAB_MCP_COMPACT_RESULTS`; default off)
181
182
  - `--compact-result-chars` - Character threshold for compacting (replaces `GITLAB_MCP_COMPACT_RESULT_CHARS`; default `4000`)
182
183
  - `--compact-tools` - Comma-separated tool names to compact when oversized, without turning global compact on (replaces `GITLAB_MCP_COMPACT_TOOLS`)
@@ -324,8 +325,9 @@ exchanging credentials with GitLab on behalf of the client.
324
325
  | `MCP_SERVER_URL` | ✅ | Public HTTPS URL of this MCP server |
325
326
  | `STREAMABLE_HTTP` | ✅ | Must be `true` |
326
327
  | `GITLAB_OAUTH_CALLBACK_PROXY` | optional | Set to `true` to use the MCP server's fixed `/callback` URL |
328
+ | `GITLAB_OAUTH_ALLOWED_REDIRECT_URIS` | optional | Client callback URLs that callback proxy mode will redirect to (default: Claude, ChatGPT, Cursor and loopback callbacks; `defaults,<url>` to add one) |
327
329
  | `GITLAB_OAUTH_SCOPES` | optional | Comma-separated scopes (default: `api,read_api,read_user`) |
328
- | `GITLAB_OAUTH_ALLOWED_GROUPS` | optional | Comma-separated group full paths — only members (and subgroup members) may obtain a token (replaces deprecated `GITLAB_ALLOWED_GROUPS`) |
330
+ | `GITLAB_OAUTH_ALLOWED_GROUPS` | optional | Comma-separated group full paths — only members (and subgroup members) may use the server (replaces deprecated `GITLAB_ALLOWED_GROUPS`) |
329
331
 
330
332
  When `STREAMABLE_HTTP=true`, server-side GitLab credentials (`GITLAB_PERSONAL_ACCESS_TOKEN`, `GITLAB_JOB_TOKEN`, `GITLAB_AUTH_COOKIE_PATH`, or `GITLAB_USE_OAUTH`) require `REMOTE_AUTHORIZATION=true`, `GITLAB_MCP_OAUTH=true`, or `STREAMABLE_HTTP_AUTH_TOKEN`.
331
333
 
@@ -442,6 +444,7 @@ Commonly referenced variables:
442
444
  - `MCP_ALLOWED_ORIGINS`
443
445
  - `GITLAB_MCP_OAUTH`
444
446
  - `GITLAB_OAUTH_CALLBACK_PROXY`
447
+ - `GITLAB_OAUTH_ALLOWED_REDIRECT_URIS`
445
448
  - `OAUTH_REGISTER_RATE_LIMIT_PER_HOUR`
446
449
  - `OAUTH_STATELESS_MODE`
447
450
  - `OAUTH_STATELESS_SECRET`
@@ -846,7 +849,7 @@ Register the skill directory in your AI client to get optimal tool usage guidanc
846
849
  195. `create_commit_status` - Create or update the status of a commit
847
850
  196. `list_group_iterations` - List group iterations with filtering options
848
851
  197. `upload_markdown` - Upload a file for use in markdown content
849
- 198. `download_attachment` - Download an uploaded file from a project (images returned as base64; use local_path to save to disk)
852
+ 198. `download_attachment` - Download an uploaded file from a project (images returned as base64; other files, or images with local_path, are saved as new files under the download directory)
850
853
  199. `health_check` - Verify server status and authentication. Always reports the MCP server version (mcp_server_version). When authenticated, also reports the GitLab instance version from GET /api/v4/version (version, revision, enterprise). Version lookup failures do not fail the health check — those fields are omitted.
851
854
  200. `list_events` - List events for the authenticated user (before/after: YYYY-MM-DD)
852
855
  201. `get_project_events` - List events for a project (before/after: YYYY-MM-DD)
@@ -922,8 +925,9 @@ Register the skill directory in your AI client to get optimal tool usage guidanc
922
925
  271. `delete_snippet` - Delete a snippet
923
926
  272. `list_project_runners` - List runners available to a project (type, status, paused, tag_list). Omits registration and authentication tokens.
924
927
  273. `get_runner` - Get a runner's tag_list, run_untagged, locked, and access_level. When a project allowlist is active, the runner must be available to an allowed project. Omits registration and authentication tokens.
925
- 274. `gitlab_api_request` - Send one GitLab REST call under /api/v4. Enabled only when GITLAB_TOOLSETS lists api. Readonly allows GET; modify rejects DELETE.
926
- 275. `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.
928
+ 274. `rebase_merge_request` - Rebase the source branch of a merge request onto its target branch
929
+ 275. `gitlab_api_request` - Send one GitLab REST call under /api/v4. Enabled only when GITLAB_TOOLSETS lists api. Readonly allows GET; modify rejects DELETE.
930
+ 276. `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.
927
931
 
928
932
  <!-- TOOLS-END -->
929
933
 
package/README.pt-BR.md CHANGED
@@ -36,7 +36,7 @@ Suporta PAT, OAuth, modo somente leitura, URLs de API dinâmicas e autorização
36
36
 
37
37
  ### Por que usar este GitLab MCP?
38
38
 
39
- - **275 ferramentas: 273 em toolsets + `execute_graphql` + `discover_tools`** — comece com um toolset pequeno e ative mais categorias em tempo de execução
39
+ - **276 ferramentas: 274 em toolsets + `execute_graphql` + `discover_tools`** — comece com um toolset pequeno e ative mais categorias em tempo de execução
40
40
  - **Revisão de MR em 2 etapas** — `list_merge_request_changed_files` → `get_merge_request_file_diff` em lote
41
41
  - **Agent Skill integrado** — orientação de workflows em `skills/gitlab-mcp/`
42
42
  - **Autenticação flexível** — Personal Access Token, fluxo OAuth2 local no navegador, proxy MCP OAuth e autorização remota por requisição
@@ -50,7 +50,7 @@ Suporta PAT, OAuth, modo somente leitura, URLs de API dinâmicas e autorização
50
50
  | | @zereight/mcp-gitlab | GitLab MCP A (comunidade, estilo CQRS) | Servidor MCP oficial do GitLab |
51
51
  | ------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52
52
  | **Mais indicado para** | Workflows de agentes de IA | Múltiplas instâncias corporativas / ferramentas agrupadas | Integrado ao GitLab, sem instalação separada |
53
- | **Modelo de ferramentas** | 275 ferramentas: 273 em toolsets + `execute_graphql` + `discover_tools` | ~50–60 ferramentas agrupadas `browse_*` / `manage_*` | Toolsets escolhidos por cabeçalho HTTP |
53
+ | **Modelo de ferramentas** | 276 ferramentas: 274 em toolsets + `execute_graphql` + `discover_tools` | ~50–60 ferramentas agrupadas `browse_*` / `manage_*` | Toolsets escolhidos por cabeçalho HTTP |
54
54
  | **Revisão de MR** | Diff em lote em 2 etapas | Varia | `get_merge_request` com diffs |
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 |
@@ -138,7 +138,7 @@ O caminho no store é fixado pelo seu lock file; atualize-o com `nix flake updat
138
138
 
139
139
  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`.
140
140
 
141
- 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.4`. 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`).
141
+ 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.6`. 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`).
142
142
 
143
143
  #### Usando argumentos de CLI (para clientes com problemas com variáveis de ambiente)
144
144
 
@@ -172,6 +172,7 @@ Alguns clientes MCP, como o GitHub Copilot CLI, têm problemas com variáveis de
172
172
  - `--masking-config` - caminho para um arquivo de configuração de mascaramento (substitui `GITLAB_MASKING_CONFIG`)
173
173
  - `--masking-policy-file` - caminho para um arquivo protegido de política gerenciada (substitui `GITLAB_MASKING_POLICY_FILE`)
174
174
  - `--masking-workspace-dir` - diretório usado para resolver arquivos de mascaramento (substitui `GITLAB_MASKING_WORKSPACE_DIR`)
175
+ - `--download-dir` - diretório onde `download_attachment` salva arquivos (substitui `GITLAB_DOWNLOAD_DIR`; padrão `.gitlab-mcp-downloads`)
175
176
  - `--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)
176
177
  - `--compact-result-chars` - limite de caracteres para compactação (substitui `GITLAB_MCP_COMPACT_RESULT_CHARS`; padrão `4000`)
177
178
  - `--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`)
@@ -302,8 +303,9 @@ Use `GITLAB_OAUTH_REDIRECT_URI` somente quando o próprio servidor MCP receber o
302
303
  | `MCP_SERVER_URL` | sim | URL HTTPS pública deste servidor MCP |
303
304
  | `STREAMABLE_HTTP` | sim | Deve ser `true` |
304
305
  | `GITLAB_OAUTH_CALLBACK_PROXY` | opcional | Defina como `true` para usar a URL `/callback` fixa do servidor MCP |
306
+ | `GITLAB_OAUTH_ALLOWED_REDIRECT_URIS` | opcional | URLs de callback de cliente para as quais o modo de proxy de callback redireciona (padrão: callbacks do Claude, ChatGPT, Cursor e loopback; use `defaults,<url>` para adicionar) |
305
307
  | `GITLAB_OAUTH_SCOPES` | opcional | Scopes separados por vírgula (padrão: `api,read_api,read_user`) |
306
- | `GITLAB_OAUTH_ALLOWED_GROUPS` | opcional | Caminhos completos de grupos GitLab separados por vírgula — apenas membros desses grupos e subgrupos podem obter um token (substitui o obsoleto `GITLAB_ALLOWED_GROUPS`) |
308
+ | `GITLAB_OAUTH_ALLOWED_GROUPS` | opcional | Caminhos completos de grupos GitLab separados por vírgula — apenas membros desses grupos e subgrupos podem usar o servidor (substitui o obsoleto `GITLAB_ALLOWED_GROUPS`) |
307
309
 
308
310
  Quando `STREAMABLE_HTTP=true`, credenciais GitLab do lado do servidor (`GITLAB_PERSONAL_ACCESS_TOKEN`, `GITLAB_JOB_TOKEN`, `GITLAB_AUTH_COOKIE_PATH` ou `GITLAB_USE_OAUTH`) exigem `REMOTE_AUTHORIZATION=true`, `GITLAB_MCP_OAUTH=true` ou `STREAMABLE_HTTP_AUTH_TOKEN`.
309
311
 
@@ -406,6 +408,7 @@ Variáveis usadas com frequência:
406
408
  - `MCP_ALLOWED_ORIGINS`
407
409
  - `GITLAB_MCP_OAUTH`
408
410
  - `GITLAB_OAUTH_CALLBACK_PROXY`
411
+ - `GITLAB_OAUTH_ALLOWED_REDIRECT_URIS`
409
412
  - `OAUTH_REGISTER_RATE_LIMIT_PER_HOUR`
410
413
  - `OAUTH_STATELESS_MODE`
411
414
  - `OAUTH_STATELESS_SECRET`
package/README.zh-CN.md CHANGED
@@ -36,7 +36,7 @@ read -rs GITLAB_PERSONAL_ACCESS_TOKEN && export GITLAB_PERSONAL_ACCESS_TOKEN
36
36
 
37
37
  ### 为什么使用这个 GitLab MCP?
38
38
 
39
- - **275 个工具:toolset 中 273 个 + `execute_graphql` + `discover_tools`** — 从小型 toolset 开始,运行时按需激活类别
39
+ - **276 个工具:toolset 中 274 个 + `execute_graphql` + `discover_tools`** — 从小型 toolset 开始,运行时按需激活类别
40
40
  - **MR 两步审查** — `list_merge_request_changed_files` → 批量 `get_merge_request_file_diff`
41
41
  - **内置 Agent Skill** — `skills/gitlab-mcp/` 工作流指南
42
42
  - **认证灵活** — Personal Access Token、本地 OAuth2 浏览器流程、MCP OAuth 代理、按请求远程授权
@@ -50,7 +50,7 @@ read -rs GITLAB_PERSONAL_ACCESS_TOKEN && export GITLAB_PERSONAL_ACCESS_TOKEN
50
50
  | | @zereight/mcp-gitlab | GitLab MCP A(社区 CQRS 型) | GitLab 官方 MCP 服务器 |
51
51
  | ------------ | -------------------------------------------------------------------- | ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
52
52
  | **更适合** | AI 代理工作流 | 企业多实例 / 分组工具 | 内置于 GitLab,无需单独安装 |
53
- | **工具模型** | 275 个工具:toolset 中 273 个 + `execute_graphql` + `discover_tools` | ~50–60 个 `browse_*` / `manage_*` 分组工具 | 用 HTTP 头选择 toolset |
53
+ | **工具模型** | 276 个工具:toolset 中 274 个 + `execute_graphql` + `discover_tools` | ~50–60 个 `browse_*` / `manage_*` 分组工具 | 用 HTTP 头选择 toolset |
54
54
  | **MR 审查** | 两步批量 diff | 因服务器而异 | `get_merge_request` 带 diffs |
55
55
  | **Node.js** | >=18.17 | 通常 >=24 | stdio 经 `mcp-remote`,需要 Node.js 20+ |
56
56
  | **许可证** | MIT | 因服务器而异 | GitLab 的一部分 |
@@ -138,7 +138,7 @@ command = lib.getExe inputs.gitlab-mcp.packages.${system}.default;
138
138
 
139
139
  示例使用 `zereight-mcp-gitlab`,这是比旧的 `mcp-gitlab` 更不容易冲突的别名。如果 MCP 客户端找不到它,请使用 `which zereight-mcp-gitlab` 输出的绝对路径。
140
140
 
141
- 如果不想全局安装,请将 `npx` 固定到上一个稳定版本(即文档推荐的版本),例如 `npx -y @zereight/mcp-gitlab@2.2.4`。如果始终想使用最新版本,请改用 `npx -y @zereight/mcp-gitlab@latest`。有新版本发布时,服务器会在启动时通过 stderr 提示(可用 `GITLAB_DISABLE_VERSION_CHECK=true` 关闭)。
141
+ 如果不想全局安装,请将 `npx` 固定到上一个稳定版本(即文档推荐的版本),例如 `npx -y @zereight/mcp-gitlab@2.2.6`。如果始终想使用最新版本,请改用 `npx -y @zereight/mcp-gitlab@latest`。有新版本发布时,服务器会在启动时通过 stderr 提示(可用 `GITLAB_DISABLE_VERSION_CHECK=true` 关闭)。
142
142
 
143
143
  #### 使用 CLI 参数(适用于环境变量有问题的客户端)
144
144
 
@@ -172,6 +172,7 @@ command = lib.getExe inputs.gitlab-mcp.packages.${system}.default;
172
172
  - `--masking-config` - 掩码配置文件路径(替代 `GITLAB_MASKING_CONFIG`)
173
173
  - `--masking-policy-file` - 受保护的托管策略文件路径(替代 `GITLAB_MASKING_POLICY_FILE`)
174
174
  - `--masking-workspace-dir` - 用于解析掩码文件的目录(替代 `GITLAB_MASKING_WORKSPACE_DIR`)
175
+ - `--download-dir` - `download_attachment` 保存文件的目录(替代 `GITLAB_DOWNLOAD_DIR`,默认 `.gitlab-mcp-downloads`)
175
176
  - `--compact-results=true` - 将过大的 MCP 工具回复截断为预览并附带 CLI 命令(替代 `GITLAB_MCP_COMPACT_RESULTS`,默认关闭)
176
177
  - `--compact-result-chars` - compact 字符阈值(替代 `GITLAB_MCP_COMPACT_RESULT_CHARS`,默认 `4000`)
177
178
  - `--compact-tools` - 以逗号分隔的工具名,仅在回复过大时对这些工具进行 compact,而不开启全局 compact(替代 `GITLAB_MCP_COMPACT_TOOLS`)
@@ -301,8 +302,9 @@ OpenCode、MCPJam、Claude.ai 等远程 MCP 客户端可能会在授权时发送
301
302
  | `MCP_SERVER_URL` | 是 | 此 MCP 服务器的公开 HTTPS URL |
302
303
  | `STREAMABLE_HTTP` | 是 | 必须为 `true` |
303
304
  | `GITLAB_OAUTH_CALLBACK_PROXY` | 可选 | 设置为 `true` 时使用 MCP 服务器固定的 `/callback` URL |
305
+ | `GITLAB_OAUTH_ALLOWED_REDIRECT_URIS` | 可选 | 回调代理模式允许重定向的客户端 callback URL 列表(默认:Claude、ChatGPT、Cursor 和环回地址 callback;用 `defaults,<url>` 追加) |
304
306
  | `GITLAB_OAUTH_SCOPES` | 可选 | 逗号分隔的 scope(默认:`api,read_api,read_user`) |
305
- | `GITLAB_OAUTH_ALLOWED_GROUPS` | 可选 | 逗号分隔的 GitLab 群组完整路径 — 仅该群组及其子群组的成员可获取令牌(替代已废弃的 `GITLAB_ALLOWED_GROUPS`) |
307
+ | `GITLAB_OAUTH_ALLOWED_GROUPS` | 可选 | 逗号分隔的 GitLab 群组完整路径 — 仅该群组及其子群组的成员可使用服务器(替代已废弃的 `GITLAB_ALLOWED_GROUPS`) |
306
308
 
307
309
  当 `STREAMABLE_HTTP=true` 时,服务端 GitLab 凭据(`GITLAB_PERSONAL_ACCESS_TOKEN`、`GITLAB_JOB_TOKEN`、`GITLAB_AUTH_COOKIE_PATH` 或 `GITLAB_USE_OAUTH`)需要 `REMOTE_AUTHORIZATION=true`、`GITLAB_MCP_OAUTH=true` 或 `STREAMABLE_HTTP_AUTH_TOKEN`。
308
310
 
@@ -405,6 +407,7 @@ Authorization: Bearer glpat-xxxxxxxxxxxxxxxxxxxx
405
407
  - `MCP_ALLOWED_ORIGINS`
406
408
  - `GITLAB_MCP_OAUTH`
407
409
  - `GITLAB_OAUTH_CALLBACK_PROXY`
410
+ - `GITLAB_OAUTH_ALLOWED_REDIRECT_URIS`
408
411
  - `OAUTH_REGISTER_RATE_LIMIT_PER_HOUR`
409
412
  - `OAUTH_STATELESS_MODE`
410
413
  - `OAUTH_STATELESS_SECRET`
package/build/cli/args.js CHANGED
@@ -25,6 +25,7 @@ const GLOBAL_FLAG_NAMES = new Set([
25
25
  "masking-config",
26
26
  "masking-policy-file",
27
27
  "masking-workspace-dir",
28
+ "download-dir",
28
29
  "permission-mode",
29
30
  "use-wiki",
30
31
  "use-milestone",
@@ -44,6 +45,7 @@ const GLOBAL_FLAG_NAMES = new Set([
44
45
  "oauth-app-id",
45
46
  "oauth-scopes",
46
47
  "oauth-callback-proxy",
48
+ "oauth-allowed-redirect-uris",
47
49
  "allowed-groups",
48
50
  "oauth-allowed-groups",
49
51
  "enable-dynamic-api-url",
package/build/config.js CHANGED
@@ -40,6 +40,8 @@ export const GITLAB_MASKING_CONFIG = getConfig("masking-config", "GITLAB_MASKING
40
40
  /** Server-owned policy groups and project bindings for managed response masking. */
41
41
  export const GITLAB_MASKING_POLICY_FILE = getConfig("masking-policy-file", "GITLAB_MASKING_POLICY_FILE");
42
42
  export const GITLAB_MASKING_WORKSPACE_DIR = getConfig("masking-workspace-dir", "GITLAB_MASKING_WORKSPACE_DIR");
43
+ /** Directory that download_attachment saves files under (default .gitlab-mcp-downloads). */
44
+ export const GITLAB_DOWNLOAD_DIR = getConfig("download-dir", "GITLAB_DOWNLOAD_DIR");
43
45
  const PERMISSION_MODES = ["readonly", "modify", "full"];
44
46
  export const GITLAB_PERMISSION_MODE_RAW = getConfig("permission-mode", "GITLAB_PERMISSION_MODE");
45
47
  export const GITLAB_PERMISSION_MODE = (() => {
@@ -91,6 +93,8 @@ export const GITLAB_OAUTH_SCOPES = GITLAB_OAUTH_SCOPES_RAW
91
93
  .filter(Boolean)
92
94
  : undefined;
93
95
  export const GITLAB_OAUTH_CALLBACK_PROXY = getConfig("oauth-callback-proxy", "GITLAB_OAUTH_CALLBACK_PROXY") === "true";
96
+ /** Callback proxy mode: client redirect URIs allowed to register (comma-separated). */
97
+ export const GITLAB_OAUTH_ALLOWED_REDIRECT_URIS_RAW = getConfig("oauth-allowed-redirect-uris", "GITLAB_OAUTH_ALLOWED_REDIRECT_URIS");
94
98
  /** @deprecated Use GITLAB_OAUTH_ALLOWED_GROUPS_RAW instead. Will be removed in v3.0.0. */
95
99
  export const GITLAB_ALLOWED_GROUPS_RAW = getConfig("allowed-groups", "GITLAB_ALLOWED_GROUPS");
96
100
  export const GITLAB_OAUTH_ALLOWED_GROUPS_RAW = getConfig("oauth-allowed-groups", "GITLAB_OAUTH_ALLOWED_GROUPS");
@@ -156,7 +156,9 @@ export function getDeprecatedEnvWarnings(input) {
156
156
  },
157
157
  ];
158
158
  for (const flag of legacyToolsetFlags) {
159
- if (flag.rawValue !== undefined) {
159
+ // An empty value (e.g. `USE_PIPELINE=${USE_PIPELINE}` in docker-compose with the
160
+ // variable unset) is not a configured flag, matching GITLAB_READ_ONLY_MODE above.
161
+ if (flag.rawValue !== undefined && flag.rawValue !== "") {
160
162
  warnings.push(legacyToolsetWarning(flag.envName, flag.cliFlag, flag.fromCli, flag.rawValue, flag.toolset, input.toolsetsRaw, input.toolsetsFromCli === true, input.toolsRaw, input.toolsFromCli === true));
161
163
  }
162
164
  }