qodev-gitlab-mcp

qodev-gitlab-mcp

A Model Context Protocol server for GitLab integration, enabling AI assistants to manage projects, merge requests, pipelines, issues, releases, and more.

Category
Visit Server

README

CI PyPI

qodev-gitlab-mcp

A Model Context Protocol (MCP) server for GitLab integration. Exposes projects, merge requests, pipelines, discussions, issues, releases, and more through a standardized interface for AI assistants like Claude.

Installation

pip install qodev-gitlab-mcp

Or run directly with uvx:

uvx qodev-gitlab-mcp

Configuration

Set the following environment variables:

# Required
GITLAB_TOKEN=glpat-YOUR-TOKEN-HERE

# Optional (defaults to https://gitlab.com)
GITLAB_URL=https://gitlab.com

Claude Code

Add to your MCP configuration:

{
  "mcpServers": {
    "gitlab": {
      "command": "uvx",
      "args": ["qodev-gitlab-mcp"],
      "env": {
        "GITLAB_TOKEN": "your-token-here",
        "GITLAB_URL": "https://gitlab.com"
      }
    }
  }
}

Quick Start

Once configured, the MCP server gives your AI assistant access to GitLab. Example interactions:

  • "Is my MR ready to merge?" -- checks pipeline, approvals, and unresolved discussions
  • "Create a merge request for this branch" -- creates MR with auto-detected source branch
  • "Wait for the pipeline to finish" -- monitors pipeline and reports results with failed job logs
  • "Comment on MR !42 saying LGTM" -- posts a comment on the merge request

Features

  • Merge request management (create, comment, merge, close, inline comments)
  • Pipeline monitoring with wait_for_pipeline tool
  • Issue tracking (create, update, close, comment)
  • Release management
  • CI/CD variable management
  • File uploads with image support
  • Automatic "current" project/branch detection via MCP workspace roots

Tools

The server exposes the following MCP tools:

Merge Requests

Tool Description
create_merge_request Create a new merge request
update_merge_request Update MR title, description, labels, assignees, reviewers
merge_merge_request Merge a merge request
close_merge_request Close a merge request (with optional comment)
comment_on_merge_request Leave a comment on a merge request
create_inline_comment Add an inline comment on a specific line in a MR diff
reply_to_discussion Reply to an existing discussion thread
resolve_discussion_thread Resolve or unresolve a discussion thread

Pipelines

Tool Description
wait_for_pipeline Wait for a pipeline to complete and return results
download_artifact Download a job artifact to local filesystem
retry_job Retry a failed CI/CD job

Issues

Tool Description
create_issue Create a new issue
update_issue Update an existing issue
close_issue Close an issue
comment_on_issue Leave a comment on an issue

Releases

Tool Description
create_release Create a new release with tag, description, and assets

CI/CD Variables

Tool Description
set_project_ci_variable Create or update a CI/CD variable (upsert)

Files

Tool Description
upload_file Upload a file to GitLab for embedding in issues or MRs

All tools support project_id="current" to auto-detect the project from the current working directory. Merge request tools also support mr_iid="current" to detect the MR for the current branch.

Resources

The server exposes the following read-only MCP resources:

Projects

Resource URI Description
gitlab://projects/ List all accessible projects
gitlab://projects/{project_id} Get project details

Merge Requests

Resource URI Description
gitlab://projects/{project_id}/merge-requests/ List open merge requests
gitlab://projects/{project_id}/merge-requests/{mr_iid} Full MR overview (metadata, discussions, changes, commits, pipeline, approvals)
gitlab://projects/{project_id}/merge-requests/{mr_iid}/status Lightweight merge-readiness check
gitlab://projects/{project_id}/merge-requests/{mr_iid}/discussions MR discussion threads
gitlab://projects/{project_id}/merge-requests/{mr_iid}/changes MR diff/changes
gitlab://projects/{project_id}/merge-requests/{mr_iid}/commits MR commit history
gitlab://projects/{project_id}/merge-requests/{mr_iid}/approvals MR approval status
gitlab://projects/{project_id}/merge-requests/{mr_iid}/pipeline-jobs Jobs from the MR's latest pipeline

Pipelines & Jobs

Resource URI Description
gitlab://projects/{project_id}/pipelines/ List recent pipelines
gitlab://projects/{project_id}/pipelines/{pipeline_id} Get pipeline details
gitlab://projects/{project_id}/pipelines/{pipeline_id}/jobs List jobs in a pipeline
gitlab://projects/{project_id}/jobs/{job_id}/log Full job log output
gitlab://projects/{project_id}/jobs/{job_id}/artifacts List job artifacts
gitlab://projects/{project_id}/jobs/{job_id}/artifacts/{path} Read a specific artifact file

Issues

Resource URI Description
gitlab://projects/{project_id}/issues/ List open issues
gitlab://projects/{project_id}/issues/{issue_iid} Get issue details
gitlab://projects/{project_id}/issues/{issue_iid}/notes Get issue comments

Releases

Resource URI Description
gitlab://projects/{project_id}/releases/ List all releases
gitlab://projects/{project_id}/releases/{tag_name} Get release by tag

CI/CD Variables

Resource URI Description
gitlab://projects/{project_id}/variables/ List CI/CD variables (metadata only, values hidden)
gitlab://projects/{project_id}/variables/{key} Get variable metadata by key

Help

Resource URI Description
gitlab://help Server capabilities and usage guide

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured