mcp-gitlab 0.22.0__tar.gz → 0.24.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.24.0/.claude-plugin/plugin.json +35 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/.copier-answers.yml +1 -1
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/.github/workflows/link-check.yml +3 -1
- mcp_gitlab-0.24.0/.github/workflows/lint.yml +8 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/.github/workflows/publish.yml +2 -2
- mcp_gitlab-0.24.0/.github/workflows/reconcile.yml +15 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/.github/workflows/release.yml +1 -1
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/.github/workflows/tests.yml +3 -1
- mcp_gitlab-0.24.0/.mcp.json +15 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/AGENTS.md +44 -6
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/CHANGELOG.md +33 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/PKG-INFO +74 -1
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/README.md +73 -0
- mcp_gitlab-0.24.0/assets/icon.svg +12 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/gemini-extension.json +8 -2
- mcp_gitlab-0.24.0/glama.json +4 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/llms-full.txt +2 -2
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/llms.txt +2 -2
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/pyproject.toml +1 -1
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/server.json +21 -2
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/__init__.py +13 -1
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/servers/gitlab.py +111 -1
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/conftest.py +5 -3
- mcp_gitlab-0.24.0/tests/unit/test_health.py +30 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/unit/test_read_only_lock.py +19 -3
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/unit/test_server_assembly.py +19 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/unit/test_tool_contract.py +19 -0
- mcp_gitlab-0.24.0/tests/unit/test_toolsets.py +192 -0
- mcp_gitlab-0.24.0/uv.lock +1764 -0
- mcp_gitlab-0.22.0/.github/workflows/lint.yml +0 -6
- mcp_gitlab-0.22.0/.github/workflows/reconcile.yml +0 -15
- mcp_gitlab-0.22.0/uv.lock +0 -1764
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/.dockerignore +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/.env.example +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/.github/dependabot.yml +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/.gitignore +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/Dockerfile +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/LICENSE +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/docs/oauth.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/docs/specs/2026-09-21-test-confidence-and-error-contract.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/evaluations/eval.xml +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/ruff.toml +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/__main__.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/client.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/config.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/exceptions.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/local_auth.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/oauth.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/py.typed +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/resources/approval-workflow.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/resources/code-review.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/resources/codeowners.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/resources/conventional-commits.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/resources/git-workflow.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/resources/gitlab-ci.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/resources/mr-hygiene.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/resources/prompts/approve-mr.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/resources/prompts/diagnose-pipeline.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/resources/prompts/prepare-release.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/resources/prompts/review-mr.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/resources/prompts/setup-branch-protection.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/resources/prompts/triage-issues.md +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/servers/__init__.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/servers/_helpers.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/servers/prompts.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/src/mcp_gitlab/servers/resources.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/__init__.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/test_links.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/unit/__init__.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/unit/test_cli.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/unit/test_client.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/unit/test_config.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/unit/test_exceptions.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/unit/test_local_auth.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/unit/test_oauth.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/unit/test_oauth_http.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/unit/test_prompts.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/unit/test_resources.py +0 -0
- {mcp_gitlab-0.22.0 → mcp_gitlab-0.24.0}/tests/unit/test_tools.py +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mcp-gitlab",
|
|
3
|
+
"displayName": "GitLab",
|
|
4
|
+
"version": "0.24.0",
|
|
5
|
+
"description": "GitLab MCP server (MCP 2026-07-28): projects, MRs, pipelines, CI/CD, issues; writes or read-only",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "vish288"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://vish288.github.io/mcp-install?server=mcp-gitlab",
|
|
10
|
+
"repository": "https://github.com/vish288/mcp-gitlab",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"userConfig": {
|
|
13
|
+
"gitlab_token": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"title": "GITLAB_TOKEN",
|
|
16
|
+
"description": "GitLab personal access token (token mode). Optional after `mcp-gitlab auth login`; also accepts GITLAB_PAT, GITLAB_PERSONAL_ACCESS_TOKEN, GITLAB_API_TOKEN",
|
|
17
|
+
"required": false,
|
|
18
|
+
"sensitive": true
|
|
19
|
+
},
|
|
20
|
+
"gitlab_url": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"title": "GITLAB_URL",
|
|
23
|
+
"description": "GitLab instance URL (e.g. https://gitlab.com)",
|
|
24
|
+
"required": true,
|
|
25
|
+
"sensitive": false
|
|
26
|
+
},
|
|
27
|
+
"mcp_read_only": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"title": "MCP_READ_ONLY",
|
|
30
|
+
"description": "Locks the server read-only: write tools and write-workflow prompts are not listed and nothing lifts the lock at runtime. Shared name across the mcp-* servers; set it in the deployer's env",
|
|
31
|
+
"required": false,
|
|
32
|
+
"sensitive": false
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -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@32162d0f696f22bb25ba61c0d9f74ea4d5c5b8a7 # v1.5.0
|
|
@@ -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@32162d0f696f22bb25ba61c0d9f74ea4d5c5b8a7 # v1.5.0
|
|
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@32162d0f696f22bb25ba61c0d9f74ea4d5c5b8a7 # v1.5.0
|
|
72
72
|
with:
|
|
73
73
|
dry_run: ${{ inputs.dry_run }}
|
|
74
74
|
fail_at: ${{ inputs.fail_at }}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name: Reconcile releases
|
|
2
|
+
# Stub -> vish288/.github.
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "23 */6 * * *"
|
|
6
|
+
workflow_run: # zizmor: ignore[dangerous-triggers] only retries this repo's own failed Publish run; never checks out PR head or untrusted code
|
|
7
|
+
workflows: [Publish]
|
|
8
|
+
types: [completed]
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
jobs:
|
|
11
|
+
reconcile:
|
|
12
|
+
uses: vish288/.github/.github/workflows/reconcile.yml@32162d0f696f22bb25ba61c0d9f74ea4d5c5b8a7 # v1.5.0
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
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@32162d0f696f22bb25ba61c0d9f74ea4d5c5b8a7 # v1.5.0
|
|
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@32162d0f696f22bb25ba61c0d9f74ea4d5c5b8a7 # v1.5.0
|
|
7
9
|
with:
|
|
8
10
|
coverage_min: 98
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"gitlab": {
|
|
4
|
+
"command": "uvx",
|
|
5
|
+
"args": [
|
|
6
|
+
"mcp-gitlab@0.24.0"
|
|
7
|
+
],
|
|
8
|
+
"env": {
|
|
9
|
+
"GITLAB_TOKEN": "${user_config.gitlab_token}",
|
|
10
|
+
"GITLAB_URL": "${user_config.gitlab_url}",
|
|
11
|
+
"MCP_READ_ONLY": "${user_config.mcp_read_only}"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -21,6 +21,15 @@ GitLab tokens). The auth MUSTs are covered by in-process HTTP tests in `tests/un
|
|
|
21
21
|
not by a CI conformance job: the MCP conformance suite has no server-side auth scenarios (`auth/*`
|
|
22
22
|
are client scenarios), so a conformance job cannot prove them.
|
|
23
23
|
|
|
24
|
+
## Observability
|
|
25
|
+
|
|
26
|
+
HTTP transports expose `GET /health` (a `@mcp.custom_route` in `servers/gitlab.py`): an
|
|
27
|
+
unauthenticated liveness probe returning `{"status", "name", "version"}` and nothing else —
|
|
28
|
+
FastMCP's auth guards `/mcp`, not custom routes, so it carries no config or secrets. FastMCP 4
|
|
29
|
+
emits OpenTelemetry spans for `tools/call` and propagates trace context by default;
|
|
30
|
+
`OTEL_EXPORTER_OTLP_ENDPOINT` with `opentelemetry-instrument` exports them, and
|
|
31
|
+
`FASTMCP_TELEMETRY_MODE=off` disables it. Tested via `httpx.ASGITransport(mcp.http_app())`.
|
|
32
|
+
|
|
24
33
|
## Architecture
|
|
25
34
|
|
|
26
35
|
- **Entry point**: `src/mcp_gitlab/__init__.py` — click CLI, loads `.env` via python-dotenv, runs the FastMCP server
|
|
@@ -60,7 +69,7 @@ pushed to a registry.
|
|
|
60
69
|
- Errors: expected failures are `isError: true` results whose text content is the `{"error", "status_code"?, "body"?, "hint"?}` object and which set no `structuredContent` (a strict client — the TS MCP SDK — validates `structuredContent` against the tool's output schema even on an error, and the schema rejects the error body); bugs are `isError: true` with `TypeName: message` text and no `structuredContent`, logged with a traceback
|
|
61
70
|
- `_slim_pipeline` / `_slim_job` trim pipeline and job payloads; tools expose `slim=True` by default
|
|
62
71
|
- Write access control: a truthy `MCP_READ_ONLY` / `GITLAB_READ_ONLY` locks the server read-only — `_lock_read_only` hides the write tools from `tools/list`, and `_check_write(ctx)` (via `@tool_result(write=True)`, or inline in `gitlab_merge_mr_sequence`) raises `GitLabWriteDisabledError` as defence in depth (see Read-only mode)
|
|
63
|
-
- Tags: every tool tagged
|
|
72
|
+
- Tags: every tool tagged `{"gitlab", "<category>", "read"|"write"}`; five MR tools also carry a second domain tag (`list_mr_pipelines`, `list_mr_commits`, `approve_mr`, `unapprove_mr`, `get_mr_approvals`), which is why they are listed in two toolset groups
|
|
64
73
|
- Parameters use `Annotated[type, Field(description=...)]`
|
|
65
74
|
- Client auth is a per-request header: `PRIVATE-TOKEN` in token mode, `Bearer` from `get_access_token()` in oauth mode. `GitLabClient.with_bearer(token)` returns a shallow copy that shares the connection pool but swaps the auth header. The shared `httpx.AsyncClient` uses a cookie jar that rejects every cookie (empty-`allowed_domains` policy) so a `Set-Cookie` from GitLab is never stored on the shared client and replayed on another user's request
|
|
66
75
|
- `GitLabClient._send` is the one send path for every verb. With stored local-sign-in credentials it sets a `Bearer` header from `LocalCredentials.bearer()` (proactive refresh within a 300 s margin) and, on a 401, refreshes once and retries; refresh failure raises `GitLabAuthError` rather than looping
|
|
@@ -101,10 +110,12 @@ sources (any locking one wins; a falsy value never unlocks and logs a WARNING; a
|
|
|
101
110
|
value fails closed), and the lifespan calls `_lock_read_only(server)`, which
|
|
102
111
|
`server.disable(tags={"write"})` so write tools and write-workflow prompts drop out of
|
|
103
112
|
`tools/list`/`prompts/list` and `tools/call` on them returns "Unknown tool". The lock is
|
|
104
|
-
computed once and never cleared; `
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
113
|
+
computed once and never cleared; the only `enable` call in `src/` is the `MCP_TOOLSETS`
|
|
114
|
+
allowlist (`_apply_toolsets`), which runs before the lock and never names the `write` tag, so
|
|
115
|
+
the lock stays the last word. The lock is unconditional on auth mode (oauth also hides by
|
|
116
|
+
tag); the per-user `read_api` scope refusal in `_check_write` stays call-time. Every write
|
|
117
|
+
tool MUST still call `_check_write(ctx)` (via `@tool_result(write=True)`, or inline as
|
|
118
|
+
`gitlab_merge_mr_sequence` does) as defence in depth.
|
|
108
119
|
|
|
109
120
|
### Naming convention
|
|
110
121
|
- Pattern: `gitlab_{verb}_{resource}` (snake_case)
|
|
@@ -135,6 +146,32 @@ unconditional on auth mode (oauth also hides by tag); the per-user `read_api` sc
|
|
|
135
146
|
The table counts the share/unshare tools under Groups, not Projects. There is no `gitlab_list_jobs` —
|
|
136
147
|
get job IDs from `gitlab_get_pipeline(..., include_jobs=True)`.
|
|
137
148
|
|
|
149
|
+
### Tool surface (MCP_TOOLSETS)
|
|
150
|
+
|
|
151
|
+
`MCP_TOOLSETS` (or `--toolsets`) switches `tools/list` to an allowlist of coarse groups — named
|
|
152
|
+
sets of the raw domain tags the tools already carry — so a client with a tool budget sees fewer.
|
|
153
|
+
Resources and prompts stay listed regardless (fastmcp `enable(components=...)` re-lists them after
|
|
154
|
+
the `enable(tags=..., only=True)` allowlist), and the read-only lock runs after the allowlist so it
|
|
155
|
+
only ever removes more tools. Unset or `all` lists every tool; an unknown name exits 2.
|
|
156
|
+
|
|
157
|
+
| Group | Raw tags | Tools | Read-only |
|
|
158
|
+
|---|---|---|---|
|
|
159
|
+
| `code` | files, branches, commits | 12 | 9 |
|
|
160
|
+
| `review` | merge_requests, notes, discussions, review | 29 | 9 |
|
|
161
|
+
| `ci` | pipelines, jobs, variables | 18 | 6 |
|
|
162
|
+
| `issues` | issues | 5 | 2 |
|
|
163
|
+
| `release` | tags, releases | 9 | 4 |
|
|
164
|
+
| `admin` | projects, groups, approvals | 23 | 7 |
|
|
165
|
+
| `all` (default) | every tag | 91 | 34 |
|
|
166
|
+
|
|
167
|
+
The map is `TOOLSET_GROUPS` in `servers/gitlab.py`; `_apply_toolsets` runs in the lifespan before
|
|
168
|
+
`_lock_read_only`. Five tools carry two domain tags and are listed in both groups:
|
|
169
|
+
`gitlab_list_mr_commits` (code, review), `gitlab_list_mr_pipelines` (review, ci), and
|
|
170
|
+
`gitlab_approve_mr` / `gitlab_unapprove_mr` / `gitlab_get_mr_approvals` (review, admin). A test
|
|
171
|
+
asserts every raw domain tag belongs to exactly one group and only those five tools carry two.
|
|
172
|
+
`review,ci` (46) and `code,review` (40) reach or pass Cursor's 40-tool warning; every single group
|
|
173
|
+
stays under it.
|
|
174
|
+
|
|
138
175
|
## Common Workflows
|
|
139
176
|
|
|
140
177
|
- **Code review**: `gitlab_list_mrs` → `gitlab_mr_changes` → `gitlab_list_mr_discussions` → `gitlab_add_mr_note` or `gitlab_create_mr_discussion` → `gitlab_resolve_discussion`
|
|
@@ -168,6 +205,7 @@ plus an assistant acknowledgment.
|
|
|
168
205
|
| token (see below) | yes, unless signed in via `mcp-gitlab auth login` | — | Personal access token, OAuth2 token, or `$CI_JOB_TOKEN` |
|
|
169
206
|
| `GITLAB_READ_ONLY` | no | `false` | Truthy (or unrecognised) locks the server read-only: the write tools are not listed and are refused before any API call |
|
|
170
207
|
| `MCP_READ_ONLY` | no | `false` | Same as `GITLAB_READ_ONLY`; shared name across the mcp-* servers. Either being truthy locks read-only, and nothing turns it off at runtime |
|
|
208
|
+
| `MCP_TOOLSETS` | no | all | Comma list of tool groups (`code`, `review`, `ci`, `issues`, `release`, `admin`); unset or `all` lists every tool. Validated at startup (unknown name exits 2); `MCP_READ_ONLY` applies after the selection |
|
|
171
209
|
| `GITLAB_TIMEOUT` | no | `30` | Request timeout in seconds |
|
|
172
210
|
| `GITLAB_SSL_VERIFY` | no | `true` | `false`/`0`/`no` skips verification — self-signed certs only |
|
|
173
211
|
| `GITLAB_AUTH` | no | `token` | `token` (PAT from env) or `oauth` (OAuth 2.1 proxy to GitLab; `streamable-http` only) |
|
|
@@ -184,7 +222,7 @@ The server reads the token from the first of `GITLAB_TOKEN`, `GITLAB_PAT`,
|
|
|
184
222
|
`read_api` for read-only deployments. The server never persists an env token. Stored OAuth
|
|
185
223
|
credentials live in `~/.config/mcp-gitlab/credentials.json`.
|
|
186
224
|
|
|
187
|
-
CLI flags override env: `--gitlab-url`, `--read-only`, plus
|
|
225
|
+
CLI flags override env: `--gitlab-url`, `--read-only`, `--toolsets`, plus
|
|
188
226
|
`--transport {stdio,sse,streamable-http}` with `--host` (default `127.0.0.1`) and `--port`
|
|
189
227
|
(default `8000`); host/port apply only to non-stdio transports (`--gitlab-token` is deprecated
|
|
190
228
|
and hidden from `--help`; it still works and warns on stderr — set `GITLAB_TOKEN` instead). The
|
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.24.0] - 2026-11-10
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
- feat(http): /health route (1d684d3)
|
|
7
|
+
- feat(config): MCP_TOOLSETS (9dc1fb0)
|
|
8
|
+
|
|
9
|
+
### Documentation
|
|
10
|
+
- docs: Claude Code plugin install (509128a)
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
- chore(fleet): template v1.5.0 (991a28c)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [0.23.0] - 2026-11-09
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
- feat: add server icon (registry and identity) (2b84eed)
|
|
20
|
+
- feat: cache hints and server identity (e3f64e0)
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
- fix(annotations): require approval on destructive tools (8303089)
|
|
24
|
+
- fix(registry): title, websiteUrl and runtimeHint in server.json (5922ece)
|
|
25
|
+
|
|
26
|
+
### Documentation
|
|
27
|
+
- docs: link contributing and security policy (0e0a70e)
|
|
28
|
+
|
|
29
|
+
### Chores
|
|
30
|
+
- chore(fleet): template v1.4.1 (fcaabdf)
|
|
31
|
+
- chore(fleet): template v1.4.0 (c46b47f)
|
|
32
|
+
- chore(deps): weekly patch 2026-11-08 (0d47821)
|
|
33
|
+
- chore(deps): weekly patch 2026-11-06 (612bec9)
|
|
34
|
+
|
|
35
|
+
|
|
3
36
|
## [0.22.0] - 2026-11-06
|
|
4
37
|
|
|
5
38
|
### Features
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: mcp-gitlab
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.24.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
|
|
@@ -61,6 +61,13 @@ MCP_READ_ONLY=true uvx mcp-gitlab # locked read-only: write tools are not
|
|
|
61
61
|
|
|
62
62
|
## 1-Click Installation
|
|
63
63
|
|
|
64
|
+
**Claude Code plugin** — one command adds the fleet marketplace, the next installs the server, prompts for `GITLAB_URL`/`GITLAB_TOKEN` (the token is stored in the credential store, never written to a config file) with an optional `MCP_READ_ONLY` toggle, and keeps it updated:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
claude plugin marketplace add vish288/.github
|
|
68
|
+
claude plugin install mcp-gitlab@vish288-mcp
|
|
69
|
+
```
|
|
70
|
+
|
|
64
71
|
[](https://vish288.github.io/mcp-install?server=mcp-gitlab&install=cursor)
|
|
65
72
|
|
|
66
73
|
[](https://vish288.github.io/mcp-install?server=mcp-gitlab&install=vscode) [](https://vish288.github.io/mcp-install?server=mcp-gitlab&install=vscode-insiders)
|
|
@@ -162,11 +169,48 @@ Drop `MCP_READ_ONLY` to allow writes. On a shared or hosted server put it in the
|
|
|
162
169
|
| `GITLAB_TOKEN` | Yes, unless signed in with `mcp-gitlab auth login` | - | Authentication token (see below) |
|
|
163
170
|
| `MCP_READ_ONLY` | No | `false` | Shared name across the mcp-* servers. Any value other than `false`/`0`/`no`/`off`/empty locks the server read-only: the 57 write tools and write-workflow prompts are not listed, and nothing can turn it back off at runtime |
|
|
164
171
|
| `GITLAB_READ_ONLY` | No | `false` | Per-server alias for `MCP_READ_ONLY`; either one locks the server read-only. `--read-only` can only raise the lock |
|
|
172
|
+
| `MCP_TOOLSETS` | No | all | Comma list of tool groups to expose (see Toolsets); unset or `all` lists every tool. `MCP_READ_ONLY` still applies after the selection |
|
|
165
173
|
| `GITLAB_HTTP_BEARER_TOKEN` | No | - | Bearer token (min 16 chars) required to bind an HTTP transport to a non-loopback host; clients send `Authorization: Bearer <token>`; token mode only |
|
|
166
174
|
| `GITLAB_TIMEOUT` | No | `30` | Request timeout in seconds |
|
|
167
175
|
| `GITLAB_SSL_VERIFY` | No | `true` | Set to `false` to skip SSL verification |
|
|
168
176
|
| `GITLAB_AUTH` | No | `token` | `token` (PAT from env) or `oauth` (OAuth 2.1 proxy; see below) |
|
|
169
177
|
|
|
178
|
+
### Toolsets
|
|
179
|
+
|
|
180
|
+
Clients cap how many tools they forward: Cursor warns past **40 tools across all enabled
|
|
181
|
+
servers**. `MCP_TOOLSETS` (or `--toolsets`) shrinks `tools/list` to one or more named groups —
|
|
182
|
+
sets of the raw domain tags the tools already carry — so a single-job selection is cheap.
|
|
183
|
+
Unset or `all` lists every tool. Names are lowercase and comma-separated; an unknown name
|
|
184
|
+
exits 2 with the valid list. `MCP_READ_ONLY` still applies afterward and only ever removes
|
|
185
|
+
more tools (the read-only column).
|
|
186
|
+
|
|
187
|
+
| Group | Raw tags | Tools | Read-only |
|
|
188
|
+
|-------|----------|-------|-----------|
|
|
189
|
+
| `code` | files, branches, commits | 12 | 9 |
|
|
190
|
+
| `review` | merge_requests, notes, discussions, review | 29 | 9 |
|
|
191
|
+
| `ci` | pipelines, jobs, variables | 18 | 6 |
|
|
192
|
+
| `issues` | issues | 5 | 2 |
|
|
193
|
+
| `release` | tags, releases | 9 | 4 |
|
|
194
|
+
| `admin` | projects, groups, approvals | 23 | 7 |
|
|
195
|
+
| `all` (default) | every tag | 91 | 34 |
|
|
196
|
+
|
|
197
|
+
Five tools carry two domain tags, so they are listed in both of their groups:
|
|
198
|
+
`gitlab_list_mr_commits` (`code`, `review`), `gitlab_list_mr_pipelines` (`review`, `ci`), and
|
|
199
|
+
`gitlab_approve_mr` / `gitlab_unapprove_mr` / `gitlab_get_mr_approvals` (`review`, `admin`).
|
|
200
|
+
|
|
201
|
+
Every single group stays under 40, and so does `review,issues` (34). Two pairs do not, because
|
|
202
|
+
the shared tools are counted once each: **`review,ci` lists 46 tools** and **`code,review` lists
|
|
203
|
+
40**, so both reach or pass Cursor's 40-tool warning. Pick one group per job, or leave room for
|
|
204
|
+
your other servers.
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
MCP_TOOLSETS=review uvx mcp-gitlab # MR review: 29 tools
|
|
208
|
+
uvx mcp-gitlab --toolsets ci # pipelines, jobs, CI/CD variables: 18 tools
|
|
209
|
+
MCP_TOOLSETS=issues,release uvx mcp-gitlab
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Resources and prompts are unaffected by the selection.
|
|
213
|
+
|
|
170
214
|
### Supported Token Types
|
|
171
215
|
|
|
172
216
|
The server checks these environment variables in order — first match wins:
|
|
@@ -299,6 +343,7 @@ mcp-gitlab implements the Model Context Protocol. It supports the 2026-07-28 spe
|
|
|
299
343
|
- **Built on**: FastMCP 4.x and the MCP Python SDK 2.x.
|
|
300
344
|
- **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
345
|
- **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.
|
|
346
|
+
- **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
347
|
|
|
303
348
|
### Error results
|
|
304
349
|
|
|
@@ -575,6 +620,7 @@ The server provides [MCP prompts](https://modelcontextprotocol.io/docs/concepts/
|
|
|
575
620
|
- **SSL verification**: `GITLAB_SSL_VERIFY=true` by default. Only disable for self-signed certificates in trusted networks.
|
|
576
621
|
- **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
622
|
- **MCP tool annotations**: Each tool declares `readOnlyHint`, `destructiveHint`, and `idempotentHint` for client-side permission prompts.
|
|
623
|
+
- **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
624
|
- **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
625
|
|
|
580
626
|
## Rate Limits & Permissions
|
|
@@ -613,6 +659,9 @@ mcp-gitlab auth login|status|logout
|
|
|
613
659
|
|
|
614
660
|
# CLI overrides for config
|
|
615
661
|
GITLAB_TOKEN=glpat-xxx uvx mcp-gitlab --gitlab-url https://gitlab.example.com --read-only
|
|
662
|
+
|
|
663
|
+
# Expose only one job's tools (same as MCP_TOOLSETS=review); see Toolsets above
|
|
664
|
+
uvx mcp-gitlab --toolsets review
|
|
616
665
|
```
|
|
617
666
|
|
|
618
667
|
`--gitlab-token` still works but is deprecated and hidden from `--help`: it exposes the token to
|
|
@@ -629,6 +678,28 @@ The default `127.0.0.1` bind needs neither.
|
|
|
629
678
|
|
|
630
679
|
The server loads `.env` files from the working directory automatically via `python-dotenv`.
|
|
631
680
|
|
|
681
|
+
### Observability
|
|
682
|
+
|
|
683
|
+
An HTTP transport exposes `GET /health`, an unauthenticated liveness probe that returns the
|
|
684
|
+
server name and version (no config, no secrets) for container and load-balancer checks:
|
|
685
|
+
|
|
686
|
+
```bash
|
|
687
|
+
curl -s http://127.0.0.1:8000/health
|
|
688
|
+
# {"status":"ok","name":"GitLab MCP Server","version":"0.23.0"}
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
FastMCP emits OpenTelemetry spans for `tools/call` and propagates trace context by default — no
|
|
692
|
+
opt-in needed. Point it at a collector with the standard OTel environment and launch under the
|
|
693
|
+
auto-instrumentation wrapper:
|
|
694
|
+
|
|
695
|
+
```bash
|
|
696
|
+
OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4317 \
|
|
697
|
+
opentelemetry-instrument uvx mcp-gitlab --transport streamable-http --port 8000
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
Set `FASTMCP_TELEMETRY_MODE=off` to disable tracing entirely (`propagation_only` keeps trace-context
|
|
701
|
+
propagation without emitting spans).
|
|
702
|
+
|
|
632
703
|
## Docker
|
|
633
704
|
|
|
634
705
|
A minimal non-root image builds straight from this repo (uv, the committed `uv.lock`). The image
|
|
@@ -700,6 +771,8 @@ uv run ruff check .
|
|
|
700
771
|
uv run ruff format --check .
|
|
701
772
|
```
|
|
702
773
|
|
|
774
|
+
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.
|
|
775
|
+
|
|
703
776
|
## License
|
|
704
777
|
|
|
705
778
|
MIT
|
|
@@ -26,6 +26,13 @@ MCP_READ_ONLY=true uvx mcp-gitlab # locked read-only: write tools are not
|
|
|
26
26
|
|
|
27
27
|
## 1-Click Installation
|
|
28
28
|
|
|
29
|
+
**Claude Code plugin** — one command adds the fleet marketplace, the next installs the server, prompts for `GITLAB_URL`/`GITLAB_TOKEN` (the token is stored in the credential store, never written to a config file) with an optional `MCP_READ_ONLY` toggle, and keeps it updated:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
claude plugin marketplace add vish288/.github
|
|
33
|
+
claude plugin install mcp-gitlab@vish288-mcp
|
|
34
|
+
```
|
|
35
|
+
|
|
29
36
|
[](https://vish288.github.io/mcp-install?server=mcp-gitlab&install=cursor)
|
|
30
37
|
|
|
31
38
|
[](https://vish288.github.io/mcp-install?server=mcp-gitlab&install=vscode) [](https://vish288.github.io/mcp-install?server=mcp-gitlab&install=vscode-insiders)
|
|
@@ -127,11 +134,48 @@ Drop `MCP_READ_ONLY` to allow writes. On a shared or hosted server put it in the
|
|
|
127
134
|
| `GITLAB_TOKEN` | Yes, unless signed in with `mcp-gitlab auth login` | - | Authentication token (see below) |
|
|
128
135
|
| `MCP_READ_ONLY` | No | `false` | Shared name across the mcp-* servers. Any value other than `false`/`0`/`no`/`off`/empty locks the server read-only: the 57 write tools and write-workflow prompts are not listed, and nothing can turn it back off at runtime |
|
|
129
136
|
| `GITLAB_READ_ONLY` | No | `false` | Per-server alias for `MCP_READ_ONLY`; either one locks the server read-only. `--read-only` can only raise the lock |
|
|
137
|
+
| `MCP_TOOLSETS` | No | all | Comma list of tool groups to expose (see Toolsets); unset or `all` lists every tool. `MCP_READ_ONLY` still applies after the selection |
|
|
130
138
|
| `GITLAB_HTTP_BEARER_TOKEN` | No | - | Bearer token (min 16 chars) required to bind an HTTP transport to a non-loopback host; clients send `Authorization: Bearer <token>`; token mode only |
|
|
131
139
|
| `GITLAB_TIMEOUT` | No | `30` | Request timeout in seconds |
|
|
132
140
|
| `GITLAB_SSL_VERIFY` | No | `true` | Set to `false` to skip SSL verification |
|
|
133
141
|
| `GITLAB_AUTH` | No | `token` | `token` (PAT from env) or `oauth` (OAuth 2.1 proxy; see below) |
|
|
134
142
|
|
|
143
|
+
### Toolsets
|
|
144
|
+
|
|
145
|
+
Clients cap how many tools they forward: Cursor warns past **40 tools across all enabled
|
|
146
|
+
servers**. `MCP_TOOLSETS` (or `--toolsets`) shrinks `tools/list` to one or more named groups —
|
|
147
|
+
sets of the raw domain tags the tools already carry — so a single-job selection is cheap.
|
|
148
|
+
Unset or `all` lists every tool. Names are lowercase and comma-separated; an unknown name
|
|
149
|
+
exits 2 with the valid list. `MCP_READ_ONLY` still applies afterward and only ever removes
|
|
150
|
+
more tools (the read-only column).
|
|
151
|
+
|
|
152
|
+
| Group | Raw tags | Tools | Read-only |
|
|
153
|
+
|-------|----------|-------|-----------|
|
|
154
|
+
| `code` | files, branches, commits | 12 | 9 |
|
|
155
|
+
| `review` | merge_requests, notes, discussions, review | 29 | 9 |
|
|
156
|
+
| `ci` | pipelines, jobs, variables | 18 | 6 |
|
|
157
|
+
| `issues` | issues | 5 | 2 |
|
|
158
|
+
| `release` | tags, releases | 9 | 4 |
|
|
159
|
+
| `admin` | projects, groups, approvals | 23 | 7 |
|
|
160
|
+
| `all` (default) | every tag | 91 | 34 |
|
|
161
|
+
|
|
162
|
+
Five tools carry two domain tags, so they are listed in both of their groups:
|
|
163
|
+
`gitlab_list_mr_commits` (`code`, `review`), `gitlab_list_mr_pipelines` (`review`, `ci`), and
|
|
164
|
+
`gitlab_approve_mr` / `gitlab_unapprove_mr` / `gitlab_get_mr_approvals` (`review`, `admin`).
|
|
165
|
+
|
|
166
|
+
Every single group stays under 40, and so does `review,issues` (34). Two pairs do not, because
|
|
167
|
+
the shared tools are counted once each: **`review,ci` lists 46 tools** and **`code,review` lists
|
|
168
|
+
40**, so both reach or pass Cursor's 40-tool warning. Pick one group per job, or leave room for
|
|
169
|
+
your other servers.
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
MCP_TOOLSETS=review uvx mcp-gitlab # MR review: 29 tools
|
|
173
|
+
uvx mcp-gitlab --toolsets ci # pipelines, jobs, CI/CD variables: 18 tools
|
|
174
|
+
MCP_TOOLSETS=issues,release uvx mcp-gitlab
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Resources and prompts are unaffected by the selection.
|
|
178
|
+
|
|
135
179
|
### Supported Token Types
|
|
136
180
|
|
|
137
181
|
The server checks these environment variables in order — first match wins:
|
|
@@ -264,6 +308,7 @@ mcp-gitlab implements the Model Context Protocol. It supports the 2026-07-28 spe
|
|
|
264
308
|
- **Built on**: FastMCP 4.x and the MCP Python SDK 2.x.
|
|
265
309
|
- **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
310
|
- **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.
|
|
311
|
+
- **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
312
|
|
|
268
313
|
### Error results
|
|
269
314
|
|
|
@@ -540,6 +585,7 @@ The server provides [MCP prompts](https://modelcontextprotocol.io/docs/concepts/
|
|
|
540
585
|
- **SSL verification**: `GITLAB_SSL_VERIFY=true` by default. Only disable for self-signed certificates in trusted networks.
|
|
541
586
|
- **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
587
|
- **MCP tool annotations**: Each tool declares `readOnlyHint`, `destructiveHint`, and `idempotentHint` for client-side permission prompts.
|
|
588
|
+
- **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
589
|
- **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
590
|
|
|
545
591
|
## Rate Limits & Permissions
|
|
@@ -578,6 +624,9 @@ mcp-gitlab auth login|status|logout
|
|
|
578
624
|
|
|
579
625
|
# CLI overrides for config
|
|
580
626
|
GITLAB_TOKEN=glpat-xxx uvx mcp-gitlab --gitlab-url https://gitlab.example.com --read-only
|
|
627
|
+
|
|
628
|
+
# Expose only one job's tools (same as MCP_TOOLSETS=review); see Toolsets above
|
|
629
|
+
uvx mcp-gitlab --toolsets review
|
|
581
630
|
```
|
|
582
631
|
|
|
583
632
|
`--gitlab-token` still works but is deprecated and hidden from `--help`: it exposes the token to
|
|
@@ -594,6 +643,28 @@ The default `127.0.0.1` bind needs neither.
|
|
|
594
643
|
|
|
595
644
|
The server loads `.env` files from the working directory automatically via `python-dotenv`.
|
|
596
645
|
|
|
646
|
+
### Observability
|
|
647
|
+
|
|
648
|
+
An HTTP transport exposes `GET /health`, an unauthenticated liveness probe that returns the
|
|
649
|
+
server name and version (no config, no secrets) for container and load-balancer checks:
|
|
650
|
+
|
|
651
|
+
```bash
|
|
652
|
+
curl -s http://127.0.0.1:8000/health
|
|
653
|
+
# {"status":"ok","name":"GitLab MCP Server","version":"0.23.0"}
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
FastMCP emits OpenTelemetry spans for `tools/call` and propagates trace context by default — no
|
|
657
|
+
opt-in needed. Point it at a collector with the standard OTel environment and launch under the
|
|
658
|
+
auto-instrumentation wrapper:
|
|
659
|
+
|
|
660
|
+
```bash
|
|
661
|
+
OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4317 \
|
|
662
|
+
opentelemetry-instrument uvx mcp-gitlab --transport streamable-http --port 8000
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
Set `FASTMCP_TELEMETRY_MODE=off` to disable tracing entirely (`propagation_only` keeps trace-context
|
|
666
|
+
propagation without emitting spans).
|
|
667
|
+
|
|
597
668
|
## Docker
|
|
598
669
|
|
|
599
670
|
A minimal non-root image builds straight from this repo (uv, the committed `uv.lock`). The image
|
|
@@ -665,6 +736,8 @@ uv run ruff check .
|
|
|
665
736
|
uv run ruff format --check .
|
|
666
737
|
```
|
|
667
738
|
|
|
739
|
+
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.
|
|
740
|
+
|
|
668
741
|
## License
|
|
669
742
|
|
|
670
743
|
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.24.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.24.0"
|
|
10
10
|
]
|
|
11
11
|
}
|
|
12
12
|
},
|
|
@@ -35,6 +35,12 @@
|
|
|
35
35
|
"required": false,
|
|
36
36
|
"sensitive": false
|
|
37
37
|
},
|
|
38
|
+
{
|
|
39
|
+
"name": "MCP_TOOLSETS",
|
|
40
|
+
"description": "Comma list of tool groups to expose (code, review, ci, issues, release, admin); unset or 'all' lists every tool. Shrinks tools/list for clients with a tool budget; MCP_READ_ONLY still applies after the selection",
|
|
41
|
+
"required": false,
|
|
42
|
+
"sensitive": false
|
|
43
|
+
},
|
|
38
44
|
{
|
|
39
45
|
"name": "GITLAB_AUTH",
|
|
40
46
|
"description": "Authentication mode: token (default) or oauth (OAuth 2.1 proxy; streamable-http only)",
|
|
@@ -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.24.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.24.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.24.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"}
|