qodev-gitlab-mcp

v0.2.2
qodev-gitlab-mcp Checked 1 day ago Published 9 months ago

Production-ready GitLab MCP server exposing projects, merge requests, pipelines, and discussions

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

upload_file Upload File

Upload a file to GitLab for embedding in issues, MRs, or comments. Uploads a file to GitLab's project uploads and returns a markdown-ready image/file tag that can be embedded in descriptions or comments.

ParameterTypeDescription
project_id *stringProject ID, path, or "current"
source *File source - either {"path": "/local/file.png"} for local files or {"base64": "...", "filename": "name.png"} for base64 data

create_issue Create Issue

Create a new issue in a project

ParameterTypeDescription
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")
title *stringIssue title (required)
assignee_idsList of user IDs to assign (optional)
descriptionIssue description (optional, supports Markdown)
imagesList of images to attach. Each image is either {"path": "/local/file.png"} or {"base64": "...", "filename": "name.png", "alt": "optional alt text"}
labelsComma-separated label names (optional, e.g., "bug,urgent")

update_issue Update Issue

Update an existing issue's title, description, or other properties

ParameterTypeDescription
issue_iid *integerIssue IID (the #number)
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")
assignee_idsNew list of assignee user IDs (optional)
descriptionNew issue description (optional)
imagesList of images to attach. Each image is either {"path": "/local/file.png"} or {"base64": "...", "filename": "name.png", "alt": "optional alt text"}
labelsNew comma-separated label names (optional)
state_eventChange state: "close" or "reopen" (optional)
titleNew issue title (optional)

close_issue Close Issue

Close a specific issue by project and issue IID

ParameterTypeDescription
issue_iid *integerIssue IID (the #number)
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")

comment_on_issue Comment On Issue

Leave a comment on a specific issue by project and issue IID

ParameterTypeDescription
comment *stringComment text to post (supports Markdown formatting)
issue_iid *integerIssue IID (the #number)
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")
imagesList of images to attach. Each image is either {"path": "/local/file.png"} or {"base64": "...", "filename": "name.png", "alt": "optional alt text"}

comment_on_merge_request Comment On Merge Request

Leave a comment on a specific merge request by project and MR IID

ParameterTypeDescription
comment *stringComment text to post (supports Markdown formatting)
mr_iid *Merge request IID or "current" (the !number, or "current" for current branch MR)
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")
imagesList of images to attach. Each image is either {"path": "/local/file.png"} or {"base64": "...", "filename": "name.png", "alt": "optional alt text"}

reply_to_discussion Reply To Discussion

Reply to an existing discussion thread on a merge request

ParameterTypeDescription
comment *stringReply text to post (supports Markdown formatting)
discussion_id *stringDiscussion thread ID to reply to
mr_iid *Merge request IID or "current" (the !number, or "current" for current branch MR)
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")
imagesList of images to attach. Each image is either {"path": "/local/file.png"} or {"base64": "...", "filename": "name.png", "alt": "optional alt text"}

create_inline_comment Create Inline Comment

Create an inline comment on a specific line in a merge request diff

ParameterTypeDescription
comment *stringComment text to post (supports Markdown formatting)
mr_iid *Merge request IID or "current" (the !number, or "current" for current branch MR)
position *objectPosition specifying where to place the comment. Must include: - file_path: Path to the file in the diff - new_line: Line number (1-based) in the new version (for added/unchanged lines) - old_line: Lin…
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")
imagesList of images to attach. Each image is either {"path": "/local/file.png"} or {"base64": "...", "filename": "name.png", "alt": "optional alt text"}

resolve_discussion_thread Resolve Discussion Thread

Resolve or unresolve a discussion thread on a merge request

ParameterTypeDescription
discussion_id *stringDiscussion thread ID to resolve/unresolve
mr_iid *Merge request IID or "current" (the !number, or "current" for current branch MR)
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")
resolvedbooleanTrue to resolve the thread, False to unresolve it (default: True)

merge_merge_request Merge Merge Request

Merge a specific merge request by project and MR IID

ParameterTypeDescription
mr_iid *Merge request IID or "current" (the !number, or "current" for current branch MR)
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")
merge_commit_messageCustom merge commit message (optional)
merge_when_pipeline_succeedsbooleanWait for pipeline to succeed before merging (default: False)
should_remove_source_branchbooleanRemove source branch after merge (default: True)
squashSquash commits on merge (None = use project/MR settings, True = squash, False = don't squash)
squash_commit_messageCustom squash commit message (optional, used if squashing)

close_merge_request Close Merge Request

Close a specific merge request by project and MR IID

ParameterTypeDescription
mr_iid *Merge request IID or "current" (the !number, or "current" for current branch MR)
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")
commentOptional comment to post when closing (supports Markdown formatting)

update_merge_request Update Merge Request

Update a merge request's title, description, or other properties

ParameterTypeDescription
mr_iid *Merge request IID or "current" (the !number, or "current" for current branch MR)
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")
assignee_idsList of assignee user IDs (optional)
descriptionNew MR description (optional)
imagesList of images to attach. Each image is either {"path": "/local/file.png"} or {"base64": "...", "filename": "name.png", "alt": "optional alt text"}
labelsComma-separated label names (optional)
reviewer_idsList of reviewer user IDs (optional)
state_eventChange state: "open", "close", "reopen" (optional)
target_branchNew target branch (optional)
titleNew MR title (optional)

create_merge_request Create Merge Request

Create a new merge request in a project

ParameterTypeDescription
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")
title *stringMR title (required)
allow_collaborationbooleanAllow commits from members with merge access (default: False)
assignee_idsList of user IDs to assign (optional)
descriptionMR description/body (optional, supports Markdown)
imagesList of images to attach. Each image is either {"path": "/local/file.png"} or {"base64": "...", "filename": "name.png", "alt": "optional alt text"}
labelsComma-separated label names (optional, e.g., "bug,urgent")
remove_source_branchbooleanRemove source branch after merge (default: True)
reviewer_idsList of user IDs to review (optional)
source_branchSource branch name (defaults to current branch if None)
squashSquash commits on merge (None = use project settings, True = squash, False = don't squash)
target_branchstringTarget branch name (default: "main")

wait_for_pipeline Wait For Pipeline

Wait for a GitLab pipeline to complete (success or failure)

ParameterTypeDescription
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")
check_intervalintegerHow often to check status in seconds (default: 10)
include_failed_logsbooleanInclude last 10 lines of failed job logs (default: True)
mr_iidMR IID to get latest pipeline from (alternative to pipeline_id, supports "current")
pipeline_idPipeline ID to wait for (required if mr_iid not provided)
timeout_secondsintegerMaximum time to wait in seconds (default: 3600/1 hour)

download_artifact Download Artifact

Download an artifact file to local filesystem for analysis with shell tools. Downloads the complete artifact file (no truncation) to a local path. Useful for large files that need analysis with grep, wc, awk, etc.

ParameterTypeDescription
artifact_path *stringPath to artifact within job (e.g., "logs.txt", "build/output.log")
job_id *integerJob ID
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")
destinationLocal path to save file (optional, defaults to temp file)

retry_job Retry Job

Retry a specific job by project and job ID

ParameterTypeDescription
job_id *integerJob ID to retry
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")

create_release Create Release

Create a new release in a project

ParameterTypeDescription
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")
tag_name *stringTag name for the release (required)
assets_linksList of asset link dicts with 'name', 'url', and optional 'direct_asset_path' (optional)
descriptionRelease description/notes (optional, supports Markdown)
imagesList of images to attach. Each image is either {"path": "/local/file.png"} or {"base64": "...", "filename": "name.png", "alt": "optional alt text"}
milestonesList of milestone titles to associate (optional)
nameRelease title (optional, defaults to tag_name)
refCommit SHA, branch, or existing tag (required only if tag_name doesn't exist yet; auto-detects from current branch if not provided)
released_atISO 8601 datetime for release (optional, defaults to current time)

set_project_ci_variable Set Project Ci Variable

Set a CI/CD variable in a specific project (upsert: creates if new, updates if exists)

ParameterTypeDescription
key *stringVariable key/name (e.g., "API_KEY", "DATABASE_URL")
project_id *stringProject ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current")
value *stringVariable value
descriptionOptional description of the variable
environment_scopestringEnvironment scope - "*" for all (default), or specific like "production", "staging"
maskedbooleanHidden in job logs (default: False)
protectedbooleanOnly available in protected branches (default: False)
rawbooleanDisable variable reference expansion (default: False)
variable_typestringType of variable - "env_var" (default) or "file"