mcp-http-gitlab
Provides tools for reviewing GitLab merge requests via the REST API: fetch merge request metadata and diff_refs SHAs, list changed files with raw diffs, and post inline comments on specific lines of a merge request's diff. Renamed files are resolved automatically, and line numbers refer to lines visible in the MR diff.
Click on "Deploy 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., "@mcp-http-gitlabreview MR !42 in my-group/my-repo and comment on line 15 of src/main.ts"
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.
mcp-http-gitlab
MCP server for posting inline comments on GitLab merge request line changes via the REST API.
Tools
Tool | Description |
| MR metadata and |
| Changed files with raw diffs |
| Post inline comment on a diff line |
Related MCP server: GitLab Code Review MCP
Setup
npm install
npm run buildEnvironment
Variable | Required | Default | Description |
| yes | — | Personal access token with |
| no |
| GitLab instance base URL |
Cursor MCP config
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"gitlab": {
"command": "node",
"args": ["/absolute/path/to/mcp-http-gitlab/dist/index.js"],
"env": {
"GITLAB_TOKEN": "glpat-your-token-here",
"GITLAB_URL": "https://gitlab.com"
}
}
}
}Typical agent flow
gitlab_get_merge_request— confirm MR state and get SHAsgitlab_get_mr_changes— read diffs and pick a file/linegitlab_create_mr_line_comment— post the review comment
Example: create inline comment
{
"project_path": "my-group/my-repo",
"mr_iid": 42,
"file_path": "src/main.ts",
"line_number": 15,
"body": "Consider extracting this into a helper function."
}Agent integration
Skill, Cursor rules, and install snippets live in agent/:
./agent/scripts/install-cursor.sh # symlink skill → ~/.cursor/skills/Copy agent/cursor-rules/*.mdc into target repos under .cursor/rules/.
See agent/README.md for full integration steps.
Notes
Token is read from the environment only (never passed as a tool argument).
The server validates the token on startup via
GET /user.Line numbers refer to lines visible in the MR diff (new-file lines for additions/context).
Renamed files are resolved automatically from MR changes.
MVP scope: new discussions only (no reply/resolve).
This server cannot be deployed
Maintenance
Related MCP Connectors
Versioned artifact review for people and AI agents, with contextual comments and human control.
Security reviews for coding agents: diffs checked against your org policy and live infrastructure.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Pull change requests from your Amendor board into your coding agent to build and open PRs.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to review GitLab merge requests by fetching changes, analyzing diffs, adding comments, and managing approvals through the GitLab API. Supports complete merge request analysis, file-specific reviews, and version comparisons.124MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to review GitLab merge requests by fetching diffs, analyzing code changes, adding comments, and managing approvals through the GitLab API. Supports comprehensive merge request analysis and version comparison for automated code review workflows.3MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with GitLab repositories, manage merge requests, review code diffs, post comments, and handle issues directly through natural language.32 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with GitLab repositories, allowing them to manage merge requests and issues including listing projects, fetching MR details and diffs, adding comments, and updating MR titles and descriptions.32 npm94MIT