@zereight/mcp-gitlab 2.1.6 → 2.1.8

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
@@ -155,6 +155,21 @@ docker run -i --rm \
155
155
 
156
156
  MCP OAuth 사양을 지원하는 원격 MCP 클라이언트(예: Claude.ai)용입니다. 서버는 완전한 OAuth 2.0 인증 서버로 동작합니다. 인증되지 않은 요청은 `401 + WWW-Authenticate` 응답을 받고, 클라이언트 측 OAuth 브라우저 플로우가 자동으로 시작됩니다.
157
157
 
158
+ OpenCode, MCPJam, Claude.ai 같은 원격 MCP 클라이언트는 인증 중에 자체 callback URL을 보낼 수 있습니다. 모든 클라이언트 callback URL을 GitLab에 등록할 수 없다면 `GITLAB_OAUTH_CALLBACK_PROXY=true`를 켜세요. 콜백 프록시 모드에서는 GitLab에 `{MCP_SERVER_URL}/callback` 하나만 Redirect URI로 등록하면 됩니다.
159
+
160
+ `GITLAB_OAUTH_REDIRECT_URI`는 로컬 OAuth(`GITLAB_USE_OAUTH`) 전용입니다. 원격 MCP OAuth 클라이언트 callback URL을 덮어쓰지 않으며, 원격 `Unregistered redirect_uri` 오류 해결용으로 사용하면 안 됩니다.
161
+
162
+ 이 변수가 존재하는 이유는 로컬 OAuth 플로우가 MCP 서버와 같은 머신에서 브라우저를 열고, `http://127.0.0.1:8888/callback` 같은 로컬 HTTP 서버로 callback을 받기 때문입니다.
163
+
164
+ 원격 MCP OAuth는 다릅니다. `GITLAB_MCP_OAUTH=true` 모드에서는 MCP 클라이언트가 `/authorize` 요청 중에 자체 callback URL을 제공합니다. `GITLAB_OAUTH_REDIRECT_URI`는 그 클라이언트 제공 URL을 대체하지 않습니다.
165
+
166
+ | 모드 | 활성화 변수 | Callback 변수 | GitLab Redirect URI |
167
+ | --- | --- | --- | --- |
168
+ | 로컬 OAuth | `GITLAB_USE_OAUTH=true` | `GITLAB_OAUTH_REDIRECT_URI` | `http://127.0.0.1:8888/callback` 또는 로컬 callback |
169
+ | 원격 MCP OAuth | `GITLAB_MCP_OAUTH=true` | `GITLAB_OAUTH_CALLBACK_PROXY=true` | `{MCP_SERVER_URL}/callback` |
170
+
171
+ MCP 서버가 직접 로컬 브라우저 callback을 받을 때만 `GITLAB_OAUTH_REDIRECT_URI`를 사용하세요. 원격 MCP 클라이언트가 callback URL을 소유하는 경우에는 `GITLAB_OAUTH_CALLBACK_PROXY=true`를 사용하세요.
172
+
158
173
  **동작 방식**: 공개 HTTPS URL을 가진 위치에 이 MCP 서버를 배포합니다. MCP 클라이언트는 `{MCP_SERVER_URL}/mcp`로 연결합니다. 서버는 OAuth 2.0 플로우를 처리하고 GitLab과 자격 증명을 교환합니다.
159
174
 
160
175
  **사전 준비:**
@@ -173,6 +188,16 @@ MCP OAuth 사양을 지원하는 원격 MCP 클라이언트(예: Claude.ai)용
173
188
  | `GITLAB_OAUTH_CALLBACK_PROXY` | 선택 | MCP 서버의 고정 `/callback` URL을 사용하려면 `true` |
174
189
  | `GITLAB_OAUTH_SCOPES` | 선택 | 쉼표로 구분된 scope 목록(기본값: `api,read_api,read_user`) |
175
190
 
