Skip to content

gitlab-api

typed connector for the GitLab REST and GraphQL APIs.

Official documentation

This site is the canonical reference for gitlab-api, maintained alongside every release.

PyPI MCP Server License GitHub

Overview

gitlab-api wraps the GitLab REST and GraphQL surface with typed, deterministic MCP

  • Api — a Python client (gitlab_api.api_client.Api) composed from per-domain mixins covering projects, repositories, merge requests, pipelines, environments, issues, users, and groups.
  • Action-routed MCP tools — consolidated, togglable tool modules (branches, commits, merge requests, pipelines, releases, runners, and more) that minimize token overhead in LLM contexts.

The connector remains inactive when credentials are absent: configure GITLAB_URL and GITLAB_TOKEN to connect it to a GitLab instance.

Explore the documentation

Quick start

pip install "gitlab-api[mcp]"
gitlab-mcp                        # stdio MCP server (default transport)

Connect it to a GitLab instance:

export GITLAB_URL=https://gitlab.example.com
export GITLAB_TOKEN=<your-gitlab-token>
gitlab-mcp --transport streamable-http --host 0.0.0.0 --port 8000

See Installation and Deployment for the proxy, DNS).