gitlab-api 26.1.0__tar.gz → 26.2.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.
- {gitlab_api-26.1.0/gitlab_api.egg-info → gitlab_api-26.2.0}/PKG-INFO +15 -6
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/README.md +13 -4
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/agent_server.py +1 -1
- gitlab_api-26.2.0/gitlab_api/api/api_client_vulnerabilities.py +168 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/api_client.py +2 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/gitlab_input_models.py +63 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/__init__.py +2 -0
- gitlab_api-26.2.0/gitlab_api/mcp/mcp_vulnerabilities.py +59 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp_server.py +47 -1
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/skills/gitlab-issues/SKILL.md +1 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/skills/gitlab-merge-request-create/SKILL.md +1 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/skills/gitlab-merge-request-review/SKILL.md +1 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/skills/gitlab-pipelines/SKILL.md +1 -0
- gitlab_api-26.2.0/gitlab_api/skills/gitlab-vulnerabilities/SKILL.md +107 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0/gitlab_api.egg-info}/PKG-INFO +15 -6
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api.egg-info/SOURCES.txt +3 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api.egg-info/requires.txt +1 -1
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/pyproject.toml +2 -2
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/LICENSE +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/MANIFEST.in +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/__init__.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/__main__.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/api/__init__.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/api/api_client_base.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/api/api_client_environments.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/api/api_client_issues.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/api/api_client_merge_requests.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/api/api_client_other.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/api/api_client_pipelines.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/api/api_client_projects.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/api/api_client_repositories.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/api/api_client_system.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/api/api_client_users_groups.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/auth.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/connectors/__init__.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/connectors/mcp_source_presets.json +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/gitlab_gql.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/gitlab_response_models.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/instances.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/kg_ingest.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/main_agent.json +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_branches.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_commits.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_custom_api.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_deploy_tokens.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_environments.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_epics.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_graphql.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_graphql_ops.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_groups.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_issues.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_jobs.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_labels.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_members.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_merge_requests.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_merge_rules.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_milestones.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_misc.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_namespaces.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_notes.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_packages.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_pipeline_schedules.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_pipelines.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_projects.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_protected_branches.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_releases.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_runners.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_snippets.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_tags.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_users.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp/mcp_wiki.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/mcp_config.json +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/ontology/__init__.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/ontology/gitlab.ttl +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/prompts/__init__.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/prompts/devops_specialist.json +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/prompts/main_agent.json +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api/skills/__init__.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api.egg-info/dependency_links.txt +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api.egg-info/entry_points.txt +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/gitlab_api.egg-info/top_level.txt +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/requirements.txt +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/scripts/security_sanitizer.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/scripts/validate_a2a_agent.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/scripts/validate_agent.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/scripts/verify_api_integration.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/setup.cfg +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/__init__.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/conftest.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_action_discovery.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_api_wrapper.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_auth.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_concept_parity.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_gitlab_a2a_validation.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_gitlab_api_brute_force_coverage.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_gitlab_gql.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_gitlab_mcp_validation.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_gitlab_models.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_init_dynamics.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_instances.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_kg_ingest.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_mock_coverage.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_startup.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_tool_modes.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/test_verify_agent.py +0 -0
- {gitlab_api-26.1.0 → gitlab_api-26.2.0}/tests/verify_a2a_queries.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitlab-api
|
|
3
|
-
Version: 26.
|
|
3
|
+
Version: 26.2.0
|
|
4
4
|
Summary: GitLab API + MCP Server + A2A Server
|
|
5
5
|
Author-email: Audel Rouhi <knucklessg1@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -22,7 +22,7 @@ Requires-Dist: agent-utilities[agent,logfire]>=1.0.0; extra == "agent"
|
|
|
22
22
|
Provides-Extra: gql
|
|
23
23
|
Requires-Dist: gql[requests]>=4.0.0; extra == "gql"
|
|
24
24
|
Provides-Extra: all
|
|
25
|
-
Requires-Dist: gitlab-api[agent,gql,logfire,mcp]>=26.
|
|
25
|
+
Requires-Dist: gitlab-api[agent,gql,logfire,mcp]>=26.2.0; extra == "all"
|
|
26
26
|
Provides-Extra: test
|
|
27
27
|
Requires-Dist: pytest-xdist>=3.6.0; extra == "test"
|
|
28
28
|
Requires-Dist: pytest; extra == "test"
|
|
@@ -52,7 +52,7 @@ Dynamic: license-file
|
|
|
52
52
|

|
|
53
53
|

