Skip to main content
Glama
GitLab MCP Server

GitLab MCP Server

by Alosies

GitLab MCP Server

A fully typed TypeScript Model Context Protocol (MCP) server for comprehensive GitLab integration.

Quick Start

1. Get a GitLab Token

Create a GitLab Personal Access Token with api, read_user, and read_repository scopes.

2. Add to Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": ["-y", "@alosies/gitlab-mcp-server"],
      "env": {
        "NPM_CONFIG_TOKEN": "your-gitlab-token-here"
      }
    }
  }
}

3. Start Using

Ask Claude things like:

  • "List my GitLab projects"

  • "Show me open issues in myproject"

  • "Create a merge request from feature-branch to main"

  • "Comment on MR #42 in myproject"

  • "Show me MRs where I'm assigned as reviewer"

  • "Mark MR #15 as ready for review"

  • "Get the logs for job #123"

Related MCP server: GitLab MCP Server

Features

  • Projects: List, get details

  • Issues: List, get, create

  • Merge Requests: List, get, create, update with full review workflow support

    • Comments & Discussions: Create notes, threaded discussions, inline code comments

    • Review Management: Resolve/unresolve discussions, mark as draft/ready

    • Filtering: Filter by reviewer, assignee, author

    • Templates: Use GitLab MR templates for descriptions

  • Pipelines: List, get, create, retry, cancel, delete

  • Jobs: List jobs, get logs with advanced trace options

  • Repository: List branches, get commits

  • User: Get current user info

  • TypeScript: Fully typed with comprehensive type definitions

Documentation

Self-Hosted GitLab

For self-hosted GitLab instances, add your base URL:

{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": ["-y", "@alosies/gitlab-mcp-server"],
      "env": {
        "NPM_CONFIG_TOKEN": "your-token",
        "GITLAB_BASE_URL": "https://gitlab.mycompany.com"
      }
    }
  }
}

Support

License

MIT License

Available Tools

50 tools
approve_mrB

Approve a merge request. The authenticated user must have permission to approve.

Inputs: project_id (required), merge_request_iid (required), sha, approval_password.

cancel_pipelineB

Cancel a running pipeline

Inputs: project_id (required), pipeline_id (required).

create_issueC

Create a new issue

Inputs: title (required), project_id (required), labels, description, +2 more.

create_merge_requestC

Create a new merge request

Inputs: title (required), project_id (required), source_branch (required), target_branch (required), +5 more.

create_mr_discussionA

Create a new discussion on a merge request. Can be a general discussion or an inline comment on the diff. Supports embedding images/files via attachments parameter.

Inputs: body (required), project_id (required), merge_request_iid (required), position, +1 more.

create_mr_discussion_noteB

Add a new note to an existing merge request discussion thread

Inputs: body (required), project_id (required), discussion_id (required), merge_request_iid (required).

create_mr_noteA

Add a new top-level comment to a merge request. Supports embedding images/files via attachments parameter.

Inputs: body (required), project_id (required), merge_request_iid (required), attachments.

create_pipelineD

Create a new pipeline

Inputs: ref (required), project_id (required), variables.

delete_mr_discussion_noteC

Delete a note from a merge request discussion

Inputs: note_id (required), project_id (required), discussion_id (required), merge_request_iid (required).

delete_mr_noteA

Delete a top-level note (comment) from a merge request

Inputs: note_id (required), project_id (required), merge_request_iid (required).

delete_pipelineC

Delete a pipeline

Inputs: project_id (required), pipeline_id (required).

get_branch_diffsB

Get the changes/diffs between two branches or commits in a GitLab project

Inputs: to (required), from (required), project_id (required), straight.

get_commitB

Get details of a specific commit

Inputs: sha (required), project_id (required), stats.

get_commit_diffB

Get changes/diffs of a specific commit

Inputs: sha (required), project_id (required).

get_issueB

Get details of a specific issue

Inputs: issue_iid (required), project_id (required).

get_job_logsB

Get the log (trace) file of a specific job

Inputs: job_id (required), project_id (required).

get_job_traceB

Get job trace with options for partial logs, tail mode, and line limits

Inputs: job_id (required), project_id (required), raw, tail, +1 more.

get_merge_requestA

Get details of a merge request. Either merge_request_iid or source_branch must be provided.

Inputs: project_id (required), source_branch, merge_request_iid.

get_merge_request_diffsB

Get the changes/diffs of a merge request. Either merge_request_iid or source_branch must be provided.

Inputs: project_id (required), view, source_branch, merge_request_iid.

get_mr_approvalsA

Get the approval status of a merge request, including who has approved, how many approvals are needed, and approval rules.

Inputs: project_id (required), merge_request_iid (required).

get_mr_templateB

Get a specific merge request description template by name

Inputs: name (required), project_id (required).

get_pipelineB

Get details of a specific pipeline

Inputs: project_id (required), pipeline_id (required).

get_pipeline_variablesB

Get variables of a pipeline

