mcp-gitlab 0.22.0__tar.gz → 0.23.0__tar.gz
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.
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/.copier-answers.yml +1 -1
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/.github/workflows/link-check.yml +3 -1
- mcp_gitlab-0.23.0/.github/workflows/lint.yml +8 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/.github/workflows/publish.yml +2 -2
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/.github/workflows/reconcile.yml +1 -1
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/.github/workflows/release.yml +1 -1
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/.github/workflows/tests.yml +3 -1
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/CHANGELOG.md +20 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/PKG-INFO +5 -1
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/README.md +4 -0
- mcp_gitlab-0.23.0/assets/icon.svg +12 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/gemini-extension.json +2 -2
- mcp_gitlab-0.23.0/glama.json +4 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/llms-full.txt +2 -2
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/llms.txt +2 -2
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/pyproject.toml +1 -1
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/server.json +14 -2
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/servers/gitlab.py +36 -1
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/unit/test_server_assembly.py +19 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/unit/test_tool_contract.py +19 -0
- mcp_gitlab-0.23.0/uv.lock +1764 -0
- mcp_gitlab-0.22.0/.github/workflows/lint.yml +0 -6
- mcp_gitlab-0.22.0/uv.lock +0 -1764
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/.dockerignore +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/.env.example +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/.github/dependabot.yml +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/.gitignore +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/AGENTS.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/Dockerfile +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/LICENSE +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/docs/oauth.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/docs/specs/2026-09-21-test-confidence-and-error-contract.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/evaluations/eval.xml +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/ruff.toml +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/__init__.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/__main__.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/client.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/config.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/exceptions.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/local_auth.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/oauth.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/py.typed +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/resources/approval-workflow.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/resources/code-review.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/resources/codeowners.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/resources/conventional-commits.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/resources/git-workflow.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/resources/gitlab-ci.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/resources/mr-hygiene.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/resources/prompts/approve-mr.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/resources/prompts/diagnose-pipeline.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/resources/prompts/prepare-release.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/resources/prompts/review-mr.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/resources/prompts/setup-branch-protection.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/resources/prompts/triage-issues.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/servers/__init__.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/servers/_helpers.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/servers/prompts.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/src/mcp_gitlab/servers/resources.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/__init__.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/conftest.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/test_links.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/unit/__init__.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/unit/test_cli.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/unit/test_client.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/unit/test_config.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/unit/test_exceptions.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/unit/test_local_auth.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/unit/test_oauth.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/unit/test_oauth_http.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/unit/test_prompts.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/unit/test_read_only_lock.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/unit/test_resources.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.23.0}/tests/unit/test_tools.py +0 -0
|
@@ -4,6 +4,8 @@ on:
|
|
|
4
4
|
schedule:
|
|
5
5
|
- cron: "0 6 * * 1" # Mondays, 06:00 UTC
|
|
6
6
|
workflow_dispatch:
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
7
9
|
jobs:
|
|
8
10
|
links:
|
|
9
|
-
uses: vish288/.github/.github/workflows/link-check.yml@
|
|
11
|
+
uses: vish288/.github/.github/workflows/link-check.yml@f59da4e8bae11ace9d2f69e43d8601ff9cb68c04 # v1.4.1
|
|
@@ -30,7 +30,7 @@ permissions: {}
|
|
|
30
30
|
|
|
31
31
|
jobs:
|
|
32
32
|
prepare:
|
|
33
|
-
uses: vish288/.github/.github/workflows/publish-prepare.yml@
|
|
33
|
+
uses: vish288/.github/.github/workflows/publish-prepare.yml@f59da4e8bae11ace9d2f69e43d8601ff9cb68c04 # v1.4.1
|
|
34
34
|
with:
|
|
35
35
|
dry_run: ${{ inputs.dry_run }}
|
|
36
36
|
permissions:
|
|
@@ -68,7 +68,7 @@ jobs:
|
|
|
68
68
|
finish:
|
|
69
69
|
needs: [prepare, pypi]
|
|
70
70
|
if: ${{ !cancelled() && !inputs.dry_run && (needs.prepare.outputs.pypi == 'done' || needs.pypi.result == 'success') }}
|
|
71
|
-
uses: vish288/.github/.github/workflows/publish-finish.yml@
|
|
71
|
+
uses: vish288/.github/.github/workflows/publish-finish.yml@f59da4e8bae11ace9d2f69e43d8601ff9cb68c04 # v1.4.1
|
|
72
72
|
with:
|
|
73
73
|
dry_run: ${{ inputs.dry_run }}
|
|
74
74
|
fail_at: ${{ inputs.fail_at }}
|
|
@@ -9,7 +9,7 @@ on:
|
|
|
9
9
|
workflow_dispatch:
|
|
10
10
|
jobs:
|
|
11
11
|
reconcile:
|
|
12
|
-
uses: vish288/.github/.github/workflows/reconcile.yml@
|
|
12
|
+
uses: vish288/.github/.github/workflows/reconcile.yml@f59da4e8bae11ace9d2f69e43d8601ff9cb68c04 # v1.4.1
|
|
13
13
|
permissions:
|
|
14
14
|
contents: read
|
|
15
15
|
actions: write
|
|
@@ -27,7 +27,7 @@ on:
|
|
|
27
27
|
default: none
|
|
28
28
|
jobs:
|
|
29
29
|
release:
|
|
30
|
-
uses: vish288/.github/.github/workflows/release.yml@
|
|
30
|
+
uses: vish288/.github/.github/workflows/release.yml@f59da4e8bae11ace9d2f69e43d8601ff9cb68c04 # v1.4.1
|
|
31
31
|
with:
|
|
32
32
|
bump: ${{ inputs.bump }}
|
|
33
33
|
version: ${{ inputs.version }}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
name: Tests
|
|
2
2
|
# Stub: calls the reusable workflow in vish288/.github, pinned to a release commit SHA.
|
|
3
3
|
on: [push, pull_request]
|
|
4
|
+
permissions:
|
|
5
|
+
contents: read
|
|
4
6
|
jobs:
|
|
5
7
|
test:
|
|
6
|
-
uses: vish288/.github/.github/workflows/tests.yml@
|
|
8
|
+
uses: vish288/.github/.github/workflows/tests.yml@f59da4e8bae11ace9d2f69e43d8601ff9cb68c04 # v1.4.1
|
|
7
9
|
with:
|
|
8
10
|
coverage_min: 98
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.23.0] - 2026-11-09
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
- feat: add server icon (registry and identity) (2b84eed)
|
|
7
|
+
- feat: cache hints and server identity (e3f64e0)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
- fix(annotations): require approval on destructive tools (8303089)
|
|
11
|
+
- fix(registry): title, websiteUrl and runtimeHint in server.json (5922ece)
|
|
12
|
+
|
|
13
|
+
### Documentation
|
|
14
|
+
- docs: link contributing and security policy (0e0a70e)
|
|
15
|
+
|
|
16
|
+
### Chores
|
|
17
|
+
- chore(fleet): template v1.4.1 (fcaabdf)
|
|
18
|
+
- chore(fleet): template v1.4.0 (c46b47f)
|
|
19
|
+
- chore(deps): weekly patch 2026-11-08 (0d47821)
|
|
20
|
+
- chore(deps): weekly patch 2026-11-06 (612bec9)
|
|
21
|
+
|
|
22
|
+
|
|
3
23
|
## [0.22.0] - 2026-11-06
|
|
4
24
|
|
|
5
25
|
### Features
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: mcp-gitlab
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.23.0
|
|
4
4
|
Summary: GitLab MCP server for the MCP 2026-07-28 specification (MCP 2.0): projects, MRs, pipelines, CI/CD, approvals and issues for AI assistants. Runs with writes, or locked read-only via MCP_READ_ONLY
|
|
5
5
|
Project-URL: Homepage, https://github.com/vish288/mcp-gitlab
|
|
6
6
|
Project-URL: Repository, https://github.com/vish288/mcp-gitlab
|
|
@@ -299,6 +299,7 @@ mcp-gitlab implements the Model Context Protocol. It supports the 2026-07-28 spe
|
|
|
299
299
|
- **Built on**: FastMCP 4.x and the MCP Python SDK 2.x.
|
|
300
300
|
- **Transports**: `stdio` (default) and `streamable-http` (recommended for remote). The `sse` (HTTP+SSE) transport still works, but the 2026-07-28 specification deprecates it. The server prints a warning when you use it.
|
|
301
301
|
- **Capabilities**: tools, resources, and prompts. The server uses no roots, sampling, logging, elicitation, or resource subscriptions, so the 2026-07-28 deprecations do not affect it.
|
|
302
|
+
- **Server identity and cache hints**: `serverInfo` reports the installed package version and the install page as `websiteUrl`, so every response names the exact release. List results carry the 2026-07-28 cache hints `ttlMs: 300000` (5-minute TTL) and `cacheScope: private` — private because `resources/read` can vary by the per-user token. Both are inert for clients that do not read them.
|
|
302
303
|
|
|
303
304
|
### Error results
|
|
304
305
|
|
|
@@ -575,6 +576,7 @@ The server provides [MCP prompts](https://modelcontextprotocol.io/docs/concepts/
|
|
|
575
576
|
- **SSL verification**: `GITLAB_SSL_VERIFY=true` by default. Only disable for self-signed certificates in trusted networks.
|
|
576
577
|
- **CI/CD variable masking**: `gitlab_list_variables` and `gitlab_list_group_variables` automatically mask values of variables marked as masked in GitLab, returning `***MASKED***` instead of the actual value.
|
|
577
578
|
- **MCP tool annotations**: Each tool declares `readOnlyHint`, `destructiveHint`, and `idempotentHint` for client-side permission prompts.
|
|
579
|
+
- **Approval on destructive tools**: each destructive tool carries the `anthropic/requiresUserInteraction` client-vendor meta, so Claude Code forces a permission prompt on every call — even under `acceptEdits`, `auto`, and `bypassPermissions` — with no "don't ask again". The meta is inert for clients that do not read it.
|
|
578
580
|
- **Credential storage**: The server reads `GITLAB_TOKEN` from the environment and never writes it. `mcp-gitlab auth login` stores OAuth tokens in `~/.config/mcp-gitlab/credentials.json` (mode 0600) and refreshes them in place.
|
|
579
581
|
|
|
580
582
|
## Rate Limits & Permissions
|
|
@@ -700,6 +702,8 @@ uv run ruff check .
|
|
|
700
702
|
uv run ruff format --check .
|
|
701
703
|
```
|
|
702
704
|
|
|
705
|
+
Please read the [contributing guide](https://github.com/vish288/.github/blob/main/CONTRIBUTING.md) and the [security policy](https://github.com/vish288/.github/blob/main/SECURITY.md) before opening a pull request or reporting a vulnerability.
|
|
706
|
+
|
|
703
707
|
## License
|
|
704
708
|
|
|
705
709
|
MIT
|
|
@@ -264,6 +264,7 @@ mcp-gitlab implements the Model Context Protocol. It supports the 2026-07-28 spe
|
|
|
264
264
|
- **Built on**: FastMCP 4.x and the MCP Python SDK 2.x.
|
|
265
265
|
- **Transports**: `stdio` (default) and `streamable-http` (recommended for remote). The `sse` (HTTP+SSE) transport still works, but the 2026-07-28 specification deprecates it. The server prints a warning when you use it.
|
|
266
266
|
- **Capabilities**: tools, resources, and prompts. The server uses no roots, sampling, logging, elicitation, or resource subscriptions, so the 2026-07-28 deprecations do not affect it.
|
|
267
|
+
- **Server identity and cache hints**: `serverInfo` reports the installed package version and the install page as `websiteUrl`, so every response names the exact release. List results carry the 2026-07-28 cache hints `ttlMs: 300000` (5-minute TTL) and `cacheScope: private` — private because `resources/read` can vary by the per-user token. Both are inert for clients that do not read them.
|
|
267
268
|
|
|
268
269
|
### Error results
|
|
269
270
|
|
|
@@ -540,6 +541,7 @@ The server provides [MCP prompts](https://modelcontextprotocol.io/docs/concepts/
|
|
|
540
541
|
- **SSL verification**: `GITLAB_SSL_VERIFY=true` by default. Only disable for self-signed certificates in trusted networks.
|
|
541
542
|
- **CI/CD variable masking**: `gitlab_list_variables` and `gitlab_list_group_variables` automatically mask values of variables marked as masked in GitLab, returning `***MASKED***` instead of the actual value.
|
|
542
543
|
- **MCP tool annotations**: Each tool declares `readOnlyHint`, `destructiveHint`, and `idempotentHint` for client-side permission prompts.
|
|
544
|
+
- **Approval on destructive tools**: each destructive tool carries the `anthropic/requiresUserInteraction` client-vendor meta, so Claude Code forces a permission prompt on every call — even under `acceptEdits`, `auto`, and `bypassPermissions` — with no "don't ask again". The meta is inert for clients that do not read it.
|
|
543
545
|
- **Credential storage**: The server reads `GITLAB_TOKEN` from the environment and never writes it. `mcp-gitlab auth login` stores OAuth tokens in `~/.config/mcp-gitlab/credentials.json` (mode 0600) and refreshes them in place.
|
|
544
546
|
|
|
545
547
|
## Rate Limits & Permissions
|
|
@@ -665,6 +667,8 @@ uv run ruff check .
|
|
|
665
667
|
uv run ruff format --check .
|
|
666
668
|
```
|
|
667
669
|
|
|
670
|
+
Please read the [contributing guide](https://github.com/vish288/.github/blob/main/CONTRIBUTING.md) and the [security policy](https://github.com/vish288/.github/blob/main/SECURITY.md) before opening a pull request or reporting a vulnerability.
|
|
671
|
+
|
|
668
672
|
## License
|
|
669
673
|
|
|
670
674
|
MIT
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="128" height="128" role="img" aria-label="GitLab MCP server">
|
|
2
|
+
<title>GitLab MCP server</title>
|
|
3
|
+
<rect x="4" y="4" width="120" height="120" rx="14" fill="#847492" stroke="#6f6080" stroke-width="8" />
|
|
4
|
+
<g fill="none" stroke="#0b0c0f" stroke-width="10" stroke-linecap="square" stroke-linejoin="miter">
|
|
5
|
+
<path d="M46 44V92" />
|
|
6
|
+
<path d="M84 58C84 80 58 78 46 92" />
|
|
7
|
+
<circle cx="46" cy="36" r="9" fill="#847492" />
|
|
8
|
+
<circle cx="84" cy="50" r="9" fill="#847492" />
|
|
9
|
+
<circle cx="46" cy="98" r="9" fill="#0b0c0f" stroke="none" />
|
|
10
|
+
</g>
|
|
11
|
+
|
|
12
|
+
</svg>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-gitlab",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "GitLab MCP server (MCP 2026-07-28): projects, MRs, pipelines, CI/CD, issues; writes or read-only",
|
|
5
5
|
"mcpServers": {
|
|
6
6
|
"mcp-gitlab": {
|
|
7
7
|
"command": "uvx",
|
|
8
8
|
"args": [
|
|
9
|
-
"mcp-gitlab@0.
|
|
9
|
+
"mcp-gitlab@0.23.0"
|
|
10
10
|
]
|
|
11
11
|
}
|
|
12
12
|
},
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
MCP server that wraps the GitLab REST API. Works with GitLab.com and self-hosted instances (CE/EE). No GitLab Duo or Premium required. Built with FastMCP, httpx, and Pydantic.
|
|
6
6
|
|
|
7
7
|
- **Install**: `uvx mcp-gitlab`
|
|
8
|
-
- **Version**: 0.
|
|
9
|
-
- **Python**: >=3.
|
|
8
|
+
- **Version**: 0.23.0
|
|
9
|
+
- **Python**: >=3.11
|
|
10
10
|
- **License**: MIT
|
|
11
11
|
- **Protocol**: MCP 2026-07-28 (MCP 2.0); compatible with 2025-11-25 clients; built on FastMCP 4.x
|
|
12
12
|
- **Transport**: stdio (default), streamable-http (recommended for remote), SSE (deprecated by the 2026-07-28 spec)
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
MCP server that wraps the GitLab REST API. Works with GitLab.com and self-hosted instances (CE/EE). No GitLab Duo or Premium required. Built with FastMCP, httpx, and Pydantic.
|
|
6
6
|
|
|
7
7
|
- **Install**: `uvx mcp-gitlab`
|
|
8
|
-
- **Version**: 0.
|
|
9
|
-
- **Python**: >=3.
|
|
8
|
+
- **Version**: 0.23.0
|
|
9
|
+
- **Python**: >=3.11
|
|
10
10
|
- **License**: MIT
|
|
11
11
|
- **Protocol**: MCP 2026-07-28 (MCP 2.0); compatible with 2025-11-25 clients; built on FastMCP 4.x
|
|
12
12
|
- **Transport**: stdio (default), streamable-http (recommended for remote), SSE (deprecated by the 2026-07-28 spec)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mcp-gitlab"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.23.0"
|
|
4
4
|
description = "GitLab MCP server for the MCP 2026-07-28 specification (MCP 2.0): projects, MRs, pipelines, CI/CD, approvals and issues for AI assistants. Runs with writes, or locked read-only via MCP_READ_ONLY"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = {text = "MIT"}
|
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "io.github.vish288/mcp-gitlab",
|
|
4
|
+
"title": "GitLab",
|
|
4
5
|
"description": "GitLab MCP server (MCP 2026-07-28): projects, MRs, pipelines, CI/CD, issues; writes or read-only",
|
|
5
6
|
"repository": {
|
|
6
7
|
"url": "https://github.com/vish288/mcp-gitlab",
|
|
7
8
|
"source": "github"
|
|
8
9
|
},
|
|
9
|
-
"version": "0.
|
|
10
|
+
"version": "0.23.0",
|
|
11
|
+
"websiteUrl": "https://vish288.github.io/mcp-install?server=mcp-gitlab",
|
|
12
|
+
"icons": [
|
|
13
|
+
{
|
|
14
|
+
"src": "https://raw.githubusercontent.com/vish288/mcp-gitlab/main/assets/icon.svg",
|
|
15
|
+
"mimeType": "image/svg+xml",
|
|
16
|
+
"sizes": [
|
|
17
|
+
"any"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
],
|
|
10
21
|
"packages": [
|
|
11
22
|
{
|
|
12
23
|
"registryType": "pypi",
|
|
13
24
|
"identifier": "mcp-gitlab",
|
|
14
|
-
"version": "0.
|
|
25
|
+
"version": "0.23.0",
|
|
26
|
+
"runtimeHint": "uvx",
|
|
15
27
|
"transport": {
|
|
16
28
|
"type": "stdio"
|
|
17
29
|
},
|
|
@@ -19,7 +19,7 @@ from fastmcp import Context, FastMCP
|
|
|
19
19
|
from fastmcp.exceptions import ToolError
|
|
20
20
|
from fastmcp.server.dependencies import get_access_token
|
|
21
21
|
from fastmcp.tools import ToolResult
|
|
22
|
-
from mcp.types import TextContent
|
|
22
|
+
from mcp.types import Icon, TextContent
|
|
23
23
|
from pydantic import Field
|
|
24
24
|
|
|
25
25
|
from ..client import GitLabClient
|
|
@@ -112,11 +112,27 @@ async def lifespan(server: FastMCP) -> AsyncIterator[dict[str, Any]]:
|
|
|
112
112
|
|
|
113
113
|
mcp = FastMCP(
|
|
114
114
|
name="GitLab MCP Server",
|
|
115
|
+
version=version("mcp-gitlab"),
|
|
116
|
+
website_url="https://vish288.github.io/mcp-install?server=mcp-gitlab",
|
|
117
|
+
icons=[
|
|
118
|
+
Icon(
|
|
119
|
+
src="https://raw.githubusercontent.com/vish288/mcp-gitlab/main/assets/icon.svg",
|
|
120
|
+
mime_type="image/svg+xml",
|
|
121
|
+
sizes=["any"],
|
|
122
|
+
)
|
|
123
|
+
],
|
|
115
124
|
instructions=(
|
|
116
125
|
"Provides tools for interacting with GitLab API"
|
|
117
126
|
" — projects, MRs, pipelines, CI/CD, approvals, and more."
|
|
118
127
|
),
|
|
119
128
|
lifespan=lifespan,
|
|
129
|
+
# 2026-07-28 cache hints on list results: a modern client stops re-listing the
|
|
130
|
+
# tools/prompts/resources each turn (#155). cacheScope is private because
|
|
131
|
+
# resources/read can vary by the per-user token; the TTL is 5 minutes. Inert for
|
|
132
|
+
# legacy clients. (cacheScope is fixed at construction, before the per-process
|
|
133
|
+
# read-only decision, so it stays private rather than public-when-locked.)
|
|
134
|
+
cache_ttl=300,
|
|
135
|
+
cache_scope="private",
|
|
120
136
|
)
|
|
121
137
|
|
|
122
138
|
|
|
@@ -695,6 +711,7 @@ async def gitlab_create_project(
|
|
|
695
711
|
@mcp.tool(
|
|
696
712
|
tags={"gitlab", "projects", "write"},
|
|
697
713
|
annotations={"destructiveHint": True, "readOnlyHint": False, "openWorldHint": True},
|
|
714
|
+
meta={"anthropic/requiresUserInteraction": True},
|
|
698
715
|
)
|
|
699
716
|
@tool_result(write=True)
|
|
700
717
|
async def gitlab_delete_project(
|
|
@@ -889,6 +906,7 @@ async def gitlab_update_project_approval_rule(
|
|
|
889
906
|
@mcp.tool(
|
|
890
907
|
tags={"gitlab", "approvals", "write"},
|
|
891
908
|
annotations={"destructiveHint": True, "readOnlyHint": False, "openWorldHint": True},
|
|
909
|
+
meta={"anthropic/requiresUserInteraction": True},
|
|
892
910
|
)
|
|
893
911
|
@tool_result(write=True)
|
|
894
912
|
async def gitlab_delete_project_approval_rule(
|
|
@@ -989,6 +1007,7 @@ async def gitlab_update_mr_approval_rule(
|
|
|
989
1007
|
@mcp.tool(
|
|
990
1008
|
tags={"gitlab", "approvals", "write"},
|
|
991
1009
|
annotations={"destructiveHint": True, "readOnlyHint": False, "openWorldHint": True},
|
|
1010
|
+
meta={"anthropic/requiresUserInteraction": True},
|
|
992
1011
|
)
|
|
993
1012
|
@tool_result(write=True)
|
|
994
1013
|
async def gitlab_delete_mr_approval_rule(
|
|
@@ -1074,6 +1093,7 @@ async def gitlab_share_project_with_group(
|
|
|
1074
1093
|
@mcp.tool(
|
|
1075
1094
|
tags={"gitlab", "groups", "write"},
|
|
1076
1095
|
annotations={"destructiveHint": True, "readOnlyHint": False, "openWorldHint": True},
|
|
1096
|
+
meta={"anthropic/requiresUserInteraction": True},
|
|
1077
1097
|
)
|
|
1078
1098
|
@tool_result(write=True)
|
|
1079
1099
|
async def gitlab_unshare_project_with_group(
|
|
@@ -1114,6 +1134,7 @@ async def gitlab_share_group_with_group(
|
|
|
1114
1134
|
@mcp.tool(
|
|
1115
1135
|
tags={"gitlab", "groups", "write"},
|
|
1116
1136
|
annotations={"destructiveHint": True, "readOnlyHint": False, "openWorldHint": True},
|
|
1137
|
+
meta={"anthropic/requiresUserInteraction": True},
|
|
1117
1138
|
)
|
|
1118
1139
|
@tool_result(write=True)
|
|
1119
1140
|
async def gitlab_unshare_group_with_group(
|
|
@@ -1180,6 +1201,7 @@ async def gitlab_create_branch(
|
|
|
1180
1201
|
@mcp.tool(
|
|
1181
1202
|
tags={"gitlab", "branches", "write"},
|
|
1182
1203
|
annotations={"destructiveHint": True, "readOnlyHint": False, "openWorldHint": True},
|
|
1204
|
+
meta={"anthropic/requiresUserInteraction": True},
|
|
1183
1205
|
)
|
|
1184
1206
|
@tool_result(write=True)
|
|
1185
1207
|
async def gitlab_delete_branch(
|
|
@@ -1633,6 +1655,8 @@ async def gitlab_rebase_mr(
|
|
|
1633
1655
|
@mcp.tool(
|
|
1634
1656
|
tags={"gitlab", "merge_requests", "read"},
|
|
1635
1657
|
annotations={"readOnlyHint": True, "idempotentHint": True, "openWorldHint": True},
|
|
1658
|
+
# Raise the 50k-char persist-to-disk threshold (max 500k): a full MR diff can be large.
|
|
1659
|
+
meta={"anthropic/maxResultSizeChars": 200000},
|
|
1636
1660
|
)
|
|
1637
1661
|
@tool_result
|
|
1638
1662
|
async def gitlab_mr_changes(
|
|
@@ -1726,6 +1750,7 @@ async def gitlab_add_mr_note(
|
|
|
1726
1750
|
@mcp.tool(
|
|
1727
1751
|
tags={"gitlab", "notes", "write"},
|
|
1728
1752
|
annotations={"destructiveHint": True, "readOnlyHint": False, "openWorldHint": True},
|
|
1753
|
+
meta={"anthropic/requiresUserInteraction": True},
|
|
1729
1754
|
)
|
|
1730
1755
|
@tool_result(write=True)
|
|
1731
1756
|
async def gitlab_delete_mr_note(
|
|
@@ -1789,6 +1814,7 @@ async def gitlab_award_emoji(
|
|
|
1789
1814
|
@mcp.tool(
|
|
1790
1815
|
tags={"gitlab", "notes", "write"},
|
|
1791
1816
|
annotations={"destructiveHint": True, "readOnlyHint": False, "openWorldHint": True},
|
|
1817
|
+
meta={"anthropic/requiresUserInteraction": True},
|
|
1792
1818
|
)
|
|
1793
1819
|
@tool_result(write=True)
|
|
1794
1820
|
async def gitlab_remove_emoji(
|
|
@@ -1991,6 +2017,8 @@ async def _resolve_ref(client: GitLabClient, enc: str, ref: str | None) -> str:
|
|
|
1991
2017
|
@mcp.tool(
|
|
1992
2018
|
tags={"gitlab", "files", "read"},
|
|
1993
2019
|
annotations={"readOnlyHint": True, "idempotentHint": True, "openWorldHint": True},
|
|
2020
|
+
# Raise the 50k-char persist-to-disk threshold (max 500k): a large file at a ref.
|
|
2021
|
+
meta={"anthropic/maxResultSizeChars": 200000},
|
|
1994
2022
|
)
|
|
1995
2023
|
@tool_result
|
|
1996
2024
|
async def gitlab_get_file(
|
|
@@ -2304,6 +2332,7 @@ async def gitlab_publish_draft_notes(
|
|
|
2304
2332
|
@mcp.tool(
|
|
2305
2333
|
tags={"gitlab", "review", "write"},
|
|
2306
2334
|
annotations={"destructiveHint": True, "readOnlyHint": False, "openWorldHint": True},
|
|
2335
|
+
meta={"anthropic/requiresUserInteraction": True},
|
|
2307
2336
|
)
|
|
2308
2337
|
@tool_result(write=True)
|
|
2309
2338
|
async def gitlab_delete_draft_note(
|
|
@@ -2598,6 +2627,7 @@ async def gitlab_retry_pipeline(
|
|
|
2598
2627
|
@mcp.tool(
|
|
2599
2628
|
tags={"gitlab", "pipelines", "write"},
|
|
2600
2629
|
annotations={"destructiveHint": True, "readOnlyHint": False, "openWorldHint": True},
|
|
2630
|
+
meta={"anthropic/requiresUserInteraction": True},
|
|
2601
2631
|
)
|
|
2602
2632
|
@tool_result(write=True)
|
|
2603
2633
|
async def gitlab_cancel_pipeline(
|
|
@@ -2670,6 +2700,7 @@ async def gitlab_play_job(
|
|
|
2670
2700
|
@mcp.tool(
|
|
2671
2701
|
tags={"gitlab", "jobs", "write"},
|
|
2672
2702
|
annotations={"destructiveHint": True, "readOnlyHint": False, "openWorldHint": True},
|
|
2703
|
+
meta={"anthropic/requiresUserInteraction": True},
|
|
2673
2704
|
)
|
|
2674
2705
|
@tool_result(write=True)
|
|
2675
2706
|
async def gitlab_cancel_job(
|
|
@@ -2793,6 +2824,7 @@ async def gitlab_create_tag(
|
|
|
2793
2824
|
@mcp.tool(
|
|
2794
2825
|
tags={"gitlab", "tags", "write"},
|
|
2795
2826
|
annotations={"destructiveHint": True, "readOnlyHint": False, "openWorldHint": True},
|
|
2827
|
+
meta={"anthropic/requiresUserInteraction": True},
|
|
2796
2828
|
)
|
|
2797
2829
|
@tool_result(write=True)
|
|
2798
2830
|
async def gitlab_delete_tag(
|
|
@@ -2913,6 +2945,7 @@ async def gitlab_update_release(
|
|
|
2913
2945
|
@mcp.tool(
|
|
2914
2946
|
tags={"gitlab", "releases", "write"},
|
|
2915
2947
|
annotations={"destructiveHint": True, "readOnlyHint": False, "openWorldHint": True},
|
|
2948
|
+
meta={"anthropic/requiresUserInteraction": True},
|
|
2916
2949
|
)
|
|
2917
2950
|
@tool_result(write=True)
|
|
2918
2951
|
async def gitlab_delete_release(
|
|
@@ -3045,6 +3078,7 @@ async def gitlab_update_variable(
|
|
|
3045
3078
|
@mcp.tool(
|
|
3046
3079
|
tags={"gitlab", "variables", "write"},
|
|
3047
3080
|
annotations={"destructiveHint": True, "readOnlyHint": False, "openWorldHint": True},
|
|
3081
|
+
meta={"anthropic/requiresUserInteraction": True},
|
|
3048
3082
|
)
|
|
3049
3083
|
@tool_result(write=True)
|
|
3050
3084
|
async def gitlab_delete_variable(
|
|
@@ -3164,6 +3198,7 @@ async def gitlab_update_group_variable(
|
|
|
3164
3198
|
@mcp.tool(
|
|
3165
3199
|
tags={"gitlab", "variables", "write"},
|
|
3166
3200
|
annotations={"destructiveHint": True, "readOnlyHint": False, "openWorldHint": True},
|
|
3201
|
+
meta={"anthropic/requiresUserInteraction": True},
|
|
3167
3202
|
)
|
|
3168
3203
|
@tool_result(write=True)
|
|
3169
3204
|
async def gitlab_delete_group_variable(
|
|
@@ -52,3 +52,22 @@ async def test_2026_07_28_support(monkeypatch):
|
|
|
52
52
|
async with Client(mcp, mode="2026-07-28") as client:
|
|
53
53
|
tools = await client.list_tools()
|
|
54
54
|
assert len(tools) == _decorators("tool")
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
async def test_server_identity_and_cache_hints(monkeypatch):
|
|
58
|
+
"""serverInfo reports the installed package version and the website (#156); list
|
|
59
|
+
results carry the 2026-07-28 cache hints ttlMs=300000 / cacheScope=private (#155).
|
|
60
|
+
"""
|
|
61
|
+
from importlib.metadata import version as pkg_version
|
|
62
|
+
|
|
63
|
+
monkeypatch.setenv("GITLAB_URL", "https://gitlab.example.com")
|
|
64
|
+
monkeypatch.setenv("GITLAB_TOKEN", "test-token")
|
|
65
|
+
monkeypatch.delenv("GITLAB_READ_ONLY", raising=False)
|
|
66
|
+
async with Client(mcp, mode="2026-07-28") as client:
|
|
67
|
+
result = await client.session.list_tools()
|
|
68
|
+
assert result.ttl_ms == 300000
|
|
69
|
+
assert result.cache_scope == "private"
|
|
70
|
+
info = result.meta["io.modelcontextprotocol/serverInfo"]
|
|
71
|
+
assert info["version"] == pkg_version("mcp-gitlab")
|
|
72
|
+
assert info["websiteUrl"] == "https://vish288.github.io/mcp-install?server=mcp-gitlab"
|
|
73
|
+
assert info["icons"][0]["src"].endswith("mcp-gitlab/main/assets/icon.svg")
|
|
@@ -940,3 +940,22 @@ async def test_network_error_is_expected(tool_client, caplog):
|
|
|
940
940
|
assert "reach gitlab" in body["hint"].lower()
|
|
941
941
|
assert result.structured_content is None
|
|
942
942
|
assert not [r for r in caplog.records if r.name == "mcp_gitlab.servers.gitlab"]
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
async def test_destructive_tools_require_user_interaction():
|
|
946
|
+
"""Exactly the destructiveHint tools carry the ``anthropic/requiresUserInteraction``
|
|
947
|
+
meta (G8): Claude Code then forces a permission prompt on every destructive call and
|
|
948
|
+
never on a read. ``maxResultSizeChars`` on a bulk reader is a different meta key and
|
|
949
|
+
must not count as requiresUserInteraction.
|
|
950
|
+
"""
|
|
951
|
+
for t in await mcp._list_tools():
|
|
952
|
+
destructive = bool(t.annotations and t.annotations.destructive_hint)
|
|
953
|
+
requires = bool((t.meta or {}).get("anthropic/requiresUserInteraction"))
|
|
954
|
+
assert destructive == requires, t.name
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
async def test_bulk_readers_raise_result_size_cap():
|
|
958
|
+
"""gitlab_mr_changes and gitlab_get_file lift the 50k persist-to-disk cap."""
|
|
959
|
+
by_name = {t.name: t for t in await mcp._list_tools()}
|
|
960
|
+
for name in ("gitlab_mr_changes", "gitlab_get_file"):
|
|
961
|
+
assert (by_name[name].meta or {}).get("anthropic/maxResultSizeChars") == 200000
|