JUHE API Marketplace
lucky-dersan avatar
MCP Server

GitLab MCP Server

Provides GitLab integration for AI assistants using Model Context Protocol, enabling repository operations, file management, issue tracking, merge requests, and branch/tag administration through natural language.

2
GitHub Stars
8/22/2025
Last Updated
MCP Server Configuration
1{
2 "name": "gitlab",
3 "command": "docker",
4 "args": [
5 "run",
6 "--rm",
7 "-i",
8 "-e",
9 "GITLAB_TOKEN",
10 "-e",
11 "GITLAB_URL",
12 "gitlab-mcp-server:latest"
13 ],
14 "env": {
15 "GITLAB_TOKEN": "token",
16 "GITLAB_URL": "https://gitlab.com/"
17 }
18}
JSON18 lines

README Documentation

GitLab MCP Server (in Python)

Model Context Protocol (MCP) server for GitLab integration, built on FastMCP.

This server is implemented in Python, with fastmcp.

Quick Start

  1. Build the Docker image:
docker build -t gitlab-mcp-server .

Integration with Cursor/Claude

In MCP Settings -> Add MCP server, add this config:

{
  "mcpServers": {
    "gitlab": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "GITLAB_TOKEN",
        "-e",
        "GITLAB_URL",
        "gitlab-mcp-server:latest"
      ],
      "env": {
        "GITLAB_TOKEN": "token",
        "GITLAB_URL": "https://gitlab.com/"
      }
    }
  }
}

Note: Don't forget to replace GITLAB_TOKEN and GITLAB_URL values with your actual GitLab credentials and instance URL.

Getting GitLab Token

  1. Log in to your GitLab account
  2. Go to Settings -> Access Tokens
  3. Create a new token:
    • Scopes: select the necessary permissions:
      • api - for API access
      • read_repository - for reading repositories
      • write_repository - for writing to repositories
  4. Click "Create personal access token"
  5. Copy the generated token (it will be shown only once!)

Functions

  • ✅1.create_repository
  • ✅2.fork_repository
  • ✅3.delete_repository
  • ✅4.search_repositories
  • ✅5.create_or_update_file
  • ✅6.push_files
  • ✅7.get_file_contents
  • ✅8.create_issue
  • ✅9.get_issues
  • ✅10.create_merge_request
  • ✅11.get_merge_request_diff
  • ✅12.create_branches
  • ✅13.delete_branches
  • ✅14.create_tags
  • ✅15.delete_tags

Quick Install

Quick Actions

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source