@zereight/mcp-gitlab 2.0.34 → 2.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +327 -92
- package/build/gitlab-client-pool.js +6 -0
- package/build/index.js +2224 -52
- package/build/oauth-proxy.js +264 -0
- package/build/schemas.js +457 -201
- package/build/test/mcp-oauth-tests.js +552 -0
- package/build/test/multi-server-test.js +16 -8
- package/build/test/schema-tests.js +77 -3
- package/build/test/test-geteffectiveprojectid.js +211 -202
- package/build/test/test-mr-file-diffs.js +251 -0
- package/build/test/test-search-code.js +272 -0
- package/build/test/test-toolset-filtering.js +22 -17
- package/build/test/utils/mock-gitlab-server.js +263 -163
- package/build/test/utils/server-launcher.js +45 -41
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -16,10 +16,17 @@ When using with the Claude App, you need to set up your API key and URLs directl
|
|
|
16
16
|
|
|
17
17
|
#### Authentication Methods
|
|
18
18
|
|
|
19
|
-
The server supports
|
|
19
|
+
The server supports four authentication methods:
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
**For local/desktop use** (most common):
|
|
22
|
+
|
|
23
|
+
1. **Personal Access Token** (`GITLAB_PERSONAL_ACCESS_TOKEN`) — simplest setup
|
|
24
|
+
2. **OAuth2 — Local Browser** (`GITLAB_USE_OAUTH`) — recommended for better security
|
|
25
|
+
|
|
26
|
+
**For server/remote deployments**:
|
|
27
|
+
|
|
28
|
+
3. **OAuth2 — MCP Proxy** (`GITLAB_MCP_OAUTH`) — for remote MCP clients such as Claude.ai
|
|
29
|
+
4. **Remote Authorization** (`REMOTE_AUTHORIZATION`) — multi-user deployments where each caller provides their own token
|
|
23
30
|
|
|
24
31
|
#### Using OAuth2 Authentication
|
|
25
32
|
|
|
@@ -34,7 +41,7 @@ For detailed OAuth2 setup instructions, see [OAuth Setup Guide](./docs/oauth-set
|
|
|
34
41
|
|
|
35
42
|
Quick setup - first create a GitLab OAuth application:
|
|
36
43
|
|
|
37
|
-
1. Go to your GitLab instance: `
|
|
44
|
+
1. Go to your GitLab instance: `Admin area` → `Applications`
|
|
38
45
|
2. Create a new application with:
|
|
39
46
|
- **Name**: `GitLab MCP Server` (or any name you prefer)
|
|
40
47
|
- **Redirect URI**: `http://127.0.0.1:8888/callback`
|
|
@@ -325,6 +332,89 @@ docker run -i --rm \
|
|
|
325
332
|
}
|
|
326
333
|
```
|
|
327
334
|
|
|
335
|
+
#### Using MCP OAuth Proxy (`GITLAB_MCP_OAUTH`)
|
|
336
|
+
|
|
337
|
+
> **For server/remote deployments only.** This mode requires the MCP server to be deployed with a publicly accessible HTTPS URL. For local/desktop use, see `GITLAB_USE_OAUTH` above.
|
|
338
|
+
|
|
339
|
+
For remote MCP clients that support the MCP OAuth specification (e.g. Claude.ai).
|
|
340
|
+
The server acts as a full OAuth 2.0 authorization server — unauthenticated requests
|
|
341
|
+
receive a `401 + WWW-Authenticate` response, which triggers the OAuth browser flow
|
|
342
|
+
automatically on the client side.
|
|
343
|
+
|
|
344
|
+
**How it works**: You deploy this MCP server somewhere with a public HTTPS URL. MCP
|
|
345
|
+
clients connect to `{MCP_SERVER_URL}/mcp`. The server handles the OAuth 2.0 flow,
|
|
346
|
+
exchanging credentials with GitLab on behalf of the client.
|
|
347
|
+
|
|
348
|
+
**Prerequisites**:
|
|
349
|
+
|
|
350
|
+
1. A publicly accessible HTTPS server URL (`MCP_SERVER_URL`) — use [ngrok](https://ngrok.com) for local testing
|
|
351
|
+
2. A pre-registered GitLab OAuth application with `api` (or `read_api`) scopes
|
|
352
|
+
— Go to `Admin area` → `Applications`, set Redirect URI to `{MCP_SERVER_URL}/callback`
|
|
353
|
+
|
|
354
|
+
| Environment Variable | Required | Description |
|
|
355
|
+
| --------------------- | -------- | ---------------------------------------------------------- |
|
|
356
|
+
| `GITLAB_MCP_OAUTH` | ✅ | Set to `true` to enable |
|
|
357
|
+
| `GITLAB_API_URL` | ✅ | GitLab API base URL |
|
|
358
|
+
| `GITLAB_OAUTH_APP_ID` | ✅ | GitLab OAuth Application ID |
|
|
359
|
+
| `MCP_SERVER_URL` | ✅ | Public HTTPS URL of this MCP server |
|
|
360
|
+
| `STREAMABLE_HTTP` | ✅ | Must be `true` |
|
|
361
|
+
| `GITLAB_OAUTH_SCOPES` | optional | Comma-separated scopes (default: `api,read_api,read_user`) |
|
|
362
|
+
|
|
363
|
+
```shell
|
|
364
|
+
docker run -i --rm \
|
|
365
|
+
-e HOST=0.0.0.0 \
|
|
366
|
+
-e GITLAB_MCP_OAUTH=true \
|
|
367
|
+
-e STREAMABLE_HTTP=true \
|
|
368
|
+
-e MCP_SERVER_URL=https://your-server.example.com \
|
|
369
|
+
-e GITLAB_API_URL="https://gitlab.com/api/v4" \
|
|
370
|
+
-e GITLAB_OAUTH_APP_ID=your_app_id \
|
|
371
|
+
-p 3000:3002 \
|
|
372
|
+
zereight050/gitlab-mcp
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
MCP client configuration:
|
|
376
|
+
|
|
377
|
+
```json
|
|
378
|
+
{
|
|
379
|
+
"mcpServers": {
|
|
380
|
+
"gitlab": {
|
|
381
|
+
"type": "http",
|
|
382
|
+
"url": "https://your-server.example.com/mcp"
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
#### Using Remote Authorization (`REMOTE_AUTHORIZATION`)
|
|
389
|
+
|
|
390
|
+
> **For server/remote deployments only.** Each HTTP caller provides their own GitLab token directly in request headers — no OAuth flow involved.
|
|
391
|
+
|
|
392
|
+
For multi-user or multi-tenant deployments where each caller provides their own
|
|
393
|
+
GitLab token in the HTTP request header. No OAuth flow — the MCP server forwards
|
|
394
|
+
the token to GitLab on behalf of the caller.
|
|
395
|
+
|
|
396
|
+
**Header priority**: `Private-Token` > `JOB-TOKEN` > `Authorization: Bearer`
|
|
397
|
+
|
|
398
|
+
| Environment Variable | Required | Description |
|
|
399
|
+
| ------------------------ | -------- | ---------------------------------------------------------- |
|
|
400
|
+
| `REMOTE_AUTHORIZATION` | ✅ | Set to `true` to enable |
|
|
401
|
+
| `STREAMABLE_HTTP` | ✅ | Must be `true` |
|
|
402
|
+
| `ENABLE_DYNAMIC_API_URL` | optional | Allow per-request GitLab URL via `X-GitLab-API-URL` header |
|
|
403
|
+
|
|
404
|
+
**Example request headers**:
|
|
405
|
+
|
|
406
|
+
```http
|
|
407
|
+
Private-Token: glpat-xxxxxxxxxxxxxxxxxxxx
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
or using a Bearer token:
|
|
411
|
+
|
|
412
|
+
```http
|
|
413
|
+
Authorization: Bearer glpat-xxxxxxxxxxxxxxxxxxxx
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
> ⚠️ `REMOTE_AUTHORIZATION` is **not compatible** with SSE transport. `STREAMABLE_HTTP=true` is required.
|
|
417
|
+
|
|
328
418
|
### Environment Variables
|
|
329
419
|
|
|
330
420
|
#### Authentication Configuration
|
|
@@ -342,6 +432,9 @@ docker run -i --rm \
|
|
|
342
432
|
- **SSE transport is disabled** - attempting to use SSE with remote authorization will cause the server to exit with an error
|
|
343
433
|
- Each client session can use a different token, enabling multi-user support with secure session isolation
|
|
344
434
|
- Tokens are stored per session and automatically cleaned up when sessions close or timeout
|
|
435
|
+
- `GITLAB_MCP_OAUTH`: Set to `true` to enable the server-side MCP OAuth proxy mode. See [MCP OAuth Setup](#mcp-oauth-setup-claudeai-native-oauth) for details.
|
|
436
|
+
- `GITLAB_OAUTH_APP_ID`: Client ID of the pre-registered GitLab OAuth application. Required when `GITLAB_MCP_OAUTH=true`.
|
|
437
|
+
- `GITLAB_OAUTH_SCOPES`: Comma-separated list of GitLab scopes to request during the MCP OAuth flow (e.g. `api,read_user`). Defaults to `api` (or `read_api` when `GITLAB_READ_ONLY_MODE=true`). Only used when `GITLAB_MCP_OAUTH=true`. The pre-registered application must be configured with at least these scopes.
|
|
345
438
|
- `SESSION_TIMEOUT_SECONDS`: Session auth token timeout in seconds. Default: `3600` (1 hour). Valid range: 1-86400 seconds (recommended: 60+). After this period of inactivity, the auth token is removed but the transport session remains active. The client must provide auth headers again on the next request. Only applies when `REMOTE_AUTHORIZATION=true`.
|
|
346
439
|
|
|
347
440
|
#### General Configuration
|
|
@@ -357,26 +450,32 @@ docker run -i --rm \
|
|
|
357
450
|
- `USE_MILESTONE`: Legacy flag. Milestone features are now enabled by default. When set to 'true', ensures milestone-related tools are included even if the `milestones` toolset is not explicitly listed in `GITLAB_TOOLSETS`.
|
|
358
451
|
- `USE_PIPELINE`: Legacy flag. Pipeline features are now enabled by default. When set to 'true', ensures pipeline-related tools are included even if the `pipelines` toolset is not explicitly listed in `GITLAB_TOOLSETS`.
|
|
359
452
|
- `GITLAB_TOOLSETS`: Comma-separated list of toolset IDs to enable. When empty or unset, default toolsets are used. Set to `"all"` to enable every toolset. Available toolsets (default toolsets marked with `*`):
|
|
360
|
-
|
|
453
|
+
|
|
454
|
+
- `merge_requests`\* — MR operations, notes, discussions, draft notes, threads, versions, file diffs, conflicts (34 tools)
|
|
361
455
|
- `issues`\* — Issue CRUD, notes, links, discussions (14 tools)
|
|
362
456
|
- `repositories`\* — Search, create, file contents, push, fork, tree (7 tools)
|
|
363
457
|
- `branches`\* — Branch creation, commits, diffs (4 tools)
|
|
364
458
|
- `projects`\* — Project/namespace info, group projects, iterations (8 tools)
|
|
365
459
|
- `labels`\* — Label CRUD (5 tools)
|
|
366
|
-
- `pipelines`\* — Pipeline and
|
|
460
|
+
- `pipelines`\* — Pipeline, job, deployment, environment, and artifact operations (19 tools)
|
|
367
461
|
- `milestones`\* — Milestone CRUD, issues, MRs, burndown (9 tools)
|
|
368
|
-
- `wiki`\* — Wiki page CRUD (
|
|
462
|
+
- `wiki`\* — Wiki page CRUD for projects and groups (10 tools)
|
|
369
463
|
- `releases`\* — Release CRUD, evidence, asset download (7 tools)
|
|
370
464
|
- `users`\* — User info, events, markdown upload, attachments (5 tools)
|
|
465
|
+
- `workitems` — Work item CRUD via GraphQL, type conversion, statuses, custom fields, notes, timeline events (12 tools, opt-in)
|
|
466
|
+
- `webhooks` — Webhook listing and event inspection (3 tools, opt-in)
|
|
467
|
+
- `search` — Code search across projects, groups, or globally (3 tools, requires advanced search or exact code search enabled)
|
|
371
468
|
|
|
372
469
|
Note: `execute_graphql` is not in any toolset and must be added individually via `GITLAB_TOOLS` if needed.
|
|
373
470
|
Exposing arbitrary GraphQL would allow bypassing toolset boundaries (e.g. querying data that the user intentionally disabled via toolsets like wiki or pipelines), which is a security and permission-containment concern. Keeping `execute_graphql` out of all toolsets and requiring explicit opt-in via `GITLAB_TOOLS=execute_graphql` is intentional, to align with that principle rather than for backward compatibility.
|
|
374
471
|
CLI arg: `--toolsets`
|
|
472
|
+
|
|
375
473
|
- `GITLAB_TOOLS`: Comma-separated list of individual tool names to add on top of the enabled toolsets (additive). Useful for cherry-picking specific tools without enabling an entire toolset. Example: `GITLAB_TOOLS="list_pipelines,execute_graphql"`. CLI arg: `--tools`
|
|
376
474
|
|
|
377
475
|
Combined logic: `final tools = (tools from enabled toolsets) ∪ (GITLAB_TOOLS) ∪ (legacy flag overrides)`
|
|
378
476
|
|
|
379
477
|
Examples:
|
|
478
|
+
|
|
380
479
|
```bash
|
|
381
480
|
# Default behavior (unchanged)
|
|
382
481
|
GITLAB_PERSONAL_ACCESS_TOKEN=xxx npx @zereight/mcp-gitlab
|
|
@@ -396,6 +495,7 @@ docker run -i --rm \
|
|
|
396
495
|
# Legacy flags still work (backward compatible)
|
|
397
496
|
USE_PIPELINE=true npx @zereight/mcp-gitlab
|
|
398
497
|
```
|
|
498
|
+
|
|
399
499
|
- `GITLAB_AUTH_COOKIE_PATH`: Path to an authentication cookie file for GitLab instances that require cookie-based authentication. When provided, the cookie will be included in all GitLab API requests.
|
|
400
500
|
- `SSE`: When set to 'true', enables the Server-Sent Events transport.
|
|
401
501
|
- `STREAMABLE_HTTP`: When set to 'true', enables the Streamable HTTP transport. If both **SSE** and **STREAMABLE_HTTP** are set to 'true', the server will prioritize Streamable HTTP over SSE transport.
|
|
@@ -494,6 +594,98 @@ The token is stored per session (identified by `mcp-session-id` header) and reus
|
|
|
494
594
|
- **Rate limiting:** Each session is limited to `MAX_REQUESTS_PER_MINUTE` requests per minute (default 60)
|
|
495
595
|
- **Capacity limit:** Server accepts up to `MAX_SESSIONS` concurrent sessions (default 1000)
|
|
496
596
|
|
|
597
|
+
### MCP OAuth Setup (Claude.ai Native OAuth)
|
|
598
|
+
|
|
599
|
+
When using `GITLAB_MCP_OAUTH=true`, the server acts as an OAuth proxy to your GitLab
|
|
600
|
+
instance. Claude.ai (and any MCP-spec-compliant client) handles the entire browser
|
|
601
|
+
authentication flow automatically — no manual Personal Access Token management needed.
|
|
602
|
+
|
|
603
|
+
**Prerequisites:**
|
|
604
|
+
|
|
605
|
+
A **pre-registered GitLab OAuth application** is required. GitLab restricts dynamically
|
|
606
|
+
registered (unverified) applications to the `mcp` scope, which is insufficient for API
|
|
607
|
+
calls (need `api` or `read_api`).
|
|
608
|
+
|
|
609
|
+
1. Go to your GitLab instance → **Admin Area > Applications** (instance-wide) or **User Settings > Applications** (personal)
|
|
610
|
+
2. Create a new application with:
|
|
611
|
+
- **Confidential**: unchecked
|
|
612
|
+
- **Scopes**: `api`, `read_api`, `read_user` (or whichever scopes you intend to request via `GITLAB_OAUTH_SCOPES`)
|
|
613
|
+
3. Save and copy the **Application ID** — this is your `GITLAB_OAUTH_APP_ID`
|
|
614
|
+
|
|
615
|
+
**How it works:**
|
|
616
|
+
|
|
617
|
+
1. User adds your MCP server URL in Claude.ai
|
|
618
|
+
2. Claude.ai discovers OAuth endpoints via `/.well-known/oauth-authorization-server`
|
|
619
|
+
3. Claude.ai registers itself via Dynamic Client Registration (`POST /register`) — handled locally by the MCP server (each client gets a virtual client ID)
|
|
620
|
+
4. Claude.ai redirects the user's browser to GitLab's login page using the pre-registered OAuth application
|
|
621
|
+
5. User authenticates; GitLab redirects back to `https://claude.ai/api/mcp/auth_callback`
|
|
622
|
+
6. Claude.ai sends `Authorization: Bearer <token>` on every MCP request
|
|
623
|
+
7. Server validates the token with GitLab and stores it per session
|
|
624
|
+
|
|
625
|
+
**Server setup:**
|
|
626
|
+
|
|
627
|
+
```bash
|
|
628
|
+
docker run -d \
|
|
629
|
+
-e STREAMABLE_HTTP=true \
|
|
630
|
+
-e GITLAB_MCP_OAUTH=true \
|
|
631
|
+
-e GITLAB_OAUTH_APP_ID="your-gitlab-oauth-app-client-id" \
|
|
632
|
+
-e GITLAB_API_URL="https://gitlab.example.com/api/v4" \
|
|
633
|
+
-e MCP_SERVER_URL="https://your-mcp-server.example.com" \
|
|
634
|
+
-p 3002:3002 \
|
|
635
|
+
zereight050/gitlab-mcp
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
For local development (HTTP allowed):
|
|
639
|
+
|
|
640
|
+
```bash
|
|
641
|
+
MCP_DANGEROUSLY_ALLOW_INSECURE_ISSUER_URL=true \
|
|
642
|
+
STREAMABLE_HTTP=true \
|
|
643
|
+
GITLAB_MCP_OAUTH=true \
|
|
644
|
+
GITLAB_OAUTH_APP_ID=your-gitlab-oauth-app-client-id \
|
|
645
|
+
MCP_SERVER_URL=http://localhost:3002 \
|
|
646
|
+
GITLAB_API_URL=https://gitlab.com/api/v4 \
|
|
647
|
+
node build/index.js
|
|
648
|
+
```
|
|
649
|
+
|
|
650
|
+
**Claude.ai configuration:**
|
|
651
|
+
|
|
652
|
+
```json
|
|
653
|
+
{
|
|
654
|
+
"mcpServers": {
|
|
655
|
+
"GitLab": {
|
|
656
|
+
"url": "https://your-mcp-server.example.com/mcp"
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
No `headers` field is needed — Claude.ai obtains the token via OAuth automatically.
|
|
663
|
+
|
|
664
|
+
**Environment variables:**
|
|
665
|
+
|
|
666
|
+
| Variable | Required | Description |
|
|
667
|
+
| ------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
668
|
+
| `GITLAB_MCP_OAUTH` | Yes | Set to `true` to enable |
|
|
669
|
+
| `GITLAB_OAUTH_APP_ID` | Yes | Client ID of the pre-registered GitLab OAuth application |
|
|
670
|
+
| `MCP_SERVER_URL` | Yes | Public HTTPS URL of your MCP server |
|
|
671
|
+
| `GITLAB_API_URL` | Yes | Your GitLab instance API URL (e.g. `https://gitlab.com/api/v4`) |
|
|
672
|
+
| `STREAMABLE_HTTP` | Yes | Must be `true` (SSE is not supported) |
|
|
673
|
+
| `GITLAB_OAUTH_SCOPES` | No | Comma-separated GitLab scopes to request (e.g. `api,read_user`). Defaults to `api` (or `read_api` when `GITLAB_READ_ONLY_MODE=true`). The pre-registered application must be configured with at least these scopes. |
|
|
674
|
+
| `MCP_DANGEROUSLY_ALLOW_INSECURE_ISSUER_URL` | No | Set `true` for local HTTP dev only |
|
|
675
|
+
|
|
676
|
+
**Important Notes:**
|
|
677
|
+
|
|
678
|
+
- MCP OAuth **only works with Streamable HTTP transport** (`SSE=true` is incompatible)
|
|
679
|
+
- Each user session stores its own OAuth token — sessions are fully isolated
|
|
680
|
+
- Session timeout, rate limiting, and capacity limits apply identically to the
|
|
681
|
+
`REMOTE_AUTHORIZATION` mode (`SESSION_TIMEOUT_SECONDS`, `MAX_REQUESTS_PER_MINUTE`,
|
|
682
|
+
`MAX_SESSIONS`)
|
|
683
|
+
- **Header auth fallback:** when `Private-Token` or `JOB-TOKEN` request headers are
|
|
684
|
+
present, OAuth validation is skipped and the raw token is used directly for that
|
|
685
|
+
session. This allows PATs and CI job tokens to be used alongside the OAuth flow on
|
|
686
|
+
the same server instance. `Authorization: Bearer` is always treated as an OAuth
|
|
687
|
+
token — use `Private-Token` for PAT-based header auth.
|
|
688
|
+
|
|
497
689
|
## Tools 🛠️
|
|
498
690
|
|
|
499
691
|
<details>
|
|
@@ -514,91 +706,134 @@ The token is stored per session (identified by `mcp-session-id` header) and reus
|
|
|
514
706
|
11. `get_merge_request` - Get details of a merge request with compact deployment summary, behind-count, commit addition summary, and approval summary (Either mergeRequestIid or branchName must be provided)
|
|
515
707
|
12. `get_merge_request_diffs` - Get the changes/diffs of a merge request (Either mergeRequestIid or branchName must be provided)
|
|
516
708
|
13. `list_merge_request_diffs` - List merge request diffs with pagination support (Either mergeRequestIid or branchName must be provided)
|
|
517
|
-
14. `
|
|
518
|
-
15. `
|
|
519
|
-
16. `
|
|
520
|
-
17. `
|
|
521
|
-
18. `
|
|
522
|
-
19. `
|
|
523
|
-
20. `
|
|
524
|
-
21. `
|
|
525
|
-
22. `
|
|
526
|
-
23. `
|
|
527
|
-
24. `
|
|
528
|
-
25. `
|
|
529
|
-
26. `
|
|
530
|
-
27. `
|
|
531
|
-
28. `
|
|
532
|
-
29. `
|
|
533
|
-
30. `
|
|
534
|
-
31. `
|
|
535
|
-
32. `
|
|
536
|
-
33. `
|
|
537
|
-
34. `
|
|
538
|
-
35. `
|
|
539
|
-
36. `
|
|
540
|
-
37. `
|
|
541
|
-
38. `
|
|
542
|
-
39. `
|
|
543
|
-
40. `
|
|
544
|
-
41. `
|
|
545
|
-
42. `
|
|
546
|
-
43. `
|
|
547
|
-
44. `
|
|
548
|
-
45. `
|
|
549
|
-
46. `
|
|
550
|
-
47. `
|
|
551
|
-
48. `
|
|
552
|
-
49. `
|
|
553
|
-
50. `
|
|
554
|
-
51. `
|
|
555
|
-
52. `
|
|
556
|
-
53. `
|
|
557
|
-
54. `
|
|
558
|
-
55. `
|
|
559
|
-
56. `
|
|
560
|
-
57. `
|
|
561
|
-
58. `
|
|
562
|
-
59. `
|
|
563
|
-
60. `
|
|
564
|
-
61. `
|
|
565
|
-
62. `
|
|
566
|
-
63. `
|
|
567
|
-
64. `
|
|
568
|
-
65. `
|
|
569
|
-
66. `
|
|
570
|
-
67. `
|
|
571
|
-
68. `
|
|
572
|
-
69. `
|
|
573
|
-
70. `
|
|
574
|
-
71. `
|
|
575
|
-
72. `
|
|
576
|
-
73. `
|
|
577
|
-
74. `
|
|
578
|
-
75. `
|
|
579
|
-
76. `
|
|
580
|
-
77. `
|
|
581
|
-
78. `
|
|
582
|
-
79. `
|
|
583
|
-
80. `
|
|
584
|
-
81. `
|
|
585
|
-
82. `
|
|
586
|
-
83. `
|
|
587
|
-
84. `
|
|
588
|
-
85. `
|
|
589
|
-
86. `
|
|
590
|
-
87. `
|
|
591
|
-
88. `
|
|
592
|
-
89. `
|
|
593
|
-
90. `
|
|
594
|
-
91. `
|
|
595
|
-
92. `
|
|
596
|
-
93. `
|
|
597
|
-
94. `
|
|
598
|
-
95. `
|
|
599
|
-
96. `
|
|
600
|
-
97. `
|
|
601
|
-
98. `
|
|
709
|
+
14. `get_merge_request_conflicts` - Get the conflicts of a merge request in a GitLab project
|
|
710
|
+
15. `list_merge_request_changed_files` - STEP 1 of code review workflow. Returns ONLY the list of changed file paths in a merge request — WITHOUT diff content. Call this first to get file paths, then call get_merge_request_file_diff with multiple files in a single batched call (recommended 3-5 files per call). Supports excluded_file_patterns filtering using regex. (Either mergeRequestIid or branchName must be provided)
|
|
711
|
+
16. `get_merge_request_file_diff` - STEP 2 of code review workflow. Get diffs for one or more files from a merge request. Call list_merge_request_changed_files first, then pass them as an array to fetch diffs efficiently. Batching multiple files (recommended 3-5) is supported. (Either mergeRequestIid or branchName must be provided)
|
|
712
|
+
17. `list_merge_request_versions` - List all versions of a merge request
|
|
713
|
+
18. `get_merge_request_version` - Get a specific version of a merge request
|
|
714
|
+
19. `get_branch_diffs` - Get the changes/diffs between two branches or commits in a GitLab project
|
|
715
|
+
20. `update_merge_request` - Update a merge request (Either mergeRequestIid or branchName must be provided)
|
|
716
|
+
21. `create_note` - Create a new note (comment) to an issue or merge request
|
|
717
|
+
22. `create_merge_request_thread` - Create a new thread on a merge request
|
|
718
|
+
23. `mr_discussions` - List discussion items for a merge request
|
|
719
|
+
24. `resolve_merge_request_thread` - Resolve a thread on a merge request
|
|
720
|
+
25. `update_merge_request_note` - Modify an existing merge request thread note
|
|
721
|
+
26. `create_merge_request_note` - Add a new note to an existing merge request thread
|
|
722
|
+
27. `delete_merge_request_discussion_note` - Delete a discussion note on a merge request
|
|
723
|
+
28. `update_merge_request_discussion_note` - Update a discussion note on a merge request
|
|
724
|
+
29. `create_merge_request_discussion_note` - Add a new discussion note to an existing merge request thread
|
|
725
|
+
30. `delete_merge_request_note` - Delete an existing merge request note
|
|
726
|
+
31. `get_merge_request_note` - Get a specific note for a merge request
|
|
727
|
+
32. `get_merge_request_notes` - List notes for a merge request
|
|
728
|
+
33. `get_draft_note` - Get a single draft note from a merge request
|
|
729
|
+
34. `list_draft_notes` - List draft notes for a merge request
|
|
730
|
+
35. `create_draft_note` - Create a draft note for a merge request
|
|
731
|
+
36. `update_draft_note` - Update an existing draft note
|
|
732
|
+
37. `delete_draft_note` - Delete a draft note
|
|
733
|
+
38. `publish_draft_note` - Publish a single draft note
|
|
734
|
+
39. `bulk_publish_draft_notes` - Publish all draft notes for a merge request
|
|
735
|
+
40. `list_merge_requests` - List merge requests globally or in a specific GitLab project with filtering options (project_id is now optional)
|
|
736
|
+
41. `approve_merge_request` - Approve a merge request (requires appropriate permissions)
|
|
737
|
+
42. `unapprove_merge_request` - Unapprove a previously approved merge request
|
|
738
|
+
43. `get_merge_request_approval_state` - Get merge request approval details including approvers (uses `approval_state` when available, otherwise falls back to `approvals`)
|
|
739
|
+
44. `update_issue_note` - Modify an existing issue thread note
|
|
740
|
+
45. `create_issue_note` - Add a new note to an existing issue thread
|
|
741
|
+
46. `list_issues` - List issues (default: created by current user only; use scope='all' for all accessible issues)
|
|
742
|
+
47. `my_issues` - List issues assigned to the authenticated user (defaults to open issues)
|
|
743
|
+
48. `get_issue` - Get details of a specific issue in a GitLab project
|
|
744
|
+
49. `update_issue` - Update an issue in a GitLab project
|
|
745
|
+
50. `delete_issue` - Delete an issue from a GitLab project
|
|
746
|
+
51. `list_issue_links` - List all issue links for a specific issue
|
|
747
|
+
52. `list_issue_discussions` - List discussions for an issue in a GitLab project
|
|
748
|
+
53. `get_issue_link` - Get a specific issue link
|
|
749
|
+
54. `create_issue_link` - Create an issue link between two issues
|
|
750
|
+
55. `delete_issue_link` - Delete an issue link
|
|
751
|
+
56. `list_namespaces` - List all namespaces available to the current user
|
|
752
|
+
57. `get_namespace` - Get details of a namespace by ID or path
|
|
753
|
+
58. `verify_namespace` - Verify if a namespace path exists
|
|
754
|
+
59. `get_project` - Get details of a specific project
|
|
755
|
+
60. `list_projects` - List projects accessible by the current user
|
|
756
|
+
61. `list_project_members` - List members of a GitLab project
|
|
757
|
+
62. `list_group_projects` - List projects in a GitLab group with filtering options
|
|
758
|
+
63. `list_group_iterations` - List group iterations with filtering options
|
|
759
|
+
64. `list_labels` - List labels for a project
|
|
760
|
+
65. `get_label` - Get a single label from a project
|
|
761
|
+
66. `create_label` - Create a new label in a project
|
|
762
|
+
67. `update_label` - Update an existing label in a project
|
|
763
|
+
68. `delete_label` - Delete a label from a project
|
|
764
|
+
69. `list_pipelines` - List pipelines in a GitLab project with filtering options
|
|
765
|
+
70. `get_pipeline` - Get details of a specific pipeline in a GitLab project
|
|
766
|
+
71. `list_pipeline_jobs` - List all jobs in a specific pipeline
|
|
767
|
+
72. `list_pipeline_trigger_jobs` - List all trigger jobs (bridges) in a specific pipeline that trigger downstream pipelines
|
|
768
|
+
73. `get_pipeline_job` - Get details of a GitLab pipeline job number
|
|
769
|
+
74. `get_pipeline_job_output` - Get the output/trace of a GitLab pipeline job with optional pagination to limit context window usage
|
|
770
|
+
75. `create_pipeline` - Create a new pipeline for a branch or tag
|
|
771
|
+
76. `retry_pipeline` - Retry a failed or canceled pipeline
|
|
772
|
+
77. `cancel_pipeline` - Cancel a running pipeline
|
|
773
|
+
78. `play_pipeline_job` - Run a manual pipeline job
|
|
774
|
+
79. `retry_pipeline_job` - Retry a failed or canceled pipeline job
|
|
775
|
+
80. `cancel_pipeline_job` - Cancel a running pipeline job
|
|
776
|
+
81. `list_deployments` - List deployments in a GitLab project with filtering options
|
|
777
|
+
82. `get_deployment` - Get details of a specific deployment in a GitLab project
|
|
778
|
+
83. `list_environments` - List environments in a GitLab project
|
|
779
|
+
84. `get_environment` - Get details of a specific environment in a GitLab project
|
|
780
|
+
85. `list_job_artifacts` - List artifact files in a job's artifacts archive. Returns file names, paths, types, and sizes
|
|
781
|
+
86. `download_job_artifacts` - Download the entire artifact archive (zip) for a job to a local path. Returns the saved file path
|
|
782
|
+
87. `get_job_artifact_file` - Get the content of a single file from a job's artifacts by its path within the archive
|
|
783
|
+
88. `list_milestones` - List milestones in a GitLab project with filtering options
|
|
784
|
+
89. `get_milestone` - Get details of a specific milestone
|
|
785
|
+
90. `create_milestone` - Create a new milestone in a GitLab project
|
|
786
|
+
91. `edit_milestone` - Edit an existing milestone in a GitLab project
|
|
787
|
+
92. `delete_milestone` - Delete a milestone from a GitLab project
|
|
788
|
+
93. `get_milestone_issue` - Get issues associated with a specific milestone
|
|
789
|
+
94. `get_milestone_merge_requests` - Get merge requests associated with a specific milestone
|
|
790
|
+
95. `promote_milestone` - Promote a milestone to the next stage
|
|
791
|
+
96. `get_milestone_burndown_events` - Get burndown events for a specific milestone
|
|
792
|
+
97. `list_wiki_pages` - List wiki pages in a GitLab project
|
|
793
|
+
98. `get_wiki_page` - Get details of a specific wiki page
|
|
794
|
+
99. `create_wiki_page` - Create a new wiki page in a GitLab project
|
|
795
|
+
100. `update_wiki_page` - Update an existing wiki page in a GitLab project
|
|
796
|
+
101. `delete_wiki_page` - Delete a wiki page from a GitLab project
|
|
797
|
+
102. `list_group_wiki_pages` - List wiki pages in a GitLab group
|
|
798
|
+
103. `get_group_wiki_page` - Get details of a specific group wiki page
|
|
799
|
+
104. `create_group_wiki_page` - Create a new wiki page in a GitLab group
|
|
800
|
+
105. `update_group_wiki_page` - Update an existing wiki page in a GitLab group
|
|
801
|
+
106. `delete_group_wiki_page` - Delete a wiki page from a GitLab group
|
|
802
|
+
107. `get_repository_tree` - Get the repository tree for a GitLab project (list files and directories)
|
|
803
|
+
108. `list_commits` - List repository commits with filtering options
|
|
804
|
+
109. `get_commit` - Get details of a specific commit
|
|
805
|
+
110. `get_commit_diff` - Get changes/diffs of a specific commit
|
|
806
|
+
111. `list_releases` - List all releases for a project
|
|
807
|
+
112. `get_release` - Get a release by tag name
|
|
808
|
+
113. `create_release` - Create a new release in a GitLab project
|
|
809
|
+
114. `update_release` - Update an existing release in a GitLab project
|
|
810
|
+
115. `delete_release` - Delete a release from a GitLab project (does not delete the associated tag)
|
|
811
|
+
116. `create_release_evidence` - Create release evidence for an existing release (GitLab Premium/Ultimate only)
|
|
812
|
+
117. `download_release_asset` - Download a release asset file by direct asset path
|
|
813
|
+
118. `get_users` - Get GitLab user details by usernames
|
|
814
|
+
119. `list_events` - List all events for the currently authenticated user
|
|
815
|
+
120. `get_project_events` - List all visible events for a specified project
|
|
816
|
+
121. `upload_markdown` - Upload a file to a GitLab project for use in markdown content
|
|
817
|
+
122. `download_attachment` - Download an uploaded file from a GitLab project by secret and filename
|
|
818
|
+
123. `get_work_item` - Get a single work item with full details including status, hierarchy (parent/children), type, labels, assignees, and all widgets
|
|
819
|
+
124. `list_work_items` - List work items in a project with filters (type, state, search, assignees, labels). Returns items with status and hierarchy info
|
|
820
|
+
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
|
|
821
|
+
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
|
|
822
|
+
127. `convert_work_item_type` - Convert a work item to a different type (e.g. issue to task, task to incident)
|
|
823
|
+
128. `list_work_item_statuses` - List available statuses for a work item type in a project. Requires GitLab Premium/Ultimate with configurable statuses
|
|
824
|
+
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
|
|
825
|
+
130. `move_work_item` - Move a work item (issue, task, etc.) to a different project. Uses GitLab GraphQL issueMove mutation
|
|
826
|
+
131. `list_work_item_notes` - List notes and discussions on a work item. Returns threaded discussions with author, body, timestamps, and system/internal flags
|
|
827
|
+
132. `create_work_item_note` - Add a note/comment to a work item. Supports Markdown, internal notes, and threaded replies
|
|
828
|
+
133. `get_timeline_events` - List timeline events for an incident. Returns chronological events with notes, timestamps, and tags
|
|
829
|
+
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'
|
|
830
|
+
135. `list_webhooks` - List all configured webhooks for a GitLab project or group. Provide either project_id or group_id
|
|
831
|
+
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
|
|
832
|
+
137. `get_webhook_event` - Get full details of a specific webhook event by ID, including request/response payloads
|
|
833
|
+
138. `search_code` - Search for code across all projects on the GitLab instance (requires advanced search or exact code search to be enabled)
|
|
834
|
+
139. `search_project_code` - Search for code within a specific GitLab project (requires advanced search or exact code search to be enabled)
|
|
835
|
+
140. `search_group_code` - Search for code within a specific GitLab group (requires advanced search or exact code search to be enabled)
|
|
836
|
+
141. `execute_graphql` - Execute a GitLab GraphQL query
|
|
602
837
|
<!-- TOOLS-END -->
|
|
603
838
|
|
|
604
839
|
</details>
|