A Model Context Protocol (MCP) server for interacting with GitLab merge requests and issues. This project implements a server using the Model Context Protocol (MCP) that allows AI agents to interact with GitLab repositories. It provides tools for: - Listing available GitLab projects - Fetching merge request details and comments - Getting merge request diffs - Adding comments to merge requests - Ad
Add this skill
npx mdskills install kopfrechner/gitlab-mr-mcpWell-documented MCP server with comprehensive GitLab tools and clear setup instructions
1[](https://mseep.ai/app/kopfrechner-gitlab-mr-mcp)23[](https://github.com/kopfrechner/gitlab-mr-mcp/stargazers)4[](LICENSE)5[](https://smithery.ai/server/@kopfrechner/gitlab-mr-mcp)67# ๐ GitLab MR MCP89A Model Context Protocol (MCP) server for interacting with GitLab merge requests and issues.1011## ๐ Overview1213This project implements a server using the Model Context Protocol (MCP) that allows AI agents to interact with GitLab repositories. It provides tools for:1415- Listing available GitLab projects16- Fetching merge request details and comments17- Getting merge request diffs18- Adding comments to merge requests19- Adding line-specific comments to code in merge request diffs20- Fetching issue details21- Setting merge request title and description2223## ๐ฆ Installation2425### โก Using Smithery2627To install GitLab MR MCP for Claude Desktop automatically via Smithery:2829```bash30npx -y @smithery/cli@latest install @kopfrechner/gitlab-mr-mcp --client claude --config '"{\"gitlabMrMcpToken\":\"YOUR_GITLAB_TOKEN\", \"gitlabMrMcpHost\": \"YOUR_GITLAB_HOST\"}"'31```3233### ๐ ๏ธ Manual Installation3435#### ๐ง Prerequisites3637- Node.js38- GitLab access token with API access39- GitLab project ID(s)4041#### ๐ Setup42431. Clone this repository442. Install dependencies:4546```bash47npm install48```49503. Add the following to your MCP client configuration:51```json52{53 "mcpServers": {54 "gitlab-mr-mcp": {55 "command": "node",56 "args": ["/path/to/gitlab-mr-mcp/index.js"],57 "env": {58 "MR_MCP_GITLAB_TOKEN": "your_gitlab_token",59 "MR_MCP_GITLAB_HOST": "your_gitlab_host"60 }61 }62 }63}64```6566## ๐ ๏ธ Available Tools6768* `get_projects`69 Gets a list of GitLab projects accessible with your token.7071* `list_open_merge_requests`72 Lists all open merge requests in the specified project.7374* `get_merge_request_details`75 Gets detailed information about a specific merge request.7677* `get_merge_request_comments`78 Gets comments from a specific merge request, including discussion notes and diff notes.7980* `add_merge_request_comment`81 Adds a general comment to a merge request.8283* `add_merge_request_diff_comment`84 Adds a comment to a specific line in a file within a merge request.8586* `get_merge_request_diff`87 Gets the diff for a merge request.8889* `get_issue_details`90 Gets detailed information about a specific issue.9192* `set_merge_request_title`93 Set the title of a merge request9495* `set_merge_request_description`96 Set the description of a merge request9798## ๐๏ธ Development99100### ๐ Running Inspector101102Set up environment variables:103104```bash105export MR_MCP_GITLAB_TOKEN=your_gitlab_token106export MR_MCP_GITLAB_HOST=your_gitlab_host107108# Optional env vars to filter the projects the `get_projects` tool has access to:109# https://docs.gitlab.com/api/access_requests/#valid-access-levels110export MR_MCP_MIN_ACCESS_LEVEL=min_access_level111# Search term that should match the project path or name112export MR_MCP_PROJECT_SEARCH_TERM=term113```114115For use with MCP clients, you can run:116117```bash118npx -y @modelcontextprotocol/inspector npm start119```120121## ๐ ๏ธ Troubleshooting122123If you encounter permissions issues (403 Forbidden), check:1241251. Your GitLab token has the proper scopes (api, read_api)1262. The token user has proper access to the projects1273. The project IDs are correct128129## ๐ License130131[MIT](LICENSE)132133## ๐ค Contributing134135Contributions are welcome! Please feel free to submit a Pull Request.136137
Full transparency โ inspect the skill content before installing.