|
|
54
54
|
|
|
55
|
-
*Version: 26.
|
|
55
|
+
*Version: 26.2.0*
|
|
56
56
|
|
|
57
57
|
> **Documentation** — Installation, deployment, usage across the API, CLI, and MCP
|
|
58
58
|
> interfaces, the integrated A2A agent server, and guidance for provisioning the
|
|
@@ -137,12 +137,13 @@ _Auto-generated from the live MCP server — do not edit by hand._
|
|
|
137
137
|
| `gitlab_snippets` | `SNIPPETSTOOL` | Manage GitLab snippets. |
|
|
138
138
|
| `gitlab_tags` | `TAGSTOOL` | Manage gitlab tags operations. |
|
|
139
139
|
| `gitlab_users` | `USERSTOOL` | Manage gitlab users operations. |
|
|
140
|
+
| `gitlab_vulnerabilities` | `VULNERABILITIESTOOL` | Review a project's dependency list and security vulnerabilities (the GitLab counterpart to GitHub Dependabot). |
|
|
140
141
|
| `gitlab_wiki` | `WIKITOOL` | Manage gitlab wiki operations. |
|
|
141
142
|
|
|
142
143
|
#### Verbose 1:1 API-mapped tools (`MCP_TOOL_MODE=verbose` or `both`)
|
|
143
144
|
|
|
144
145
|
<details>
|
|
145
|
-
<summary>
|
|
146
|
+
<summary>196 per-operation tools — one per public API method (click to expand)</summary>
|
|
146
147
|
|
|
147
148
|
| MCP Tool | Toggle Env Var | Description |
|
|
148
149
|
|----------|----------------|-------------|
|
|
@@ -236,6 +237,7 @@ _Auto-generated from the live MCP server — do not edit by hand._
|
|
|
236
237
|
| `gitlab_get_group_releases` | `USERS_GROUPSTOOL` | Get information about releases in a group. |
|
|
237
238
|
| `gitlab_get_group_runners` | `PIPELINESTOOL` | Get information about runners in a group. |
|
|
238
239
|
| `gitlab_get_group_subgroups` | `USERS_GROUPSTOOL` | Get subgroups of a specific group. |
|
|
240
|
+
| `gitlab_get_group_vulnerabilities` | `VULNERABILITIESTOOL` | Get a group's security vulnerability findings (Ultimate). |
|
|
239
241
|
| `gitlab_get_groups` | `USERS_GROUPSTOOL` | Get a list of groups. |
|
|
240
242
|
| `gitlab_get_issue` | `ISSUESTOOL` | Get a single issue. |
|
|
241
243
|
| `gitlab_get_issues` | `ISSUESTOOL` | Get list of issues. Can filter by project_id. |
|
|
@@ -261,6 +263,7 @@ _Auto-generated from the live MCP server — do not edit by hand._
|
|
|
261
263
|
| `gitlab_get_pipelines_triggered_from_schedule` | `PIPELINESTOOL` | Get pipelines triggered from a specific pipeline schedule. |
|
|
262
264
|
| `gitlab_get_project` | `PROJECTSTOOL` | Get information about a specific project. |
|
|
263
265
|
| `gitlab_get_project_contributors` | `PROJECTSTOOL` | Get information about contributors to a project. |
|
|
266
|
+
| `gitlab_get_project_dependencies` | `VULNERABILITIESTOOL` | Get a project's Dependency List (all detected dependencies). |
|
|
264
267
|
| `gitlab_get_project_deploy_token` | `PROJECTSTOOL` | Get a specific deploy token for a project. |
|
|
265
268
|
| `gitlab_get_project_deploy_tokens` | `PROJECTSTOOL` | Get deploy tokens for a specific project. |
|
|
266
269
|
| `gitlab_get_project_groups` | `PROJECTSTOOL` | Get groups associated with a specific project. |
|
|
@@ -275,6 +278,7 @@ _Auto-generated from the live MCP server — do not edit by hand._
|
|
|
275
278
|
| `gitlab_get_project_merge_requests` | `PROJECTSTOOL` | Get merge requests for a specific project. |
|
|
276
279
|
| `gitlab_get_project_runners` | `PROJECTSTOOL` | Get information about runners in a project. |
|
|
277
280
|
| `gitlab_get_project_statistics` | `PROJECTSTOOL` | Get statistics for a specific project. |
|
|
281
|
+
| `gitlab_get_project_vulnerabilities` | `VULNERABILITIESTOOL` | Get a project's security vulnerabilities (Ultimate). |
|
|
278
282
|
| `gitlab_get_projects` | `PROJECTSTOOL` | Get information about projects. |
|
|
279
283
|
| `gitlab_get_protected_branch` | `REPOSITORIESTOOL` | Get information about a specific protected branch in a project. |
|
|
280
284
|
| `gitlab_get_protected_branches` | `REPOSITORIESTOOL` | Get information about protected branches in a project. |
|
|
@@ -294,6 +298,7 @@ _Auto-generated from the live MCP server — do not edit by hand._
|
|
|
294
298
|
| `gitlab_get_tags` | `REPOSITORIESTOOL` | Get information about tags in a project. |
|
|
295
299
|
| `gitlab_get_user` | `USERS_GROUPSTOOL` | Get information about a specific user. |
|
|
296
300
|
| `gitlab_get_users` | `USERS_GROUPSTOOL` | Get information about users. |
|
|
301
|
+
| `gitlab_get_vulnerability` | `VULNERABILITIESTOOL` | Get a single vulnerability by its global ID (Ultimate). |
|
|
297
302
|
| `gitlab_get_wiki_list` | `OTHERTOOL` | Get a list of wiki pages for a project. |
|
|
298
303
|
| `gitlab_get_wiki_page` | `OTHERTOOL` | Get information about a specific wiki page. |
|
|
299
304
|
| `gitlab_merge_request_level_approvals` | `MERGE_REQUESTSTOOL` | Get approvals for a specific merge request. |
|
|
@@ -341,7 +346,7 @@ _Auto-generated from the live MCP server — do not edit by hand._
|
|
|
341
346
|
|
|
342
347
|
</details>
|
|
343
348
|
|
|
344
|
-
|
|
349
|
+
_33 action-routed tool(s) (default) · 196 verbose 1:1 tool(s). Each is enabled unless its `<DOMAIN>TOOL` toggle is set false; `MCP_TOOL_MODE` selects the surface (`condensed` default · `verbose` 1:1 · `both`). Auto-generated — do not edit._
|
|
345
350
|
<!-- MCP-TOOLS-TABLE:END -->
|
|
346
351
|
|
|
347
352
|
Detailed tool schemas, parameter shapes, and validation constraints are preserved in [docs/mcp.md](docs/mcp.md).
|
|
@@ -422,6 +427,7 @@ When query strings or parameters are supplied, an LLM-free **Knowledge Graph res
|
|
|
422
427
|
"SNIPPETSTOOL": "True",
|
|
423
428
|
"TAGSTOOL": "True",
|
|
424
429
|
"USERSTOOL": "True",
|
|
430
|
+
"VULNERABILITIESTOOL": "True",
|
|
425
431
|
"WIKITOOL": "True"
|
|
426
432
|
}
|
|
427
433
|
}
|
|
@@ -481,6 +487,7 @@ When query strings or parameters are supplied, an LLM-free **Knowledge Graph res
|
|
|
481
487
|
"SNIPPETSTOOL": "True",
|
|
482
488
|
"TAGSTOOL": "True",
|
|
483
489
|
"USERSTOOL": "True",
|
|
490
|
+
"VULNERABILITIESTOOL": "True",
|
|
484
491
|
"WIKITOOL": "True"
|
|
485
492
|
}
|
|
486
493
|
}
|
|
@@ -541,6 +548,7 @@ docker run -d \
|
|
|
541
548
|
-e SNIPPETSTOOL=True \
|
|
542
549
|
-e TAGSTOOL=True \
|
|
543
550
|
-e USERSTOOL=True \
|
|
551
|
+
-e VULNERABILITIESTOOL=True \
|
|
544
552
|
-e WIKITOOL=True \
|
|
545
553
|
knucklessg1/gitlab-api:mcp
|
|
546
554
|
```
|
|
@@ -613,6 +621,7 @@ consumed from a **remote deployment**. The
|
|
|
613
621
|
| `SNIPPETSTOOL` | `True` | |
|
|
614
622
|
| `TAGSTOOL` | `True` | |
|
|
615
623
|
| `USERSTOOL` | `True` | |
|
|
624
|
+
| `VULNERABILITIESTOOL` | `True` | |
|
|
616
625
|
| `WIKITOOL` | `True` | |
|
|
617
626
|
| `CUSTOM_APITOOL` | `True` | |
|
|
618
627
|
| `GRAPHQLTOOL` | `True` | |
|
|
@@ -637,7 +646,7 @@ consumed from a **remote deployment**. The
|
|
|
637
646
|
| `MODEL_ID` | `gpt-4o` | Model id for the agent |
|
|
638
647
|
| `ENABLE_WEB_UI` | `True` | Serve the AG-UI web interface |
|
|
639
648
|
|
|
640
|
-
|
|
649
|
+
_45 package + 14 inherited variable(s). Auto-generated from `.env.example` + the shared agent-utilities set — do not edit._
|
|
641
650
|
<!-- ENV-VARS-TABLE:END -->
|
|
642
651
|
|
|
643
652
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|

|
|
21
21
|

|
|
22
22
|
|
|
23
|
-
*Version: 26.
|
|
23
|
+
*Version: 26.2.0*
|
|
24
24
|
|
|
25
25
|
> **Documentation** — Installation, deployment, usage across the API, CLI, and MCP
|
|
26
26
|
> interfaces, the integrated A2A agent server, and guidance for provisioning the
|
|
@@ -105,12 +105,13 @@ _Auto-generated from the live MCP server — do not edit by hand._
|
|
|
105
105
|
| `gitlab_snippets` | `SNIPPETSTOOL` | Manage GitLab snippets. |
|
|
106
106
|
| `gitlab_tags` | `TAGSTOOL` | Manage gitlab tags operations. |
|
|
107
107
|
| `gitlab_users` | `USERSTOOL` | Manage gitlab users operations. |
|
|
108
|
+
| `gitlab_vulnerabilities` | `VULNERABILITIESTOOL` | Review a project's dependency list and security vulnerabilities (the GitLab counterpart to GitHub Dependabot). |
|
|
108
109
|
| `gitlab_wiki` | `WIKITOOL` | Manage gitlab wiki operations. |
|
|
109
110
|
|
|
110
111
|
#### Verbose 1:1 API-mapped tools (`MCP_TOOL_MODE=verbose` or `both`)
|
|
111
112
|
|
|
112
113
|
<details>
|
|
113
|
-
<summary>
|
|
114
|
+
<summary>196 per-operation tools — one per public API method (click to expand)</summary>
|
|
114
115
|
|
|
115
116
|
| MCP Tool | Toggle Env Var | Description |
|
|
116
117
|
|----------|----------------|-------------|
|
|
@@ -204,6 +205,7 @@ _Auto-generated from the live MCP server — do not edit by hand._
|
|
|
204
205
|
| `gitlab_get_group_releases` | `USERS_GROUPSTOOL` | Get information about releases in a group. |
|
|
205
206
|
| `gitlab_get_group_runners` | `PIPELINESTOOL` | Get information about runners in a group. |
|
|
206
207
|
| `gitlab_get_group_subgroups` | `USERS_GROUPSTOOL` | Get subgroups of a specific group. |
|
|
208
|
+
| `gitlab_get_group_vulnerabilities` | `VULNERABILITIESTOOL` | Get a group's security vulnerability findings (Ultimate). |
|
|
207
209
|
| `gitlab_get_groups` | `USERS_GROUPSTOOL` | Get a list of groups. |
|
|
208
210
|
| `gitlab_get_issue` | `ISSUESTOOL` | Get a single issue. |
|
|
209
211
|
| `gitlab_get_issues` | `ISSUESTOOL` | Get list of issues. Can filter by project_id. |
|
|
@@ -229,6 +231,7 @@ _Auto-generated from the live MCP server — do not edit by hand._
|
|
|
229
231
|
| `gitlab_get_pipelines_triggered_from_schedule` | `PIPELINESTOOL` | Get pipelines triggered from a specific pipeline schedule. |
|
|
230
232
|
| `gitlab_get_project` | `PROJECTSTOOL` | Get information about a specific project. |
|
|
231
233
|
| `gitlab_get_project_contributors` | `PROJECTSTOOL` | Get information about contributors to a project. |
|
|
234
|
+
| `gitlab_get_project_dependencies` | `VULNERABILITIESTOOL` | Get a project's Dependency List (all detected dependencies). |
|
|
232
235
|
| `gitlab_get_project_deploy_token` | `PROJECTSTOOL` | Get a specific deploy token for a project. |
|
|
233
236
|
| `gitlab_get_project_deploy_tokens` | `PROJECTSTOOL` | Get deploy tokens for a specific project. |
|
|
234
237
|
| `gitlab_get_project_groups` | `PROJECTSTOOL` | Get groups associated with a specific project. |
|
|
@@ -243,6 +246,7 @@ _Auto-generated from the live MCP server — do not edit by hand._
|
|
|
243
246
|
| `gitlab_get_project_merge_requests` | `PROJECTSTOOL` | Get merge requests for a specific project. |
|
|
244
247
|
| `gitlab_get_project_runners` | `PROJECTSTOOL` | Get information about runners in a project. |
|
|
245
248
|
| `gitlab_get_project_statistics` | `PROJECTSTOOL` | Get statistics for a specific project. |
|
|
249
|
+
| `gitlab_get_project_vulnerabilities` | `VULNERABILITIESTOOL` | Get a project's security vulnerabilities (Ultimate). |
|
|
246
250
|
| `gitlab_get_projects` | `PROJECTSTOOL` | Get information about projects. |
|
|
247
251
|
| `gitlab_get_protected_branch` | `REPOSITORIESTOOL` | Get information about a specific protected branch in a project. |
|
|
248
252
|
| `gitlab_get_protected_branches` | `REPOSITORIESTOOL` | Get information about protected branches in a project. |
|
|
@@ -262,6 +266,7 @@ _Auto-generated from the live MCP server — do not edit by hand._
|
|
|
262
266
|
| `gitlab_get_tags` | `REPOSITORIESTOOL` | Get information about tags in a project. |
|
|
263
267
|
| `gitlab_get_user` | `USERS_GROUPSTOOL` | Get information about a specific user. |
|
|
264
268
|
| `gitlab_get_users` | `USERS_GROUPSTOOL` | Get information about users. |
|
|
269
|
+
| `gitlab_get_vulnerability` | `VULNERABILITIESTOOL` | Get a single vulnerability by its global ID (Ultimate). |
|
|
265
270
|
| `gitlab_get_wiki_list` | `OTHERTOOL` | Get a list of wiki pages for a project. |
|
|
266
271
|
| `gitlab_get_wiki_page` | `OTHERTOOL` | Get information about a specific wiki page. |
|
|
267
272
|
| `gitlab_merge_request_level_approvals` | `MERGE_REQUESTSTOOL` | Get approvals for a specific merge request. |
|
|
@@ -309,7 +314,7 @@ _Auto-generated from the live MCP server — do not edit by hand._
|
|
|
309
314
|
|
|
310
315
|
</details>
|
|
311
316
|
|
|
312
|
-
|
|
317
|
+
_33 action-routed tool(s) (default) · 196 verbose 1:1 tool(s). Each is enabled unless its `<DOMAIN>TOOL` toggle is set false; `MCP_TOOL_MODE` selects the surface (`condensed` default · `verbose` 1:1 · `both`). Auto-generated — do not edit._
|
|
313
318
|
<!-- MCP-TOOLS-TABLE:END -->
|
|
314
319
|
|
|
315
320
|
Detailed tool schemas, parameter shapes, and validation constraints are preserved in [docs/mcp.md](docs/mcp.md).
|
|
@@ -390,6 +395,7 @@ When query strings or parameters are supplied, an LLM-free **Knowledge Graph res
|
|
|
390
395
|
"SNIPPETSTOOL": "True",
|
|
391
396
|
"TAGSTOOL": "True",
|
|
392
397
|
"USERSTOOL": "True",
|
|
398
|
+
"VULNERABILITIESTOOL": "True",
|
|
393
399
|
"WIKITOOL": "True"
|
|
394
400
|
}
|
|
395
401
|
}
|
|
@@ -449,6 +455,7 @@ When query strings or parameters are supplied, an LLM-free **Knowledge Graph res
|
|
|
449
455
|
"SNIPPETSTOOL": "True",
|
|
450
456
|
"TAGSTOOL": "True",
|
|
451
457
|
"USERSTOOL": "True",
|
|
458
|
+
"VULNERABILITIESTOOL": "True",
|
|
452
459
|
"WIKITOOL": "True"
|
|
453
460
|
}
|
|
454
461
|
}
|
|
@@ -509,6 +516,7 @@ docker run -d \
|
|
|
509
516
|
-e SNIPPETSTOOL=True \
|
|
510
517
|
-e TAGSTOOL=True \
|
|
511
518
|
-e USERSTOOL=True \
|
|
519
|
+
-e VULNERABILITIESTOOL=True \
|
|
512
520
|
-e WIKITOOL=True \
|
|
513
521
|
knucklessg1/gitlab-api:mcp
|
|
514
522
|
```
|
|
@@ -581,6 +589,7 @@ consumed from a **remote deployment**. The
|
|
|
581
589
|
| `SNIPPETSTOOL` | `True` | |
|
|
582
590
|
| `TAGSTOOL` | `True` | |
|
|
583
591
|
| `USERSTOOL` | `True` | |
|
|
592
|
+
| `VULNERABILITIESTOOL` | `True` | |
|
|
584
593
|
| `WIKITOOL` | `True` | |
|
|
585
594
|
| `CUSTOM_APITOOL` | `True` | |
|
|
586
595
|
| `GRAPHQLTOOL` | `True` | |
|
|
@@ -605,7 +614,7 @@ consumed from a **remote deployment**. The
|
|
|
605
614
|
| `MODEL_ID` | `gpt-4o` | Model id for the agent |
|
|
606
615
|
| `ENABLE_WEB_UI` | `True` | Serve the AG-UI web interface |
|
|
607
616
|
|
|
608
|
-
|
|
617
|
+
_45 package + 14 inherited variable(s). Auto-generated from `.env.example` + the shared agent-utilities set — do not edit._
|
|
609
618
|
<!-- ENV-VARS-TABLE:END -->
|
|
610
619
|
|
|
611
620
|
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
#!/usr/bin/python
|
|
2
|
+
|
|
3
|
+
from typing import TypeVar
|
|
4
|
+
|
|
5
|
+
import requests
|
|
6
|
+
from agent_utilities.base_utilities import get_logger
|
|
7
|
+
from pydantic import ValidationError
|
|
8
|
+
|
|
9
|
+
logger = get_logger(__name__)
|
|
10
|
+
|
|
11
|
+
from agent_utilities.core.exceptions import (
|
|
12
|
+
MissingParameterError,
|
|
13
|
+
ParameterError,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
from gitlab_api.gitlab_input_models import (
|
|
17
|
+
VulnerabilityModel,
|
|
18
|
+
)
|
|
19
|
+
from gitlab_api.gitlab_response_models import (
|
|
20
|
+
Response,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
T = TypeVar("T")
|
|
24
|
+
|
|
25
|
+
from gitlab_api.api.api_client_base import GitLabApiBase
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class GitLabApiVulnerabilities(GitLabApiBase):
|
|
29
|
+
"""Dependency list + security vulnerability surface — the GitLab counterpart
|
|
30
|
+
to GitHub's Dependabot (Dependency List, Vulnerabilities, and findings APIs)."""
|
|
31
|
+
|
|
32
|
+
def get_project_dependencies(self, **kwargs) -> Response:
|
|
33
|
+
"""
|
|
34
|
+
Get a project's Dependency List (all detected dependencies).
|
|
35
|
+
|
|
36
|
+
GET /projects/{project_id}/dependencies
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
**kwargs: project_id (required); optional package_manager filter and
|
|
40
|
+
pagination (page, per_page, max_pages).
|
|
41
|
+
|
|
42
|
+
Returns:
|
|
43
|
+
Response: wrapper containing the original response and the parsed
|
|
44
|
+
dependency list (list of dicts).
|
|
45
|
+
|
|
46
|
+
Raises:
|
|
47
|
+
MissingParameterError: If project_id is missing.
|
|
48
|
+
ParameterError: If invalid parameters are provided.
|
|
49
|
+
"""
|
|
50
|
+
vulnerability = VulnerabilityModel(**kwargs)
|
|
51
|
+
if vulnerability.project_id is None:
|
|
52
|
+
raise MissingParameterError("project_id is required")
|
|
53
|
+
try:
|
|
54
|
+
response, data = self._fetch_all_pages(
|
|
55
|
+
endpoint=f"/projects/{vulnerability.project_id}/dependencies",
|
|
56
|
+
model=vulnerability,
|
|
57
|
+
id_field="project_id",
|
|
58
|
+
id_value=vulnerability.project_id,
|
|
59
|
+
)
|
|
60
|
+
return Response(response=response, data=data)
|
|
61
|
+
except ValidationError as e:
|
|
62
|
+
raise ParameterError(f"Invalid parameters: {e.errors()}") from e
|
|
63
|
+
except requests.RequestException as e:
|
|
64
|
+
raise ParameterError(f"Failed to get project dependencies: {str(e)}") from e
|
|
65
|
+
|
|
66
|
+
def get_project_vulnerabilities(self, **kwargs) -> Response:
|
|
67
|
+
"""
|
|
68
|
+
Get a project's security vulnerabilities (Ultimate).
|
|
69
|
+
|
|
70
|
+
GET /projects/{project_id}/vulnerabilities
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
**kwargs: project_id (required); optional pagination.
|
|
74
|
+
|
|
75
|
+
Returns:
|
|
76
|
+
Response: wrapper containing the original response and the parsed
|
|
77
|
+
vulnerabilities (list of dicts).
|
|
78
|
+
|
|
79
|
+
Raises:
|
|
80
|
+
MissingParameterError: If project_id is missing.
|
|
81
|
+
ParameterError: If invalid parameters are provided.
|
|
82
|
+
"""
|
|
83
|
+
vulnerability = VulnerabilityModel(**kwargs)
|
|
84
|
+
if vulnerability.project_id is None:
|
|
85
|
+
raise MissingParameterError("project_id is required")
|
|
86
|
+
try:
|
|
87
|
+
response, data = self._fetch_all_pages(
|
|
88
|
+
endpoint=f"/projects/{vulnerability.project_id}/vulnerabilities",
|
|
89
|
+
model=vulnerability,
|
|
90
|
+
id_field="project_id",
|
|
91
|
+
id_value=vulnerability.project_id,
|
|
92
|
+
)
|
|
93
|
+
return Response(response=response, data=data)
|
|
94
|
+
except ValidationError as e:
|
|
95
|
+
raise ParameterError(f"Invalid parameters: {e.errors()}") from e
|
|
96
|
+
except requests.RequestException as e:
|
|
97
|
+
raise ParameterError(
|
|
98
|
+
f"Failed to get project vulnerabilities: {str(e)}"
|
|
99
|
+
) from e
|
|
100
|
+
|
|
101
|
+
def get_group_vulnerabilities(self, **kwargs) -> Response:
|
|
102
|
+
"""
|
|
103
|
+
Get a group's security vulnerability findings (Ultimate).
|
|
104
|
+
|
|
105
|
+
GET /groups/{group_id}/vulnerability_findings
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
**kwargs: group_id (required); optional pagination.
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
Response: wrapper containing the original response and the parsed
|
|
112
|
+
vulnerability findings (list of dicts).
|
|
113
|
+
|
|
114
|
+
Raises:
|
|
115
|
+
MissingParameterError: If group_id is missing.
|
|
116
|
+
ParameterError: If invalid parameters are provided.
|
|
117
|
+
"""
|
|
118
|
+
vulnerability = VulnerabilityModel(**kwargs)
|
|
119
|
+
if vulnerability.group_id is None:
|
|
120
|
+
raise MissingParameterError("group_id is required")
|
|
121
|
+
try:
|
|
122
|
+
response, data = self._fetch_all_pages(
|
|
123
|
+
endpoint=f"/groups/{vulnerability.group_id}/vulnerability_findings",
|
|
124
|
+
model=vulnerability,
|
|
125
|
+
id_field="group_id",
|
|
126
|
+
id_value=vulnerability.group_id,
|
|
127
|
+
)
|
|
128
|
+
return Response(response=response, data=data)
|
|
129
|
+
except ValidationError as e:
|
|
130
|
+
raise ParameterError(f"Invalid parameters: {e.errors()}") from e
|
|
131
|
+
except requests.RequestException as e:
|
|
132
|
+
raise ParameterError(
|
|
133
|
+
f"Failed to get group vulnerabilities: {str(e)}"
|
|
134
|
+
) from e
|
|
135
|
+
|
|
136
|
+
def get_vulnerability(self, **kwargs) -> Response:
|
|
137
|
+
"""
|
|
138
|
+
Get a single vulnerability by its global ID (Ultimate).
|
|
139
|
+
|
|
140
|
+
GET /vulnerabilities/{vulnerability_id}
|
|
141
|
+
|
|
142
|
+
Args:
|
|
143
|
+
**kwargs: vulnerability_id (required).
|
|
144
|
+
|
|
145
|
+
Returns:
|
|
146
|
+
Response: wrapper containing the original response and the parsed
|
|
147
|
+
vulnerability (dict).
|
|
148
|
+
|
|
149
|
+
Raises:
|
|
150
|
+
MissingParameterError: If vulnerability_id is missing.
|
|
151
|
+
ParameterError: If invalid parameters are provided.
|
|
152
|
+
"""
|
|
153
|
+
vulnerability = VulnerabilityModel(**kwargs)
|
|
154
|
+
if vulnerability.vulnerability_id is None:
|
|
155
|
+
raise MissingParameterError("vulnerability_id is required")
|
|
156
|
+
try:
|
|
157
|
+
response = self._session.get(
|
|
158
|
+
url=f"{self.url}/vulnerabilities/{vulnerability.vulnerability_id}",
|
|
159
|
+
headers=self.headers,
|
|
160
|
+
verify=self.verify,
|
|
161
|
+
proxies=self.proxies,
|
|
162
|
+
)
|
|
163
|
+
response.raise_for_status()
|
|
164
|
+
return Response(response=response, data=response.json())
|
|
165
|
+
except ValidationError as e:
|
|
166
|
+
raise ParameterError(f"Invalid parameters: {e.errors()}") from e
|
|
167
|
+
except requests.RequestException as e:
|
|
168
|
+
raise ParameterError(f"Failed to get vulnerability: {str(e)}") from e
|
|
@@ -18,6 +18,7 @@ from gitlab_api.api.api_client_projects import GitLabApiProjects
|
|
|
18
18
|
from gitlab_api.api.api_client_repositories import GitLabApiRepositories
|
|
19
19
|
from gitlab_api.api.api_client_system import GitLabApiSystem
|
|
20
20
|
from gitlab_api.api.api_client_users_groups import GitLabApiUsersGroups
|
|
21
|
+
from gitlab_api.api.api_client_vulnerabilities import GitLabApiVulnerabilities
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
class Api(
|
|
@@ -29,6 +30,7 @@ class Api(
|
|
|
29
30
|
GitLabApiPipelines,
|
|
30
31
|
GitLabApiUsersGroups,
|
|
31
32
|
GitLabApiEnvironments,
|
|
33
|
+
GitLabApiVulnerabilities,
|
|
32
34
|
GitLabApiOther,
|
|
33
35
|
):
|
|
34
36
|
__slots__ = ()
|
|
@@ -3442,6 +3442,69 @@ class NoteModel(BaseModel):
|
|
|
3442
3442
|
return values
|
|
3443
3443
|
|
|
3444
3444
|
|
|
3445
|
+
class VulnerabilityModel(BaseModel):
|
|
3446
|
+
"""
|
|
3447
|
+
Pydantic model for the dependency list / security vulnerability surface
|
|
3448
|
+
(the GitLab counterpart to GitHub Dependabot).
|
|
3449
|
+
|
|
3450
|
+
Attributes:
|
|
3451
|
+
- project_id (int | str): Project ID or full path (dependencies / project vulnerabilities).
|
|
3452
|
+
- group_id (int | str): Group ID or full path (group vulnerability findings).
|
|
3453
|
+
- vulnerability_id (int | str): ID of a single vulnerability (global endpoint).
|
|
3454
|
+
- package_manager (str): Optional Dependency List filter (e.g. 'bundler', 'npm').
|
|
3455
|
+
"""
|
|
3456
|
+
|
|
3457
|
+
project_id: int | str | None = Field(
|
|
3458
|
+
default=None, description="Project ID or full path"
|
|
3459
|
+
)
|
|
3460
|
+
group_id: int | str | None = Field(
|
|
3461
|
+
default=None, description="Group ID or full path"
|
|
3462
|
+
)
|
|
3463
|
+
vulnerability_id: int | str | None = Field(
|
|
3464
|
+
default=None, description="ID of a single vulnerability"
|
|
3465
|
+
)
|
|
3466
|
+
package_manager: str | None = Field(
|
|
3467
|
+
default=None,
|
|
3468
|
+
description="Dependency List filter by package manager (e.g. 'npm', 'bundler')",
|
|
3469
|
+
)
|
|
3470
|
+
max_pages: int | None = Field(description="Maximum pages to return", default=None)
|
|
3471
|
+
per_page: int | None = Field(description="Results per page", default=None)
|
|
3472
|
+
page: int | None = Field(description="Pagination page", default=None)
|
|
3473
|
+
api_parameters: dict | None = Field(description="API Parameters", default=None)
|
|
3474
|
+
data: dict | None = Field(description="Data Payload", default=None)
|
|
3475
|
+
|
|
3476
|
+
def model_post_init(self, _context):
|
|
3477
|
+
self.api_parameters = {}
|
|
3478
|
+
if self.package_manager:
|
|
3479
|
+
self.api_parameters["package_manager"] = self.package_manager
|
|
3480
|
+
if self.page:
|
|
3481
|
+
self.api_parameters["page"] = self.page
|
|
3482
|
+
if self.per_page:
|
|
3483
|
+
self.api_parameters["per_page"] = self.per_page
|
|
3484
|
+
|
|
3485
|
+
@field_validator("project_id")
|
|
3486
|
+
def validate_project_id(cls, v):
|
|
3487
|
+
if v is None:
|
|
3488
|
+
return v
|
|
3489
|
+
if not str(v).strip():
|
|
3490
|
+
raise ValueError("Project ID or path cannot be empty")
|
|
3491
|
+
return str(v).strip("'\"")
|
|
3492
|
+
|
|
3493
|
+
@field_validator("group_id")
|
|
3494
|
+
def validate_group_id(cls, v):
|
|
3495
|
+
if v is None:
|
|
3496
|
+
return v
|
|
3497
|
+
if not str(v).strip():
|
|
3498
|
+
raise ValueError("Group ID or path cannot be empty")
|
|
3499
|
+
return str(v).strip("'\"")
|
|
3500
|
+
|
|
3501
|
+
@field_validator("vulnerability_id")
|
|
3502
|
+
def validate_vulnerability_id(cls, v):
|
|
3503
|
+
if v is None:
|
|
3504
|
+
return v
|
|
3505
|
+
return str(v).strip("'\"")
|
|
3506
|
+
|
|
3507
|
+
|
|
3445
3508
|
class EpicModel(BaseModel):
|
|
3446
3509
|
group_id: int | str | None = Field(
|
|
3447
3510
|
default=None, description="Group ID or full path"
|
|
@@ -33,6 +33,7 @@ from gitlab_api.mcp.mcp_runners import register_runners_tools
|
|
|
33
33
|
from gitlab_api.mcp.mcp_snippets import register_snippets_tools
|
|
34
34
|
from gitlab_api.mcp.mcp_tags import register_tags_tools
|
|
35
35
|
from gitlab_api.mcp.mcp_users import register_users_tools
|
|
36
|
+
from gitlab_api.mcp.mcp_vulnerabilities import register_vulnerabilities_tools
|
|
36
37
|
from gitlab_api.mcp.mcp_wiki import register_wiki_tools
|
|
37
38
|
|
|
38
39
|
__all__ = [
|
|
@@ -65,5 +66,6 @@ __all__ = [
|
|
|
65
66
|
"register_snippets_tools",
|
|
66
67
|
"register_tags_tools",
|
|
67
68
|
"register_users_tools",
|
|
69
|
+
"register_vulnerabilities_tools",
|
|
68
70
|
"register_wiki_tools",
|
|
69
71
|
]
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""MCP tools for vulnerabilities operations.
|
|
2
|
+
|
|
3
|
+
Auto-generated from mcp_server.py during ecosystem standardization.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
from agent_utilities.mcp_utilities import resolve_action, run_blocking
|
|
9
|
+
from fastmcp import Context, FastMCP
|
|
10
|
+
from fastmcp.dependencies import Depends
|
|
11
|
+
from pydantic import Field
|
|
12
|
+
|
|
13
|
+
from gitlab_api.auth import get_client
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def register_vulnerabilities_tools(mcp: FastMCP):
|
|
17
|
+
@mcp.tool(tags={"vulnerabilities"})
|
|
18
|
+
async def gitlab_vulnerabilities(
|
|
19
|
+
action: str = Field(
|
|
20
|
+
description="Action to perform. Must be one of: 'dependencies', 'get_project', 'get_group', 'get'"
|
|
21
|
+
),
|
|
22
|
+
params_json: str = Field(
|
|
23
|
+
default="{}", description="JSON string of parameters to pass to the action."
|
|
24
|
+
),
|
|
25
|
+
client=Depends(get_client),
|
|
26
|
+
ctx: Context | None = Field(
|
|
27
|
+
default=None, description="MCP context for progress reporting"
|
|
28
|
+
),
|
|
29
|
+
) -> Any:
|
|
30
|
+
"""Review a project's dependency list and security vulnerabilities (the GitLab counterpart to GitHub Dependabot)."""
|
|
31
|
+
if ctx:
|
|
32
|
+
await ctx.info("Executing tool...")
|
|
33
|
+
import json
|
|
34
|
+
|
|
35
|
+
try:
|
|
36
|
+
kwargs = json.loads(params_json)
|
|
37
|
+
except Exception as e:
|
|
38
|
+
return {"error": f"Invalid params_json: {e}"}
|
|
39
|
+
|
|
40
|
+
kwargs = {k: v for k, v in kwargs.items() if v is not None}
|
|
41
|
+
|
|
42
|
+
resolved = resolve_action(
|
|
43
|
+
action,
|
|
44
|
+
{"dependencies", "get_project", "get_group", "get"},
|
|
45
|
+
service="gitlab-api",
|
|
46
|
+
)
|
|
47
|
+
if isinstance(resolved, dict):
|
|
48
|
+
return resolved
|
|
49
|
+
action = resolved
|
|
50
|
+
|
|
51
|
+
if action == "dependencies":
|
|
52
|
+
return await run_blocking(client.get_project_dependencies, **kwargs)
|
|
53
|
+
if action == "get_project":
|
|
54
|
+
return await run_blocking(client.get_project_vulnerabilities, **kwargs)
|
|
55
|
+
if action == "get_group":
|
|
56
|
+
return await run_blocking(client.get_group_vulnerabilities, **kwargs)
|
|
57
|
+
if action == "get":
|
|
58
|
+
return await run_blocking(client.get_vulnerability, **kwargs)
|
|
59
|
+
raise ValueError(f"Unknown action: {action}")
|
|
@@ -37,7 +37,7 @@ from agent_utilities.mcp_utilities import (
|
|
|
37
37
|
from gitlab_api.api_client import Api
|
|
38
38
|
from gitlab_api.auth import get_client
|
|
39
39
|
|
|
40
|
-
__version__ = "26.
|
|
40
|
+
__version__ = "26.2.0"
|
|
41
41
|
print(f"Gitlab MCP v{__version__}", file=sys.stderr)
|
|
42
42
|
|
|
43
43
|
logger = get_logger(name="mcp_server")
|
|
@@ -1641,6 +1641,52 @@ def register_namespaces_tools(mcp: FastMCP):
|
|
|
1641
1641
|
raise ValueError(f"Unknown action: {action}")
|
|
1642
1642
|
|
|
1643
1643
|
|
|
1644
|
+
def register_vulnerabilities_tools(mcp: FastMCP):
|
|
1645
|
+
@mcp.tool(tags={"vulnerabilities"})
|
|
1646
|
+
async def gitlab_vulnerabilities(
|
|
1647
|
+
action: str = Field(
|
|
1648
|
+
description="Action to perform. Must be one of: 'dependencies', 'get_project', 'get_group', 'get'"
|
|
1649
|
+
),
|
|
1650
|
+
params_json: str = Field(
|
|
1651
|
+
default="{}", description="JSON string of parameters to pass to the action."
|
|
1652
|
+
),
|
|
1653
|
+
client=Depends(get_client),
|
|
1654
|
+
ctx: Context | None = Field(
|
|
1655
|
+
default=None, description="MCP context for progress reporting"
|
|
1656
|
+
),
|
|
1657
|
+
) -> Any:
|
|
1658
|
+
"""Review a project's dependency list and security vulnerabilities (the GitLab counterpart to GitHub Dependabot)."""
|
|
1659
|
+
if ctx:
|
|
1660
|
+
await ctx.info("Executing tool...")
|
|
1661
|
+
import json
|
|
1662
|
+
|
|
1663
|
+
try:
|
|
1664
|
+
kwargs = json.loads(params_json)
|
|
1665
|
+
except Exception as e:
|
|
1666
|
+
return {"error": f"Invalid params_json: {e}"}
|
|
1667
|
+
|
|
1668
|
+
kwargs = {k: v for k, v in kwargs.items() if v is not None}
|
|
1669
|
+
|
|
1670
|
+
resolved = resolve_action(
|
|
1671
|
+
action,
|
|
1672
|
+
{"dependencies", "get_project", "get_group", "get"},
|
|
1673
|
+
service="gitlab-api",
|
|
1674
|
+
)
|
|
1675
|
+
if isinstance(resolved, dict):
|
|
1676
|
+
return resolved
|
|
1677
|
+
action = resolved
|
|
1678
|
+
|
|
1679
|
+
if action == "dependencies":
|
|
1680
|
+
return await run_blocking(client.get_project_dependencies, **kwargs)
|
|
1681
|
+
if action == "get_project":
|
|
1682
|
+
return await run_blocking(client.get_project_vulnerabilities, **kwargs)
|
|
1683
|
+
if action == "get_group":
|
|
1684
|
+
return await run_blocking(client.get_group_vulnerabilities, **kwargs)
|
|
1685
|
+
if action == "get":
|
|
1686
|
+
return await run_blocking(client.get_vulnerability, **kwargs)
|
|
1687
|
+
raise ValueError(f"Unknown action: {action}")
|
|
1688
|
+
|
|
1689
|
+
|
|
1644
1690
|
def register_prompts(mcp: FastMCP):
|
|
1645
1691
|
@mcp.prompt
|
|
1646
1692
|
def create_branch_prompt(
|