qodev-gitlab-mcp
v0.2.2Production-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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project 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
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
title * | string | Issue title (required) |
assignee_ids | List of user IDs to assign (optional) | |
description | Issue description (optional, supports Markdown) | |
images | List of images to attach. Each image is either {"path": "/local/file.png"} or {"base64": "...", "filename": "name.png", "alt": "optional alt text"} | |
labels | Comma-separated label names (optional, e.g., "bug,urgent") |
update_issue Update Issue
Update an existing issue's title, description, or other properties
| Parameter | Type | Description |
|---|---|---|
issue_iid * | integer | Issue IID (the #number) |
project_id * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
assignee_ids | New list of assignee user IDs (optional) | |
description | New issue description (optional) | |
images | List of images to attach. Each image is either {"path": "/local/file.png"} or {"base64": "...", "filename": "name.png", "alt": "optional alt text"} | |
labels | New comma-separated label names (optional) | |
state_event | Change state: "close" or "reopen" (optional) | |
title | New issue title (optional) |
close_issue Close Issue
Close a specific issue by project and issue IID
| Parameter | Type | Description |
|---|---|---|
issue_iid * | integer | Issue IID (the #number) |
project_id * | string | Project 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
| Parameter | Type | Description |
|---|---|---|
comment * | string | Comment text to post (supports Markdown formatting) |
issue_iid * | integer | Issue IID (the #number) |
project_id * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
images | List 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
| Parameter | Type | Description |
|---|---|---|
comment * | string | Comment text to post (supports Markdown formatting) |
mr_iid * | Merge request IID or "current" (the !number, or "current" for current branch MR) | |
project_id * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
images | List 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
| Parameter | Type | Description |
|---|---|---|
comment * | string | Reply text to post (supports Markdown formatting) |
discussion_id * | string | Discussion thread ID to reply to |
mr_iid * | Merge request IID or "current" (the !number, or "current" for current branch MR) | |
project_id * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
images | List 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
| Parameter | Type | Description |
|---|---|---|
comment * | string | Comment text to post (supports Markdown formatting) |
mr_iid * | Merge request IID or "current" (the !number, or "current" for current branch MR) | |
position * | object | Position 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 * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
images | List 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
| Parameter | Type | Description |
|---|---|---|
discussion_id * | string | Discussion thread ID to resolve/unresolve |
mr_iid * | Merge request IID or "current" (the !number, or "current" for current branch MR) | |
project_id * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
resolved | boolean | True 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
| Parameter | Type | Description |
|---|---|---|
mr_iid * | Merge request IID or "current" (the !number, or "current" for current branch MR) | |
project_id * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
merge_commit_message | Custom merge commit message (optional) | |
merge_when_pipeline_succeeds | boolean | Wait for pipeline to succeed before merging (default: False) |
should_remove_source_branch | boolean | Remove source branch after merge (default: True) |
squash | Squash commits on merge (None = use project/MR settings, True = squash, False = don't squash) | |
squash_commit_message | Custom squash commit message (optional, used if squashing) |
close_merge_request Close Merge Request
Close a specific merge request by project and MR IID
| Parameter | Type | Description |
|---|---|---|
mr_iid * | Merge request IID or "current" (the !number, or "current" for current branch MR) | |
project_id * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
comment | Optional comment to post when closing (supports Markdown formatting) |
update_merge_request Update Merge Request
Update a merge request's title, description, or other properties
| Parameter | Type | Description |
|---|---|---|
mr_iid * | Merge request IID or "current" (the !number, or "current" for current branch MR) | |
project_id * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
assignee_ids | List of assignee user IDs (optional) | |
description | New MR description (optional) | |
images | List of images to attach. Each image is either {"path": "/local/file.png"} or {"base64": "...", "filename": "name.png", "alt": "optional alt text"} | |
labels | Comma-separated label names (optional) | |
reviewer_ids | List of reviewer user IDs (optional) | |
state_event | Change state: "open", "close", "reopen" (optional) | |
target_branch | New target branch (optional) | |
title | New MR title (optional) |
create_merge_request Create Merge Request
Create a new merge request in a project
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
title * | string | MR title (required) |
allow_collaboration | boolean | Allow commits from members with merge access (default: False) |
assignee_ids | List of user IDs to assign (optional) | |
description | MR description/body (optional, supports Markdown) | |
images | List of images to attach. Each image is either {"path": "/local/file.png"} or {"base64": "...", "filename": "name.png", "alt": "optional alt text"} | |
labels | Comma-separated label names (optional, e.g., "bug,urgent") | |
remove_source_branch | boolean | Remove source branch after merge (default: True) |
reviewer_ids | List of user IDs to review (optional) | |
source_branch | Source branch name (defaults to current branch if None) | |
squash | Squash commits on merge (None = use project settings, True = squash, False = don't squash) | |
target_branch | string | Target branch name (default: "main") |
wait_for_pipeline Wait For Pipeline
Wait for a GitLab pipeline to complete (success or failure)
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
check_interval | integer | How often to check status in seconds (default: 10) |
include_failed_logs | boolean | Include last 10 lines of failed job logs (default: True) |
mr_iid | MR IID to get latest pipeline from (alternative to pipeline_id, supports "current") | |
pipeline_id | Pipeline ID to wait for (required if mr_iid not provided) | |
timeout_seconds | integer | Maximum 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.
| Parameter | Type | Description |
|---|---|---|
artifact_path * | string | Path to artifact within job (e.g., "logs.txt", "build/output.log") |
job_id * | integer | Job ID |
project_id * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
destination | Local path to save file (optional, defaults to temp file) |
retry_job Retry Job
Retry a specific job by project and job ID
| Parameter | Type | Description |
|---|---|---|
job_id * | integer | Job ID to retry |
project_id * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
create_release Create Release
Create a new release in a project
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
tag_name * | string | Tag name for the release (required) |
assets_links | List of asset link dicts with 'name', 'url', and optional 'direct_asset_path' (optional) | |
description | Release description/notes (optional, supports Markdown) | |
images | List of images to attach. Each image is either {"path": "/local/file.png"} or {"base64": "...", "filename": "name.png", "alt": "optional alt text"} | |
milestones | List of milestone titles to associate (optional) | |
name | Release title (optional, defaults to tag_name) | |
ref | Commit SHA, branch, or existing tag (required only if tag_name doesn't exist yet; auto-detects from current branch if not provided) | |
released_at | ISO 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)
| Parameter | Type | Description |
|---|---|---|
key * | string | Variable key/name (e.g., "API_KEY", "DATABASE_URL") |
project_id * | string | Project ID, path, or "current" (e.g., "mygroup/myproject", "123", or "current") |
value * | string | Variable value |
description | Optional description of the variable | |
environment_scope | string | Environment scope - "*" for all (default), or specific like "production", "staging" |
masked | boolean | Hidden in job logs (default: False) |
protected | boolean | Only available in protected branches (default: False) |
raw | boolean | Disable variable reference expansion (default: False) |
variable_type | string | Type of variable - "env_var" (default) or "file" |