harshmaur

@harshmaur/gitlab-mcp

Community harshmaur
Updated

MCP server for using the GitLab API

18 tools
Name Description
create_or_update_file Create or update a single file in a GitLab project
search_repositories Search for GitLab projects
create_repository Create a new GitLab project
get_file_contents Get the contents of a file or directory from a GitLab project
push_files Push multiple files to a GitLab project in a single commit
create_issue Create a new issue in a GitLab project
create_merge_request Create a new merge request in a GitLab project
fork_repository Fork a GitLab project to your account or specified namespace
create_branch Create a new branch in a GitLab project
get_merge_request Get details of a merge request
get_merge_request_diffs Get the changes/diffs of a merge request
update_merge_request Update a merge request
get_issue Get details of an issue in a GitLab project
get_merge_request_discussions Get all discussions in a merge request
create_merge_request_discussion Create a new discussion in a merge request, optionally with a suggestion
create_merge_request_note Add a note to a merge request
apply_suggestion Apply a suggestion from a discussion
get_merge_request_version Get version information for a merge request, including commit SHAs

@harshmaur/gitlab-mcp

smithery badge

GitLab MCP(Model Context Protocol) Server.

Installation and Execution

Installing via Smithery

To install GitLab MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @harshmaur/gitlab-mcp --client claude

Manual Installation

npx @harshmaur/gitlab-mcp

Environment Variable Configuration

Before running the server, you need to set the following environment variables:

GITLAB_PERSONAL_ACCESS_TOKEN=your_gitlab_token
GITLAB_API_URL=your_gitlab_api_url  # Default: https://gitlab.com/api/v4

License

MIT License

How to use

Using with Claude App, Cline, Roo Code

When using with the Claude App, you need to set up your API key and URLs directly.

{
  "mcpServers": {
    "GitLab communication server": {
      "command": "npx",
      "args": ["-y", "@harshmaur/gitlab-mcp"],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "your_gitlab_token",
        "GITLAB_API_URL": "your_gitlab_api_url"
      }
    }
  }
}

Using with Cursor

When using with Cursor, you can set up environment variables and run the server as follows:

env GITLAB_PERSONAL_ACCESS_TOKEN=your_gitlab_token GITLAB_API_URL=your_gitlab_api_url npx @harshmaur/gitlab-mcp
  • GITLAB_PERSONAL_ACCESS_TOKEN: Your GitLab personal access token.
  • GITLAB_API_URL: Your GitLab API URL. (Default: https://gitlab.com/api/v4)

MCP Server · Populars

MCP Server · New