GitLab MCP server code security tools
- Tier: Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
To provide feedback on this feature, leave a comment on issue 630189.
These tools are part of the code_security toolset.
Use them to list, read, and update vulnerabilities, and attach security scan profiles to projects and groups.
For a list of all tools, see GitLab MCP server tools.
list_vulnerabilities
Lists security vulnerabilities in a GitLab project, with optional filters and cursor pagination.
Returns paginated vulnerability metadata. To get full details for a single vulnerability,
use get_vulnerability.
Requires the security dashboard feature to be enabled.
This tool is listed only when the licensed feature is available for you. For more information, see select tool groups.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_full_path | string | Yes | Full path of the project (for example, namespace/project or group/subgroup/project). |
severity | array of strings | No | Filter by severity level. Omit to include vulnerabilities of any severity. One or more of CRITICAL, HIGH, MEDIUM, LOW, INFO, or UNKNOWN. |
report_type | array of strings | No | Filter by security report type. Omit to include all report types. For example, SAST, DAST, or DEPENDENCY_SCANNING. |
state | array of strings | No | Filter by vulnerability state. Omit to include vulnerabilities in any state. One or more of CONFIRMED, DETECTED, DISMISSED, or RESOLVED. |
first | integer | No | Number of vulnerabilities to return for forward pagination. Default is 20, maximum is 100. |
after | string | No | Cursor for forward pagination. Use pageInfo.endCursor from a previous response. |
Example:
List critical and high severity vulnerabilities in project gitlab-org/gitlabget_vulnerability
Returns comprehensive details for a single vulnerability, including title, state, description, severity, identifiers, and the context behind its state (dismissal reason, state comment, and the users who confirmed or dismissed it).
This tool is listed only when the licensed feature is available for you. For more information, see select tool groups.
With a fine-grained personal access token, these nested objects need their own permission:
project: the Project resource and the Read permission.confirmedByanddismissedBy: the User resource and the Read permission.
Without these permissions, the tool still succeeds but returns null for those fields.
| Parameter | Type | Required | Description |
|---|---|---|---|
vulnerability_id | string | Yes | Numeric ID of the vulnerability (for example, 567). |
Example:
Get full details for vulnerability 567save_vulnerability
Performs write operations on a vulnerability in a GitLab project.
This tool is listed only when the licensed feature is available for you. For more information, see select tool groups.
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Operation to perform. One of dismiss, confirm, revert_to_detected, update_severity, or create_issue. |
vulnerability_id | string | Yes | Numeric ID of the vulnerability (for example, 567). |
comment | string | No | Explanation for the action. Required when action is update_severity. |
dismissal_reason | string | No | Reason for dismissal. One of ACCEPTABLE_RISK, FALSE_POSITIVE, MITIGATING_CONTROL, USED_IN_TESTS, or NOT_APPLICABLE. Use only when action is dismiss. |
severity | string | No | New severity level. One of INFO, UNKNOWN, LOW, MEDIUM, HIGH, or CRITICAL. Required when action is update_severity. |
project_full_path | string | No | Full path of the project (for example, namespace/project). Required when action is create_issue. |
Examples:
Dismiss a vulnerability:
Dismiss vulnerability 123 with reason FALSE_POSITIVEConfirm a vulnerability:
Mark vulnerability 456 as confirmedRevert to detected:
Revert vulnerability 789 back to detected stateUpdate severity:
Change severity of vulnerability 321 to CRITICAL with comment "Reassessed based on new intel"Create an issue:
Create an issue for vulnerability 654 in project gitlab-org/gitlab
attach_scan_profile
Attaches the given security scan profile to the specified projects, or to all projects under the specified groups.
This tool is listed only when the licensed feature is available for you. For more information, see select tool groups.
| Parameter | Type | Required | Description |
|---|---|---|---|
security_scan_profile_id | string | Yes | Global ID of the security scan profile (for example, gid://gitlab/Security::ScanProfile/1). |
project_ids | array of strings | No | Array of global IDs of projects (for example, [gid://gitlab/Project/1]). This is required unless group_ids is provided. |
group_ids | array of strings | No | Array of global IDs of groups (for example, [gid://gitlab/Group/1]). This is required unless project_ids is provided. |
Example:
Attach `gid://gitlab/Security::ScanProfile/1` to all projects under `gid://gitlab/Group/1`.