gitlab.com
gitlab.com logo

GitLab

Control repositories, merge requests, and issues via GitLab API.

Created byApr 23, 2025

GitLab MCP Server

MCP Server for the GitLab API, enabling project management, file operations, and more.

Features

  • Automatic Branch Creation: When creating/updating files or pushing changes, branches are automatically created if they don't exist
  • Comprehensive Error Handling: Clear error messages for common issues
  • Git History Preservation: Operations maintain proper Git history without force pushing
  • Batch Operations: Support for both single-file and multi-file operations

Tools

  1. create_or_update_file
  1. push_files
  1. search_repositories
  1. create_repository
  1. get_file_contents
  1. create_issue
  1. create_merge_request
  1. fork_repository
  1. create_branch

Setup

Personal Access Token

Create a GitLab Personal Access Token with appropriate permissions:
  • Go to User Settings > Access Tokens in GitLab
  • Select the required scopes:
  • Create the token and save it securely

Usage with Claude Desktop

Add the following to your claude_desktop_config.json:

Docker

NPX

Build

Docker build:

Environment Variables

  • GITLAB_PERSONAL_ACCESS_TOKEN: Your GitLab personal access token (required)
  • GITLAB_API_URL: Base URL for GitLab API (optional, defaults to https://gitlab.com/api/v4)

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

GitLab MCP Server

MCP Server for the GitLab API, enabling project management, file operations, and more.

Features

  • Automatic Branch Creation: When creating/updating files or pushing changes, branches are automatically created if they don't exist
  • Comprehensive Error Handling: Clear error messages for common issues
  • Git History Preservation: Operations maintain proper Git history without force pushing
  • Batch Operations: Support for both single-file and multi-file operations

Tools

  1. create_or_update_file
  1. push_files
  1. search_repositories
  1. create_repository
  1. get_file_contents
  1. create_issue
  1. create_merge_request
  1. fork_repository
  1. create_branch

Setup

Personal Access Token

Create a GitLab Personal Access Token with appropriate permissions:
  • Go to User Settings > Access Tokens in GitLab
  • Select the required scopes:
  • Create the token and save it securely

Usage with Claude Desktop

Add the following to your claude_desktop_config.json:

Docker

NPX

Build

Docker build:

Environment Variables

  • GITLAB_PERSONAL_ACCESS_TOKEN: Your GitLab personal access token (required)
  • GITLAB_API_URL: Base URL for GitLab API (optional, defaults to https://gitlab.com/api/v4)

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.