GitLab MCP Server Tools

March 26, 2025 ยท View on GitHub

This document provides details on all available tools in the GitLab MCP server.

Each tool is designed to interact with GitLab APIs, allowing AI assistants to work with repositories, merge requests, issues, CI/CD pipelines, and more.

Table of Contents

Repository Management

gitlab_list_projects

List GitLab projects accessible to the user

This tool does not require any parameters.

gitlab_get_project

Get details of a specific GitLab project

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project

gitlab_list_branches

List branches of a GitLab project

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
searchstringNoSearch branches by name

gitlab_list_merge_requests

List merge requests in a GitLab project

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
statestringNoReturn merge requests with specified state (opened, closed, locked, merged)
scopestringNoReturn merge requests for the specified scope (created_by_me, assigned_to_me, all)

gitlab_get_merge_request

Get details of a specific merge request

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
merge_request_iidnumberYesThe internal ID of the merge request

gitlab_get_merge_request_changes

Get changes (diff) of a specific merge request

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
merge_request_iidnumberYesThe internal ID of the merge request

gitlab_create_merge_request_note

Add a comment to a merge request

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
merge_request_iidnumberYesThe internal ID of the merge request
bodystringYesThe content of the note/comment

gitlab_create_merge_request_note_internal

Add a comment to a merge request with option to make it an internal note

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
merge_request_iidnumberYesThe internal ID of the merge request
bodystringYesThe content of the note/comment
internalbooleanNoIf true, the note will be marked as an internal note visible only to project members

gitlab_update_merge_request

Update a merge request title and description

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
merge_request_iidnumberYesThe internal ID of the merge request
titlestringNoThe title of the merge request
descriptionstringNoThe description of the merge request

gitlab_list_issues

List issues in a GitLab project

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
statestringNoReturn issues with specified state (opened, closed)
labelsstringNoComma-separated list of label names

gitlab_get_repository_file

Get content of a file in a repository

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
file_pathstringYesPath of the file in the repository
refstringNoThe name of branch, tag or commit

gitlab_compare_branches

Compare branches, tags or commits

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
fromstringYesThe commit SHA or branch name to compare from
tostringYesThe commit SHA or branch name to compare to

gitlab_list_project_members

List members of a project

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project

gitlab_add_project_member

Add a user to a project

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
user_idnumberYesThe ID of the user
access_levelnumberYesAccess level (10=Guest, 20=Reporter, 30=Developer, 40=Maintainer, 50=Owner)

Integrations & Webhooks

gitlab_list_integrations

List all available project integrations/services

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project

gitlab_get_integration

Get integration details for a project

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
integrationstringYesThe name of the integration (e.g., slack)

gitlab_update_slack_integration

Update Slack integration settings for a project

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
webhookstringYesThe Slack webhook URL
usernamestringNoThe Slack username
channelstringNoThe Slack channel name

gitlab_disable_slack_integration

Disable Slack integration for a project

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project

gitlab_list_webhooks

List webhooks for a project

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project

gitlab_get_webhook

Get details of a specific webhook

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
webhook_idnumberYesThe ID of the webhook

gitlab_add_webhook

Add a new webhook to a project

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
urlstringYesThe webhook URL
tokenstringNoSecret token to validate received payloads
push_eventsbooleanNoTrigger webhook for push events
issues_eventsbooleanNoTrigger webhook for issues events
merge_requests_eventsbooleanNoTrigger webhook for merge request events
enable_ssl_verificationbooleanNoEnable SSL verification for the webhook

gitlab_update_webhook

Update an existing webhook

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
webhook_idnumberYesThe ID of the webhook
urlstringYesThe webhook URL
tokenstringNoSecret token to validate received payloads
push_eventsbooleanNoTrigger webhook for push events
issues_eventsbooleanNoTrigger webhook for issues events
merge_requests_eventsbooleanNoTrigger webhook for merge request events
enable_ssl_verificationbooleanNoEnable SSL verification for the webhook

gitlab_delete_webhook

Delete a webhook

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
webhook_idnumberYesThe ID of the webhook

gitlab_test_webhook

Test a webhook

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
webhook_idnumberYesThe ID of the webhook

CI/CD Management

gitlab_list_trigger_tokens

List pipeline trigger tokens

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project

gitlab_get_trigger_token

Get details of a pipeline trigger token

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
trigger_idnumberYesThe ID of the trigger

gitlab_create_trigger_token

Create a new pipeline trigger token

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
descriptionstringYesThe trigger description

gitlab_update_trigger_token

Update a pipeline trigger token

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
trigger_idnumberYesThe ID of the trigger
descriptionstringYesThe new trigger description

gitlab_delete_trigger_token

Delete a pipeline trigger token

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
trigger_idnumberYesThe ID of the trigger

gitlab_trigger_pipeline

Trigger a pipeline run

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
refstringYesThe branch or tag name to run the pipeline for
tokenstringYesThe trigger token
variablesobjectNoVariables to pass to the pipeline

gitlab_list_cicd_variables

List CI/CD variables for a project

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project

gitlab_get_cicd_variable

Get a specific CI/CD variable

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
keystringYesThe key of the variable

gitlab_create_cicd_variable

Create a new CI/CD variable

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
keystringYesThe key of the variable
valuestringYesThe value of the variable
protectedbooleanNoWhether the variable is protected
maskedbooleanNoWhether the variable is masked

gitlab_update_cicd_variable

Update a CI/CD variable

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
keystringYesThe key of the variable
valuestringYesThe value of the variable
protectedbooleanNoWhether the variable is protected
maskedbooleanNoWhether the variable is masked

gitlab_delete_cicd_variable

Delete a CI/CD variable

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
keystringYesThe key of the variable

User & Group Management

gitlab_list_users

List GitLab users

This tool does not require any parameters.

gitlab_get_user

Get details of a specific user

Parameters:

NameTypeRequiredDescription
user_idnumberYesThe ID of the user

gitlab_list_groups

List GitLab groups

This tool does not require any parameters.

gitlab_get_group

Get details of a specific group

Parameters:

NameTypeRequiredDescription
group_idstringYesThe ID or URL-encoded path of the group

gitlab_list_group_members

List members of a group

Parameters:

NameTypeRequiredDescription
group_idstringYesThe ID or URL-encoded path of the group

gitlab_add_group_member

Add a user to a group

Parameters:

NameTypeRequiredDescription
group_idstringYesThe ID or URL-encoded path of the group
user_idnumberYesThe ID of the user
access_levelnumberYesAccess level (10=Guest, 20=Reporter, 30=Developer, 40=Maintainer, 50=Owner)

gitlab_list_project_members

List members of a project

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project

gitlab_add_project_member

Add a user to a project

Parameters:

NameTypeRequiredDescription
project_idstringYesThe ID or URL-encoded path of the project
user_idnumberYesThe ID of the user
access_levelnumberYesAccess level (10=Guest, 20=Reporter, 30=Developer, 40=Maintainer, 50=Owner)

Generated automatically from src/utils/tools-data.ts