Labsco
MCP SERVER

GitLab

by Alosies

Works a GitLab merge request the way a reviewer does — inline discussions, replies, resolve, approve, ready — plus pipelines, job logs, issues and diffs.

Git Hosting & Code ReviewVerified
Summary
It carries the review all the way through — inline comment, reply, resolve, approve — instead of stopping at 'add a comment'.

Pipelines and job traces sit in the same server, so a red CI run can be read and re-run without leaving the conversation. Two practical notes: project listings return minimal fields by default and need simple=false when you want everything, and the token variable is NPM_CONFIG_TOKEN, which npm also consumes — keep it scoped to this server's env block.

What it is

A typed MCP server over the GitLab API, authenticated with a personal access token, covering the review workflow rather than only listing and commenting.

What you get
  • Projects: list with minimal fields by default to keep responses small (simple=false for the full record), get one, list the project's labels, and upload a file that comes back as markdown you can paste into a comment
  • Issues: list, get one, create
  • Merge requests: list with filters, get by IID or by source branch, create, update, mark draft or ready, change labels on their own, and read the project's MR description templates
  • The whole review loop: top-level notes, threaded discussions including inline comments on the diff, replies, resolve and unresolve, editing and deleting notes, and attachments embedded in any of them
  • Approvals: who has approved, how many are still needed and which rules apply, plus approving and withdrawing your own
  • Diffs from several angles: a merge request's changes, the same paginated, a single commit's diff, and the diff between two branches or commits
  • Repository basics: branches, commits with filters, and one commit in detail
  • Pipelines end to end: list, get, create, retry, cancel, delete, read variables, list jobs, and pull a job's log — with a trace tool offering partial logs, tail mode and line limits
Requirements

A GitLab personal access token carrying the api, read_user and read_repository scopes. The server reads it from NPM_CONFIG_TOKEN — a name npm also reads, so set it inside the server's own env block rather than exporting it in your shell. GITLAB_BASE_URL points at a self-hosted instance. Run it over stdio with npx -y @alosies/gitlab-mcp-server. An optional config file — gitlab-mcp.json in the working directory, ~/.gitlab-mcp.json, or a path given via --config or GITLAB_MCP_CONFIG — sets a default project, page size and timeout, and environment variables always override it.

Setup effort

One command — npx -y @alosies/gitlab-mcp-server