Lightweight MCP server for GitLab-centric code review workflows.
This project is intentionally narrow. It is designed for agents such as Codex, Cursor, and similar MCP-capable tools that need a compact integration focused on:
- merge request review by URL;
- reading merge request metadata, discussions, and pipelines;
- posting top-level review comments back to the merge request;
- researching the codebase in the context of an active review.
The server talks directly to the GitLab REST API. It does not require glab, and it resolves the target GitLab profile from the merge request URL.
Current tools:
parse_merge_request_urlget_merge_requestget_merge_request_changeslist_merge_request_discussionsadd_merge_request_noteget_merge_request_pipelines
General-purpose enterprise MCP servers are often too broad for review sessions. gitlab-mcp stays lightweight on purpose:
- focused on code review instead of full GitLab administration;
- compact payloads so an agent can reason over the response without wasting context;
- practical for repository investigation during review;
- limited write access: create a top-level merge request note when review output is ready.
If you want an agent to read a merge request, inspect discussions, examine changed files, and publish a review summary, this server is the intended integration point.
- Python 3.13+
uv- a GitLab token with
apiscope - network access to your GitLab instance
- Current version:
0.1 - Release date:
2026-03-26
The CLI also exposes version output:
uv run gitlab-mcp --version
uv run gitlab-mcp -vThe server reads profiles from:
~/.config/aka.NameRec@gmail.com/mcp/config.tomlYou can override the location for testing with:
export AKA_MCP_CONFIG_PATH="/path/to/config.toml"Example:
[gitlab]
profiles = [
{ base_url = "https://git.devcats.kg", token = "your-token" },
{ name = "gitlab-com", base_url = "https://gitlab.com", token = "other-token", auth_type = "bearer" }
]Profile fields:
base_urlrequired and uniquetokenrequirednameoptional; defaults tobase_urlauth_typeoptional:private_tokenorbearerverify_tlsoptional; defaults totrueca_bundle_pathoptionaltimeout_secondsoptional
uv run gitlab-mcpThe server uses stdio transport by default, which is the expected transport for a local MCP server in agent environments.
Repository URL:
git@github.com:aka-NameRec/gitlab-mcp.git
Minimal local install:
git clone git@github.com:aka-NameRec/gitlab-mcp.git
cd gitlab-mcp
uv syncAfter that, register the server in your agent client using the repository directory as the working directory.
Codex example:
codex mcp add gitlab-review -- uv --directory /absolute/path/to/gitlab-mcp run gitlab-mcpCursor example:
{
"mcpServers": {
"gitlab-review": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/gitlab-mcp",
"run",
"gitlab-mcp"
]
}
}
}This repository is meant to be easy to install from a GitHub URL. A higher-level installer or agent can implement a flow like:
- Clone the repository from GitHub.
- Run
uv syncin the cloned directory. - Register the MCP server with:
uv --directory /absolute/path/to/gitlab-mcp run gitlab-mcpThat makes requests such as install MCP server git@github.com:aka-NameRec/gitlab-mcp.git straightforward to automate in Codex, Cursor, or similar agents.
- The server resolves the target profile from the merge request URL host.
- Short merge request references such as
!123are intentionally unsupported. - Configuration errors are raised as user-facing tool errors with actionable messages.
add_merge_request_noteposts a top-level comment, not an inline diff discussion.- The diff tool trims oversized patches so the agent receives bounded review payloads.