191
+ > **`Unregistered redirect_uri` 문제 해결**
192
+ >
193
+ > 브라우저 URL의 `redirect_uri`를 확인하세요. 값이 `http://127.0.0.1:xxxxx/.../callback` 같은 클라이언트 callback을 가리키면 다음 설정을 켜세요.
194
+ >
195
+ > ```env
196
+ > GITLAB_OAUTH_CALLBACK_PROXY=true
197
+ > ```
198
+ >
199
+ > 원격 MCP OAuth 문제를 `GITLAB_OAUTH_REDIRECT_URI` 변경으로 해결하려고 하지 마세요. 이 변수는 로컬 OAuth(`GITLAB_USE_OAUTH`) 전용입니다.
200
+
176
201
  ```shell
177
202
  docker run -i --rm \
178
203
  -e HOST=0.0.0.0 \
package/README.md CHANGED
@@ -8,13 +8,13 @@
8
8
 
9
9
  ## @zereight/mcp-gitlab
10
10
 
11
- A comprehensive GitLab MCP server for AI clients. Manage projects, merge requests, issues, pipelines, wiki, releases, milestones, and more through stdio, SSE, and Streamable HTTP.
11
+ A comprehensive GitLab MCP server for AI clients. Manage projects, merge requests, issues, pipelines, wiki, releases, tags, milestones, and more through stdio, SSE, and Streamable HTTP.
12
12
 
13
13
  Supports PAT, OAuth, read-only mode, dynamic API URLs, and remote authorization for VS Code, Claude, Cursor, Copilot, and other MCP clients.
14
14
 
15
15
  ### Why use this GitLab MCP?
16
16
 
17
- - Broad GitLab coverage — projects, repository browsing, merge requests, issues, pipelines, wiki, releases, labels, milestones, and more
17
+ - Broad GitLab coverage — projects, repository browsing, merge requests, issues, pipelines, wiki, releases, tags, labels, milestones, and more
18
18
  - Flexible auth — Personal Access Token, local OAuth2 browser flow, MCP OAuth proxy, and per-request remote authorization
19
19
  - Multiple transports — stdio for local clients, SSE for legacy clients, and Streamable HTTP for modern remote deployments
20
20
  - Client-friendly setup — examples for Claude Code, Codex, Antigravity, OpenCode, Copilot, Cline, Roo Code, Cursor, Kilo Code, and Amp Code
@@ -33,6 +33,7 @@ Quick start: choose either Personal Access Token or OAuth2 setup below and use `
33
33
  - [OAuth2 Authentication Setup Guide](./docs/oauth-setup.md)
34
34
  - [Environment Variables Reference](./docs/environment-variables.md)
35
35
  - [Stateless Mode — Multi-Pod HPA](./docs/stateless-mode.md)
36
+ - [Custom Agents and Multiple PAT Setup](./docs/custom-agent-multiple-pat.md)
36
37
 
37
38
  ## Usage
38
39
 
@@ -159,6 +160,32 @@ The server acts as a full OAuth 2.0 authorization server — unauthenticated req
159
160
  receive a `401 + WWW-Authenticate` response, which triggers the OAuth browser flow
160
161
  automatically on the client side.
161
162
 
