Skip to main content

mcp-gitlabpr

Servidor MCP para merge requests do GitLab (o "PR" do GitLab): listar, obter (com diffs) e criar. Usa a API REST v4 com personal access token e só os parâmetros que já existem na GitLab CE 10.8 (doc da 10.8.7), então também funciona em versões mais novas.

Credenciais

SO Arquivo
Linux/Mac ~/.config/mcp-gitlabpr/gitlabpr.properties
Windows %APPDATA%\mcp-gitlabpr\gitlabpr.properties

Para usar outro caminho, defina a variável de ambiente MCP_GITLABPR_CONFIG.

[DEFAULT]
url = https://gitlab.SEU-SERVIDOR
token = SEU_PERSONAL_ACCESS_TOKEN

O token sai de Settings → Access Tokens com o escopo api e vai no header PRIVATE-TOKEN.

Certificados: o MCP confia nas CAs da máquina e, se existir, em gitlabpr-bundle.pem na mesma pasta do gitlabpr.properties (cadeia PEM do servidor). REQUESTS_CA_BUNDLE também funciona.

Instalação

{
  "mcpServers": {
    "gitlabpr": {
      "type": "stdio",
      "command": "uvx",
      "args": ["mcp-gitlabpr@latest"],
      "env": { "UV_SYSTEM_CERTS": "true" }
    }
  }
}

Desenvolvimento:

uv sync
uv run pytest
uv run mcp dev mcp_gitlabpr/server.py   # MCP Inspector

Tools

projeto é o caminho grupo/projeto (o MCP faz o URL-encode) ou o id numérico. Sem projeto, ele vem do remote do git da pasta em que o MCP roda (origin, ou o primeiro remote; aceita https://, ssh:// e git@host:), e origem vem da branch atual. Fora de um repositório git a tool falha pedindo que o agente pergunte ao usuário. O cliente MCP precisa iniciar o servidor na pasta do workspace; se não iniciar, informe projeto. iid é o número do MR no projeto (o !123 da tela). Autor e responsável são usernames: o MCP os converte em id por GET /users?username=, porque a 10.8 só filtra por author_id/assignee_id.

Tool Para quê
gitlab_listar_mrs(projeto?, todos_projetos=false, estado=opened, busca?, origem?, destino?, autor?, responsavel?, limite≤100, pagina=1) MRs do projeto ou, com todos_projetos, de todos os visíveis (scope=all). Devolve total, proxima_pagina e os itens resumidos
gitlab_obter_mr(iid, projeto?, diffs=false) Detalhes do MR (descrição, labels, conflitos, merge). Com diffs, os arquivos alterados e o diff de cada um, cortado em 4000 caracteres
gitlab_criar_mr(titulo, destino, origem?, projeto?, descricao?, responsavel?, labels?, remover_origem=false) Cria o MR; a branch de origem precisa já estar no GitLab (git push). Se já existe um MR aberto entre as mesmas branches, o GitLab responde 409

estado aceita opened, closed, merged ou all.

Metadata

Release files for mcp-gitlabpr 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-gitlabpr 1.0.0
File Size Uploaded Provenance
mcp_gitlabpr-1.0.0.tar.gz 8.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-gitlabpr 1.0.0
File Interpreter ABI Platform
mcp_gitlabpr-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.0 kB

Release files / mcp_gitlabpr-1.0.0.tar.gz

Download URL mcp_gitlabpr-1.0.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f2c6d33d9428a696488dc042d07b2a6cd85dae3e5bbdaa256e7c09d5824b5914
BLAKE2b-256 checksum
How to use checksums
09c17e1e9ba81b627c154f5dd5d75a27d43fabef752052baa78322a484512072
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / mcp_gitlabpr-1.0.0-py3-none-any.whl

Download URL mcp_gitlabpr-1.0.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c43870d304b017dadeca3a14cb24d84798a0edb2bc55b6d634af526a08312798
BLAKE2b-256 checksum
How to use checksums
7558f32e404c2c141d5156e3fb140c330b07de84002fe1bec7b2fcf2424e39c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for mcp-gitlabpr 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page