Gitlab MCP Server

A Model Context Protocol (MCP) server implementation

Local serverstdioPython

What is the Gitlab MCP Server?

A Model Context Protocol (MCP) server implementation

The short version

A Model Context Protocol (MCP) server for GitLab code review and project management. Provides comprehensive tools for interacting with GitLab projects, merge requests, issues, and code reviews through Claude AI.

  • GitLab Integration — - Complete GitLab API integration using python-gitlab
  • Code Review Tools — - List projects, MRs, view diffs, and add comments
  • Merge Request Management — - Create, update, and review merge requests
  • Suggestion Support — - View and apply code change suggestions
  • Issue Tracking — - Fetch and manage GitLab issues
  • Line Comments — - Add precise code review comments to specific lines

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
search_projectsSearch for GitLab projects by keyword with pagination support.
list_merge_requestsList merge requests for a specific project with pagination support. - **Parameters**: - project_id (required) - GitLab project ID - state (optional) - Filter by state: opened, closed, merged, all - author_id (optional) -
get_merge_requestFetch detailed merge request information. - **Parameters**: - project_id (required) - GitLab project ID - mr_iid (required) - Merge request IID (e.g., !123) - **Returns**: MR details including title, description, state,
get_merge_request_diffsGet code changes (diffs) for a merge request with pagination support. - **Parameters**: - project_id (required) - GitLab project ID - mr_iid (required) - Merge request IID - page (optional) - Page number for pagination (
add_merge_request_commentAdd a general comment to a merge request. - **Parameters**: - project_id (required) - GitLab project ID - mr_iid (required) - Merge request IID - comment (required) - Comment text - **Returns**: Confirmation with comment
add_merge_request_line_commentAdd a line-specific comment to merge request code. - **Parameters**: - project_id (required) - GitLab project ID - mr_iid (required) - Merge request IID - file_path (required) - File path in repository - line_number (req
get_merge_request_commentsGet all comments and discussions from a merge request, including suggestions, with pagination support. - **Parameters**: - project_id (required) - GitLab project ID - mr_iid (required) - Merge request IID - page (optiona
get_merge_request_commitsGet all commits in a merge request with pagination support. - **Parameters**: - project_id (required) - GitLab project ID - mr_iid (required) - Merge request IID - page (optional) - Page number for pagination (default: 1
update_merge_request_commentUpdate an existing merge request comment. - **Parameters**: - project_id (required) - GitLab project ID - mr_iid (required) - Merge request IID - note_id (required) - Note ID to update - comment (required) - Updated comm
reply_to_merge_request_commentReply to an existing discussion thread. - **Parameters**: - project_id (required) - GitLab project ID - mr_iid (required) - Merge request IID - discussion_id (required) - Discussion ID to reply to - comment (required) -
update_merge_requestUpdate merge request title and/or description. - **Parameters**: - project_id (required) - GitLab project ID - mr_iid (required) - Merge request IID - title (optional) - New title - description (optional) - New descripti
apply_suggestionApply a single code change suggestion. - **Parameters**: - suggestion_id (required) - Suggestion ID to apply - **Returns**: Confirmation with commit ID
apply_suggestionsApply multiple code change suggestions in batch. - **Parameters**: - suggestion_ids (required) - List of suggestion IDs to apply - **Returns**: Confirmation with commit ID and applied suggestion IDs
get_issueFetch detailed issue information. - **Parameters**: - project_id (required) - GitLab project ID - issue_iid (required) - Issue IID (e.g., #123) - **Returns**: Issue details including title, description, state, assignees,

How to install the Gitlab MCP Server

{
  "mcpServers": {
    "gitlab-review-mcp": {
      "command": "uvx",
      "args": ["--no-progress", "gitlab-review-mcp"],
      "env": {
        "GITLAB_URL": "https://gitlab.com",
        "GITLAB_PRIVATE_TOKEN": "your-token-here",
        "GITLAB_REVIEW_MCP_SHOW_LOGS": "false"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
GITLAB_URLEndpoint or connection string the server talks to.Yes
GITLAB_PRIVATE_TOKENCredential the server authenticates with.Yes
GITLAB_REVIEW_MCP_SHOW_LOGSConfiguration value read at startup.Optional

Example prompts to try

  • “Use Gitlab to search projects.”
  • “Use Gitlab to list merge requests.”
  • “Use Gitlab to get merge request.”

Frequently asked questions

A Model Context Protocol (MCP) server implementation Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.