163
+ Remote MCP clients such as OpenCode, MCPJam, and Claude.ai can send their own
164
+ callback URL during authorization. If you cannot register every client callback
165
+ URL in GitLab, enable `GITLAB_OAUTH_CALLBACK_PROXY=true`. With callback proxy
166
+ mode, GitLab only needs one registered redirect URI: `{MCP_SERVER_URL}/callback`.
167
+
168
+ `GITLAB_OAUTH_REDIRECT_URI` is for local OAuth (`GITLAB_USE_OAUTH`) only. It does
169
+ not override remote MCP OAuth client callback URLs and should not be used to fix
170
+ remote `Unregistered redirect_uri` errors.
171
+
172
+ This variable exists because the local OAuth flow starts a browser on the same
173
+ machine as the MCP server and listens for the callback on a local HTTP server,
174
+ for example `http://127.0.0.1:8888/callback`.
175
+
176
+ Remote MCP OAuth is different. In `GITLAB_MCP_OAUTH=true` mode, the MCP client
177
+ provides its own callback URL during `/authorize`. `GITLAB_OAUTH_REDIRECT_URI`
178
+ does not replace that client-provided URL.
179
+
180
+ | Mode | Enable with | Callback variable | GitLab redirect URI |
181
+ | --- | --- | --- | --- |
182
+ | Local OAuth | `GITLAB_USE_OAUTH=true` | `GITLAB_OAUTH_REDIRECT_URI` | `http://127.0.0.1:8888/callback` or your local callback |
183
+ | Remote MCP OAuth | `GITLAB_MCP_OAUTH=true` | `GITLAB_OAUTH_CALLBACK_PROXY=true` | `{MCP_SERVER_URL}/callback` |
184
+
185
+ Use `GITLAB_OAUTH_REDIRECT_URI` only when the MCP server itself owns the local
186
+ browser callback. Use `GITLAB_OAUTH_CALLBACK_PROXY=true` when a remote MCP client
187
+ owns the callback URL.
188
+
162
189
  **How it works**: You deploy this MCP server somewhere with a public HTTPS URL. MCP
163
190
  clients connect to `{MCP_SERVER_URL}/mcp`. The server handles the OAuth 2.0 flow,
164
191
  exchanging credentials with GitLab on behalf of the client.
@@ -179,6 +206,18 @@ exchanging credentials with GitLab on behalf of the client.
179
206
  | `GITLAB_OAUTH_CALLBACK_PROXY` | optional | Set to `true` to use the MCP server's fixed `/callback` URL |
180
207
  | `GITLAB_OAUTH_SCOPES` | optional | Comma-separated scopes (default: `api,read_api,read_user`) |
181
208
 
