Skip to main content

GitLab MCP server

Project description

mcp-gitlab-server

⚠️ Development Stage Notice
This project is currently in development stage. Features and APIs may change without notice. Use with caution in production environments.

GitLab MCP server based on python-gitlab.

Install

{
  "mcpServers": {
    "GitLab": {
      "command": "uvx",
      "args": [
        "gitlab-mcp-server"
      ],
      "env": {
        "GITLAB_TOKEN": "<your GitLab personal access token>",
        "GITLAB_URL": "https://gitlab.com"
      }
    }
  }
}

For self-hosted GitLab instances, set GITLAB_URL to your GitLab instance URL (e.g., https://gitlab.example.com). If not set, it defaults to https://gitlab.com.

Authentication

  1. Create a GitLab Personal Access Token:

    • Go to GitLab → User Settings → Access Tokens
    • Create a token with read_api scope (minimum required)
  2. Set the GITLAB_TOKEN environment variable to your token value

Tools

  • list_projects - List GitLab projects accessible to the authenticated user (supports filtering by owned/starred and pagination)
  • list_groups - List GitLab groups accessible to the authenticated user
  • list_group_projects - List all projects within a specific GitLab group
  • get_user_info - Get information about the authenticated user
  • search_repositories - Search for GitLab repositories by name, description, or keywords
  • get_repository_details - Get detailed information about a specific repository

Development

# Clone the repository
git clone <repo-url>
cd gitlab-mcp-server

# Install dependencies
uv sync

# Run in development mode
uv run python -m mcp_gitlab_server

Testing Configuration

For development and testing purposes, you can use a local wheel file installation:

MCP Configuration for Testing:

{
  "mcpServers": {
    "GitLab": {
      "command": "uvx",
      "args": [
        "--from", "/path/to/your/gitlab-mcp-server/dist/mcp_gitlab_server-0.1.0-py3-none-any.whl",
        "gitlab-mcp-server"
      ],
      "env": {
        "GITLAB_TOKEN": "your-gitlab-token-here",
        "GITLAB_URL": "https://gitlab.com"
      }
    }
  }
}

Build and Test Steps:

# Build the wheel file
uv build

# Test with MCP client (like Claude Desktop)
# Update your MCP configuration with the local wheel path
# The wheel file will be in ./dist/ directory

# For quick testing, verify the server starts:
uv run python -m mcp_gitlab_server

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_gitlab_server-0.0.1.tar.gz (34.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_gitlab_server-0.0.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file mcp_gitlab_server-0.0.1.tar.gz.

File metadata

  • Download URL: mcp_gitlab_server-0.0.1.tar.gz
  • Upload date:
  • Size: 34.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mcp_gitlab_server-0.0.1.tar.gz
Algorithm Hash digest
SHA256 19d93576572aed74bd377960b4675525eca549c9fe41d508f5c6ea4d99017030
MD5 cac466419db61d3c084d764067703c11
BLAKE2b-256 5dd29d323d4fc66a02aebe677e2168075841347637449f049fe5d5ccb75a247f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_gitlab_server-0.0.1.tar.gz:

Publisher: publish.yml on kopiloto/mcp-gitlab-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_gitlab_server-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_gitlab_server-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 459dbd248feedb8f80d298d1ae1e41337c23ab7b170a8f73861879e0434ac95c
MD5 ab86d01fd86be4d426ae3879b9a6a8f1
BLAKE2b-256 3a0d485c43fee8973024878afe384c7777cbefe1d0a70c85bfddf498820bcbfe

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_gitlab_server-0.0.1-py3-none-any.whl:

Publisher: publish.yml on kopiloto/mcp-gitlab-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page