GitLab API + MCP Server + A2A Agent for the agent-utilities ecosystem — a typed, action-routed connector for the GitLab REST and GraphQL APIs.
!!! info "Official documentation"
This site is the canonical reference for gitlab-api, maintained alongside every
release.
gitlab-api wraps the GitLab REST and GraphQL surface with typed, deterministic MCP
tools and an optional Pydantic-AI agent server. It provides:
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.
- An A2A agent server — a Pydantic-AI graph agent (console script
gitlab-agent) that calls the MCP tool surface and exposes an AG-UI web interface.
The connector remains inactive when credentials are absent: configure GITLAB_URL
and GITLAB_TOKEN to connect it to a GitLab instance.
- :material-rocket-launch: Installation — pip, source, extras, and the prebuilt Docker image.
- :material-server-network: Deployment — run the MCP and agent servers, Docker Compose, Caddy + Technitium.
- :material-console: Usage — the MCP tools, the
Apiclient, and the CLI. - :material-database-cog: Backing Platform — deploy GitLab with Docker.
- :material-shield-check: Connector preparation — bounded, governed source ingest.
- :material-sitemap: Overview — the action-routed tool surface and architecture.
- :material-tag-multiple: Concepts — the
CONCEPT:GL-*registry.
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 8000See Installation and Deployment for the full matrix (PyPI extras, Docker image, all transports, the agent server, reverse proxy, DNS).