209
+ > **Troubleshooting `Unregistered redirect_uri`**
210
+ >
211
+ > Check the `redirect_uri` in the browser URL. If it points to a client callback
212
+ > such as `http://127.0.0.1:xxxxx/.../callback`, enable:
213
+ >
214
+ > ```env
215
+ > GITLAB_OAUTH_CALLBACK_PROXY=true
216
+ > ```
217
+ >
218
+ > Do not fix remote MCP OAuth by changing `GITLAB_OAUTH_REDIRECT_URI`. That
219
+ > variable is for local OAuth (`GITLAB_USE_OAUTH`) only.
220
+
182
221
  ```shell
183
222
  docker run -i --rm \
184
223
  -e HOST=0.0.0.0 \
@@ -497,97 +536,108 @@ Register the skill directory in your AI client to get optimal tool usage guidanc
497
536
  48. `get_issue` - Get details of a specific issue in a GitLab project
498
537
  49. `update_issue` - Update an issue in a GitLab project
499
538
  50. `delete_issue` - Delete an issue from a GitLab project
500
- 51. `list_issue_links` - List all issue links for a specific issue
501
- 52. `list_issue_discussions` - List discussions for an issue in a GitLab project
502
- 53. `get_issue_link` - Get a specific issue link
503
- 54. `create_issue_link` - Create an issue link between two issues
504
- 55. `delete_issue_link` - Delete an issue link
505
- 56. `list_namespaces` - List all namespaces available to the current user
506
- 57. `get_namespace` - Get details of a namespace by ID or path
507
- 58. `verify_namespace` - Verify if a namespace path exists
508
- 59. `get_project` - Get details of a specific project
509
- 60. `list_projects` - List projects accessible by the current user
510
- 61. `list_project_members` - List members of a GitLab project
511
- 62. `list_group_projects` - List projects in a GitLab group with filtering options
512
- 63. `list_group_iterations` - List group iterations with filtering options
513
- 64. `list_labels` - List labels for a project
514
- 65. `get_label` - Get a single label from a project
515
- 66. `create_label` - Create a new label in a project
516
- 67. `update_label` - Update an existing label in a project
517
- 68. `delete_label` - Delete a label from a project
518
- 69. `list_pipelines` - List pipelines in a GitLab project with filtering options
519
- 70. `get_pipeline` - Get details of a specific pipeline in a GitLab project
520
- 71. `list_pipeline_jobs` - List all jobs in a specific pipeline
521
- 72. `list_pipeline_trigger_jobs` - List all trigger jobs (bridges) in a specific pipeline that trigger downstream pipelines
522
- 73. `get_pipeline_job` - Get details of a GitLab pipeline job number
523
- 74. `get_pipeline_job_output` - Get the output/trace of a GitLab pipeline job with optional pagination to limit context window usage
524
- 75. `create_pipeline` - Create a new pipeline for a branch or tag
525
- 76. `retry_pipeline` - Retry a failed or canceled pipeline
526
- 77. `cancel_pipeline` - Cancel a running pipeline
527
- 78. `play_pipeline_job` - Run a manual pipeline job
528
- 79. `retry_pipeline_job` - Retry a failed or canceled pipeline job
529
- 80. `cancel_pipeline_job` - Cancel a running pipeline job
530
- 81. `list_deployments` - List deployments in a GitLab project with filtering options
531
- 82. `get_deployment` - Get details of a specific deployment in a GitLab project
532
- 83. `list_environments` - List environments in a GitLab project
533
- 84. `get_environment` - Get details of a specific environment in a GitLab project
534
- 85. `list_job_artifacts` - List artifact files in a job's artifacts archive. Returns file names, paths, types, and sizes
535
- 86. `download_job_artifacts` - Download the entire artifact archive (zip) for a job to a local path. Returns the saved file path
536
- 87. `get_job_artifact_file` - Get the content of a single file from a job's artifacts by its path within the archive
537
- 88. `list_milestones` - List milestones in a GitLab project with filtering options
538
- 89. `get_milestone` - Get details of a specific milestone
539
- 90. `create_milestone` - Create a new milestone in a GitLab project
540
- 91. `edit_milestone` - Edit an existing milestone in a GitLab project
541
- 92. `delete_milestone` - Delete a milestone from a GitLab project
542
- 93. `get_milestone_issue` - Get issues associated with a specific milestone
543
- 94. `get_milestone_merge_requests` - Get merge requests associated with a specific milestone
544
- 95. `promote_milestone` - Promote a milestone to the next stage
545
- 96. `get_milestone_burndown_events` - Get burndown events for a specific milestone
546
- 97. `list_wiki_pages` - List wiki pages in a GitLab project
547
- 98. `get_wiki_page` - Get details of a specific wiki page
548
- 99. `create_wiki_page` - Create a new wiki page in a GitLab project
549
- 100. `update_wiki_page` - Update an existing wiki page in a GitLab project
550
- 101. `delete_wiki_page` - Delete a wiki page from a GitLab project
551
- 102. `list_group_wiki_pages` - List wiki pages in a GitLab group
552
- 103. `get_group_wiki_page` - Get details of a specific group wiki page
553
- 104. `create_group_wiki_page` - Create a new wiki page in a GitLab group
554
- 105. `update_group_wiki_page` - Update an existing wiki page in a GitLab group
555
- 106. `delete_group_wiki_page` - Delete a wiki page from a GitLab group
556
- 107. `get_repository_tree` - Get the repository tree for a GitLab project (list files and directories)
557
- 108. `list_commits` - List repository commits with filtering options
558
- 109. `get_commit` - Get details of a specific commit
559
- 110. `get_commit_diff` - Get changes/diffs of a specific commit
560
- 111. `list_releases` - List all releases for a project
561
- 112. `get_release` - Get a release by tag name
562
- 113. `create_release` - Create a new release in a GitLab project
563
- 114. `update_release` - Update an existing release in a GitLab project
564
- 115. `delete_release` - Delete a release from a GitLab project (does not delete the associated tag)
565
- 116. `create_release_evidence` - Create release evidence for an existing release (GitLab Premium/Ultimate only)
566
- 117. `download_release_asset` - Download a release asset file by direct asset path
567
- 118. `get_users` - Get GitLab user details by usernames
568
- 119. `list_events` - List all events for the currently authenticated user
569
- 120. `get_project_events` - List all visible events for a specified project
570
- 121. `upload_markdown` - Upload a file to a GitLab project for use in markdown content
571
- 122. `download_attachment` - Download an uploaded file from a GitLab project by secret and filename
572
- 123. `get_work_item` - Get a single work item with full details including status, hierarchy (parent/children), type, labels, assignees, and all widgets
573
- 124. `list_work_items` - List work items in a project with filters (type, state, search, assignees, labels). Returns items with status and hierarchy info
574
- 125. `create_work_item` - Create a new work item (issue, task, incident, test_case, epic, key_result, objective, requirement, ticket). Supports setting title, description, labels, assignees, weight, parent, health status, start/due dates, milestone, and confidentiality
575
- 126. `update_work_item` - Update a work item. Can modify title, description, labels, assignees, weight, state, status, parent hierarchy, children, health status, start/due dates, milestone, confidentiality, linked items, and custom fields
576
- 127. `convert_work_item_type` - Convert a work item to a different type (e.g. issue to task, task to incident)
577
- 128. `list_work_item_statuses` - List available statuses for a work item type in a project. Requires GitLab Premium/Ultimate with configurable statuses
578
- 129. `list_custom_field_definitions` - List available custom field definitions for a work item type in a project. Returns field names, types, and IDs needed for setting custom fields via update_work_item
579
- 130. `move_work_item` - Move a work item (issue, task, etc.) to a different project. Uses GitLab GraphQL issueMove mutation
580
- 131. `list_work_item_notes` - List notes and discussions on a work item. Returns threaded discussions with author, body, timestamps, and system/internal flags
581
- 132. `create_work_item_note` - Add a note/comment to a work item. Supports Markdown, internal notes, and threaded replies
582
- 133. `get_timeline_events` - List timeline events for an incident. Returns chronological events with notes, timestamps, and tags
583
- 134. `create_timeline_event` - Create a timeline event on an incident. Supports tags: 'Start time', 'End time', 'Impact detected', 'Response initiated', 'Impact mitigated', 'Cause identified'
584
- 135. `list_webhooks` - List all configured webhooks for a GitLab project or group. Provide either project_id or group_id
585
- 136. `list_webhook_events` - List recent webhook events (past 7 days) for a project or group webhook. Use summary mode for overview, then get_webhook_event for full details
586
- 137. `get_webhook_event` - Get full details of a specific webhook event by ID, including request/response payloads
587
- 138. `search_code` - Search for code across all projects on the GitLab instance (requires advanced search or exact code search to be enabled)
588
- 139. `search_project_code` - Search for code within a specific GitLab project (requires advanced search or exact code search to be enabled)
589
- 140. `search_group_code` - Search for code within a specific GitLab group (requires advanced search or exact code search to be enabled)
590
- 141. `execute_graphql` - Execute a GitLab GraphQL query
539
+ 51. `list_todos` - List GitLab to-do items for the current user
540
+ 52. `mark_todo_done` - Mark a GitLab to-do item as done
541
+ 53. `mark_all_todos_done` - Mark all pending GitLab to-do items as done for the current user
542
+ 54. `list_issue_links` - List all issue links for a specific issue
543
+ 55. `list_issue_discussions` - List discussions for an issue in a GitLab project
544
+ 56. `get_issue_link` - Get a specific issue link
545
+ 57. `create_issue_link` - Create an issue link between two issues
546
+ 58. `delete_issue_link` - Delete an issue link
547
+ 59. `list_namespaces` - List all namespaces available to the current user
548
+ 60. `get_namespace` - Get details of a namespace by ID or path
549
+ 61. `verify_namespace` - Verify if a namespace path exists
550
+ 62. `get_project` - Get details of a specific project
551
+ 63. `list_projects` - List projects accessible by the current user
552
+ 64. `list_project_members` - List members of a GitLab project
553
+ 65. `list_group_projects` - List projects in a GitLab group with filtering options
554
+ 66. `list_group_iterations` - List group iterations with filtering options
555
+ 67. `list_labels` - List labels for a project
556
+ 68. `get_label` - Get a single label from a project
557
+ 69. `create_label` - Create a new label in a project
558
+ 70. `update_label` - Update an existing label in a project
559
+ 71. `delete_label` - Delete a label from a project
560
+ 72. `list_pipelines` - List pipelines in a GitLab project with filtering options
561
+ 73. `get_pipeline` - Get details of a specific pipeline in a GitLab project
562
+ 74. `list_pipeline_jobs` - List all jobs in a specific pipeline
563
+ 75. `list_pipeline_trigger_jobs` - List all trigger jobs (bridges) in a specific pipeline that trigger downstream pipelines
564
+ 76. `get_pipeline_job` - Get details of a GitLab pipeline job number
565
+ 77. `get_pipeline_job_output` - Get the output/trace of a GitLab pipeline job with optional pagination to limit context window usage
566
+ 78. `validate_ci_lint` - Validate provided GitLab CI/CD YAML content for a project
567
+ 79. `validate_project_ci_lint` - Validate an existing `.gitlab-ci.yml` configuration for a project
568
+ 80. `create_pipeline` - Create a new pipeline for a branch or tag
569
+ 81. `retry_pipeline` - Retry a failed or canceled pipeline
570
+ 82. `cancel_pipeline` - Cancel a running pipeline
571
+ 83. `play_pipeline_job` - Run a manual pipeline job
572
+ 84. `retry_pipeline_job` - Retry a failed or canceled pipeline job
573
+ 85. `cancel_pipeline_job` - Cancel a running pipeline job
574
+ 86. `list_deployments` - List deployments in a GitLab project with filtering options
575
+ 87. `get_deployment` - Get details of a specific deployment in a GitLab project
576
+ 88. `list_environments` - List environments in a GitLab project
577
+ 89. `get_environment` - Get details of a specific environment in a GitLab project
578
+ 90. `list_job_artifacts` - List artifact files in a job's artifacts archive. Returns file names, paths, types, and sizes
579
+ 91. `download_job_artifacts` - Download the entire artifact archive (zip) for a job to a local path. Returns the saved file path
580
+ 92. `get_job_artifact_file` - Get the content of a single file from a job's artifacts by its path within the archive
581
+ 93. `list_milestones` - List milestones in a GitLab project with filtering options
582
+ 94. `get_milestone` - Get details of a specific milestone
583
+ 95. `create_milestone` - Create a new milestone in a GitLab project
584
+ 96. `edit_milestone` - Edit an existing milestone in a GitLab project
585
+ 97. `delete_milestone` - Delete a milestone from a GitLab project
586
+ 98. `get_milestone_issue` - Get issues associated with a specific milestone
587
+ 99. `get_milestone_merge_requests` - Get merge requests associated with a specific milestone
588
+ 100. `promote_milestone` - Promote a milestone to the next stage
589
+ 101. `get_milestone_burndown_events` - Get burndown events for a specific milestone
590
+ 102. `list_wiki_pages` - List wiki pages in a GitLab project
591
+ 103. `get_wiki_page` - Get details of a specific wiki page
592
+ 104. `create_wiki_page` - Create a new wiki page in a GitLab project
593
+ 105. `update_wiki_page` - Update an existing wiki page in a GitLab project
594
+ 106. `delete_wiki_page` - Delete a wiki page from a GitLab project
595
+ 107. `list_group_wiki_pages` - List wiki pages in a GitLab group
596
+ 108. `get_group_wiki_page` - Get details of a specific group wiki page
597
+ 109. `create_group_wiki_page` - Create a new wiki page in a GitLab group
598
+ 110. `update_group_wiki_page` - Update an existing wiki page in a GitLab group
599
+ 111. `delete_group_wiki_page` - Delete a wiki page from a GitLab group
600
+ 112. `get_repository_tree` - Get the repository tree for a GitLab project (list files and directories)
601
+ 113. `list_commits` - List repository commits with filtering options
602
+ 114. `get_commit` - Get details of a specific commit
603
+ 115. `get_commit_diff` - Get changes/diffs of a specific commit
604
+ 116. `list_releases` - List all releases for a project
605
+ 117. `get_release` - Get a release by tag name
606
+ 118. `create_release` - Create a new release in a GitLab project
607
+ 119. `update_release` - Update an existing release in a GitLab project
608
+ 120. `delete_release` - Delete a release from a GitLab project (does not delete the associated tag)
609
+ 121. `create_release_evidence` - Create release evidence for an existing release (GitLab Premium/Ultimate only)
610
+ 122. `download_release_asset` - Download a release asset file by direct asset path
611
+ 123. `list_tags` - List repository tags with filtering and pagination support
612
+ 124. `get_tag` - Get details of a specific repository tag
613
+ 125. `create_tag` - Create a new tag in the repository
614
+ 126. `delete_tag` - Delete a tag from the repository
615
+ 127. `get_tag_signature` - Get the signature of a signed tag
616
+ 128. `get_users` - Get GitLab user details by usernames
617
+ 129. `list_events` - List all events for the currently authenticated user
618
+ 130. `get_project_events` - List all visible events for a specified project
619
+ 131. `upload_markdown` - Upload a file to a GitLab project for use in markdown content
620
+ 132. `download_attachment` - Download an uploaded file from a GitLab project by secret and filename
621
+ 133. `get_work_item` - Get a single work item with full details including status, hierarchy (parent/children), type, labels, assignees, and all widgets
622
+ 134. `list_work_items` - List work items in a project with filters (type, state, search, assignees, labels). Returns items with status and hierarchy info
623
+ 135. `create_work_item` - Create a new work item (issue, task, incident, test_case, epic, key_result, objective, requirement, ticket). Supports setting title, description, labels, assignees, weight, parent, health status, start/due dates, milestone, and confidentiality
624
+ 136. `update_work_item` - Update a work item. Can modify title, description, labels, assignees, weight, state, status, parent hierarchy, children, health status, start/due dates, milestone, confidentiality, linked items, and custom fields
625
+ 137. `convert_work_item_type` - Convert a work item to a different type (e.g. issue to task, task to incident)
626
+ 138. `list_work_item_statuses` - List available statuses for a work item type in a project. Requires GitLab Premium/Ultimate with configurable statuses
627
+ 139. `list_custom_field_definitions` - List available custom field definitions for a work item type in a project. Returns field names, types, and IDs needed for setting custom fields via update_work_item
628
+ 140. `move_work_item` - Move a work item (issue, task, etc.) to a different project. Uses GitLab GraphQL issueMove mutation
629
+ 141. `list_work_item_notes` - List notes and discussions on a work item. Returns threaded discussions with author, body, timestamps, and system/internal flags
630
+ 142. `create_work_item_note` - Add a note/comment to a work item. Supports Markdown, internal notes, and threaded replies
631
+ 143. `get_timeline_events` - List timeline events for an incident. Returns chronological events with notes, timestamps, and tags
632
+ 144. `create_timeline_event` - Create a timeline event on an incident. Supports tags: 'Start time', 'End time', 'Impact detected', 'Response initiated', 'Impact mitigated', 'Cause identified'
633
+ 145. `list_webhooks` - List all configured webhooks for a GitLab project or group. Provide either project_id or group_id
634
+ 146. `list_webhook_events` - List recent webhook events (past 7 days) for a project or group webhook. Use summary mode for overview, then get_webhook_event for full details
635
+ 147. `get_webhook_event` - Get full details of a specific webhook event by ID, including request/response payloads
636
+ 148. `search_code` - Search for code across all projects on the GitLab instance (requires advanced search or exact code search to be enabled)
637
+ 149. `search_project_code` - Search for code within a specific GitLab project (requires advanced search or exact code search to be enabled)
638
+ 150. `search_group_code` - Search for code within a specific GitLab group (requires advanced search or exact code search to be enabled)
639
+ 151. `execute_graphql` - Execute a GitLab GraphQL query
640
+
591
641
  <!-- TOOLS-END -->
592
642
 
593
643
  </details>
package/README.zh-CN.md CHANGED
@@ -155,6 +155,21 @@ docker run -i --rm \
155
155
 
156
156
  适用于支持 MCP OAuth 规范的远程 MCP 客户端(例如 Claude.ai)。服务器会作为完整 OAuth 2.0 授权服务器运行。未认证请求会收到 `401 + WWW-Authenticate` 响应,从而触发客户端侧 OAuth 浏览器流程。
157
157
 
158
+ OpenCode、MCPJam、Claude.ai 等远程 MCP 客户端可能会在授权时发送自己的 callback URL。如果你无法在 GitLab 中注册每个客户端 callback URL,请启用 `GITLAB_OAUTH_CALLBACK_PROXY=true`。启用回调代理模式后,GitLab 只需要注册一个 Redirect URI:`{MCP_SERVER_URL}/callback`。
159
+
160
+ `GITLAB_OAUTH_REDIRECT_URI` 仅用于本地 OAuth(`GITLAB_USE_OAUTH`)。它不会覆盖远程 MCP OAuth 客户端 callback URL,也不应用来修复远程 `Unregistered redirect_uri` 错误。
161
+
162
+ 这个变量存在是因为本地 OAuth 流程会在与 MCP 服务器相同的机器上打开浏览器,并通过本地 HTTP 服务器接收 callback,例如 `http://127.0.0.1:8888/callback`。
163
+
164
+ 远程 MCP OAuth 不同。在 `GITLAB_MCP_OAUTH=true` 模式下,MCP 客户端会在 `/authorize` 请求中提供自己的 callback URL。`GITLAB_OAUTH_REDIRECT_URI` 不会替换这个客户端提供的 URL。
165
+
166
+ | 模式 | 启用方式 | Callback 变量 | GitLab Redirect URI |
167
+ | --- | --- | --- | --- |
168
+ | 本地 OAuth | `GITLAB_USE_OAUTH=true` | `GITLAB_OAUTH_REDIRECT_URI` | `http://127.0.0.1:8888/callback` 或你的本地 callback |
169
+ | 远程 MCP OAuth | `GITLAB_MCP_OAUTH=true` | `GITLAB_OAUTH_CALLBACK_PROXY=true` | `{MCP_SERVER_URL}/callback` |
170
+
171
+ 只有当 MCP 服务器自己接收本地浏览器 callback 时,才使用 `GITLAB_OAUTH_REDIRECT_URI`。当远程 MCP 客户端拥有 callback URL 时,请使用 `GITLAB_OAUTH_CALLBACK_PROXY=true`。
172
+
158
173
  **工作方式**:将此 MCP 服务器部署到拥有公开 HTTPS URL 的位置。MCP 客户端连接到 `{MCP_SERVER_URL}/mcp`。服务器处理 OAuth 2.0 流程,并代表客户端与 GitLab 交换凭据。
159
174
 
160
175
  **前置条件:**
@@ -173,6 +188,16 @@ docker run -i --rm \
173
188
  | `GITLAB_OAUTH_CALLBACK_PROXY` | 可选 | 设置为 `true` 时使用 MCP 服务器固定的 `/callback` URL |
174
189
  | `GITLAB_OAUTH_SCOPES` | 可选 | 逗号分隔的 scope(默认:`api,read_api,read_user`) |
175
190
 
191
+ > **排查 `Unregistered redirect_uri`**
192
+ >
193
+ > 检查浏览器 URL 中的 `redirect_uri`。如果它指向客户端 callback,例如 `http://127.0.0.1:xxxxx/.../callback`,请启用:
194
+ >
195
+ > ```env
196
+ > GITLAB_OAUTH_CALLBACK_PROXY=true
197
+ > ```
198
+ >
199
+ > 不要通过修改 `GITLAB_OAUTH_REDIRECT_URI` 来修复远程 MCP OAuth。该变量仅用于本地 OAuth(`GITLAB_USE_OAUTH`)。
200
+
176
201
  ```shell
177
202
  docker run -i --rm \
178
203
  -e HOST=0.0.0.0 \