@godrix/mcp-gitlab-utils
Provides tools for interacting with GitLab's API, enabling AI agents to manage merge requests, pipelines, repositories, and perform code reviews.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@godrix/mcp-gitlab-utilscheck the merge status of MR #42"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@godrix/mcp-gitlab-utils
Node.js MCP server for the GitLab REST API — built for AI agents (pipelines, merge requests, diffs, local review, and context discovery).
Version 0.3.1 — gitlab_-prefixed tools, full MR lifecycle, read-only mode, server instructions, prompts, and resources.
Prerequisites
Node.js 18+
GitLab PAT with
apiandread_repository(write scope for merge/comment/approve)Git on PATH (for
repo_path, worktrees, and local review)
Related MCP server: mcp-gitlab
Quick install (npx)
No clone or local build — the published npm package includes compiled JavaScript.
Cursor / Claude Desktop (mcp.json)
{
"mcpServers": {
"gitlab-utils": {
"command": "npx",
"args": ["-y", "@godrix/mcp-gitlab-utils"],
"env": {
"GITLAB_TOKEN": "glpat-...",
"GITLAB_BASE_URL": "https://gitlab.example.com",
"GITLAB_READ_ONLY": "false"
}
}
}
}Restart your MCP client after saving. Optional variables: GITLAB_PROJECT_ID, WORKTREE_DIR.
Global install (alternative)
npm install -g @godrix/mcp-gitlab-utilsThen use "command": "mcp-gitlab-utils" in mcp.json (no npx).
Environment variables
Variable | Required | Description |
| Yes | Sent as |
| Yes | e.g. |
| No | Fallback |
| No | Default: |
| No | Default: |
Project resolution: pass project_id on a tool, or repo_path (local clone) to infer group/repo from origin, or set GITLAB_PROJECT_ID.
MR without IID: with repo_path, the current branch resolves the open MR (source_branch); errors if zero or multiple MRs match. Use gitlab_resolve_context to discover the IID.
Tools
Discovery
Tool | Description |
| Resolve |
| Search projects accessible by the token |
Merge requests
Tool | Description |
| MR metadata (state, reviewers, pipeline) |
| Mergeability: conflicts, draft, pipeline, approvals, blockers |
| Diff/changes + optional CI traces and discussions |
| Review threads and comments |
| Inline comment on a diff line |
|
|
CI/CD
Tool | Description |
| List pipelines (by ref, MR, or status) |
| Pipeline + jobs |
| Job log |
|
|
Repository
Tool | Description |
| Read remote file at a ref (e.g. |
| Diff between two refs |
Local review
Tool | Description |
|
|
Prompts (workflows)
Prompt | Use |
| Full MR review with checklist |
| Validate mergeability and merge |
| Diagnose and fix failed pipeline |
| Create MR from current branch |
| Prioritize open MRs |
Resources
URI | Content |
| Markdown agent guide (tools and flows) |
| Project metadata JSON |
Read-only mode
With GITLAB_READ_ONLY=true:
Allowed: reads (MR, diff, pipeline, merge status, list/get)
Blocked: merge, comment, inline comment, approve, create/update MR, pipeline control, prepare_review
Useful for analysis/review agents without mutating GitLab.
Migration 0.2 → 0.3
New tools and actions (no breaking changes to existing names):
Addition | Description |
| Mergeability state and blockers |
| Inline diff comment |
| New actions: |
Migration 0.1 → 0.2
Legacy names were renamed with the gitlab_ prefix:
0.1.0 | 0.2.0 |
|
|
|
|
|
|
|
|
gitlab_control_pipeline: retry → retry_job; new actions retry_pipeline and cancel_pipeline.
MCPB install (Claude Desktop / local bundle)
Alternative to npx for clients that support .mcpb files:
Clone the repo:
git clone ... && npm install && npm run buildnpm run pack:mcpb— produces.mcpbwithmanifest.json,dist/, andnode_modulesFor a smaller bundle:
npm run pack:mcpb:slimInstall the
.mcpbin your client and fill in token + URL
Local development
To contribute or test changes before publishing to npm:
git clone https://github.com/godrix/mcp-gitlab-utils.git
cd mcp-gitlab-utils
npm install
cp .env.example .env # set GITLAB_TOKEN and GITLAB_BASE_URL
npm run dev # tsx, stdio
# or
npm run build && npm startCursor config pointing at the clone (instead of npx):
{
"mcpServers": {
"gitlab-utils": {
"command": "node",
"args": ["/absolute/path/mcp-gitlab-utils/dist/main.js"],
"env": {
"GITLAB_TOKEN": "glpat-...",
"GITLAB_BASE_URL": "https://gitlab.example.com",
"GITLAB_READ_ONLY": "false"
}
}
}
}Extra requirements for local review: npm and/or composer depending on the target repo.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/godrix/mcp-gitlab-utils'
If you have feedback or need assistance with the MCP directory API, please join our Discord server