Inputs: project_id (required), pipeline_id (required).

get_projectC

Get details of a specific project

Inputs: project_id (required).

get_project_commitsB

List repository commits with filtering options

Inputs: project_id (required), all, page, path, +9 more.

get_userA

Get current user information

Inputs: no named parameters.

list_issuesC

List issues in a project

Inputs: project_id (required), scope, state, labels, +4 more.

list_merge_request_diffsA

List merge request diffs with pagination support. Either merge_request_iid or source_branch must be provided.

Inputs: project_id (required), page, unidiff, per_page, +2 more.

list_merge_requestsC

List merge requests in a project

Inputs: project_id (required), scope, state, search, +7 more.

list_mr_discussionsA

List discussions (threaded comments including inline code comments) on a merge request. Use unresolved_only=true to fetch only unresolved discussions (saves tokens).

Inputs: project_id (required), merge_request_iid (required), page, per_page, +1 more.

list_mr_notesA

List all notes (comments) on a merge request

Inputs: project_id (required), merge_request_iid (required), page, sort, +2 more.

list_mr_templatesA

List available merge request description templates in a project

Inputs: project_id (required).

list_pipeline_jobsB

List jobs in a pipeline

Inputs: project_id (required), pipeline_id (required), scope, include_retried.

list_pipelinesB

List pipelines in a project

Inputs: project_id (required), ref, sha, name, +8 more.

list_project_branchesB

List branches in a project

Inputs: project_id (required), search, per_page.

list_project_labelsA

List all labels available in a project. Useful for discovering valid label names before adding them to issues or merge requests.

Inputs: project_id (required), search, with_counts, include_ancestor_groups.

list_projectsA

List GitLab projects with minimal info by default (to reduce token usage from 40k+ to much less). Use simple=false for full project details when needed.

Inputs: owned, search, simple, per_page, +1 more.

list_project_uploadsB

List files that have been uploaded to a project

Inputs: project_id (required).

mark_mr_as_draftA

Mark a merge request as draft (work in progress, not ready for review)

Inputs: project_id (required), merge_request_iid (required).

mark_mr_as_readyA

Mark a merge request as ready (remove draft status, ready for review)

Inputs: project_id (required), merge_request_iid (required).

reply_to_mr_discussionB

Reply to an existing discussion thread on a merge request

Inputs: body (required), project_id (required), discussion_id (required), merge_request_iid (required).

resolve_mr_discussionB

Mark a discussion on a merge request as resolved

Inputs: project_id (required), discussion_id (required), merge_request_iid (required).

retry_pipelineB

Retry a failed pipeline

Inputs: project_id (required), pipeline_id (required).

unapprove_mrB

Remove your approval from a merge request.

Inputs: project_id (required), merge_request_iid (required).

unresolve_mr_discussionA

Mark a discussion on a merge request as unresolved

Inputs: project_id (required), discussion_id (required), merge_request_iid (required).

update_merge_requestA

Update an existing merge request. Either merge_request_iid or source_branch must be provided.

Inputs: project_id (required), title, labels, squash, +12 more.

update_mr_discussion_noteB

Modify an existing merge request discussion note

Inputs: body (required), note_id (required), project_id (required), discussion_id (required), +1 more.

update_mr_labelsA

Add or remove labels from a merge request. More convenient than update_merge_request for label-only changes.

Inputs: project_id (required), merge_request_iid (required), add_labels, remove_labels.

update_mr_noteA

Update the content of an existing top-level note (comment) on a merge request. Supports embedding images/files via attachments parameter.

Inputs: body (required), note_id (required), project_id (required), merge_request_iid (required), +1 more.

upload_project_fileA

Upload a file to a GitLab project. Returns a markdown string and URL that can be embedded in MR comments, issue descriptions, etc.

Inputs: file (required), project_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

    TDQS

    B3/5.0

    Scored across 50 tools

    Disambiguation4/5

    Most tools are clearly separated by resource (projects, issues, MRs, pipelines, commits). However, there is some overlap between get_merge_request_diffs and list_merge_request_diffs, and between get_job_logs and get_job_trace, which could cause confusion.

    Naming Consistency4/5

    The naming mostly follows a consistent verb_noun pattern (list_, get_, create_, update_, delete_). Minor deviations include mark_mr_as_draft/mark_mr_as_ready and approve_mr/unapprove_mr, which are still readable but slightly inconsistent with the dominant pattern.

    Tool Count3/5

    50 tools is on the heavy side, but the server covers a broad GitLab domain (projects, issues, MRs, branches, commits, pipelines, users). The count is justified by the scope, though it borders on overwhelming and could benefit from consolidation.

    Completeness4/5

    The tool surface is quite comprehensive for GitLab workflows: project listing/creation, issue CRUD, MR lifecycle with discussions/approvals, pipelines, commits, and branches. Minor gaps include no project deletion/update, no issue update/delete, and no branch creation/deletion, but core workflows are well covered.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers