Use GitLab with AI via MCP
GitLab keeps code, planning and CI/CD in one place, which makes it a dense knowledge source for engineering teams. The MCP server is built into GitLab itself and is currently in beta; CompanyGPT connects to it via OAuth.
What is GitLab?
GitLab is a DevOps platform that combines version control, issue and epic planning, code review through merge requests, CI/CD pipelines, a container registry and security scanning in a single application. It is built by GitLab Inc. and comes both as a hosted offering on gitlab.com and as a self-managed installation that many organizations in the DACH region run in their own data center or cloud.
Because planning and delivery live in the same platform, GitLab holds relationships that would otherwise be scattered across systems: an epic points to issues, which point to merge requests, which are tied to pipeline runs. For AI agents this chain is exactly what makes the platform valuable – it allows answers that reach from the business requirement all the way to what has shipped.
Connection at a Glance
- MCP server
- Official (GitLab), part of the instance
- Availability
- Beta – tool coverage may still change
- Transport
- Streamable HTTP
- Authentication
- OAuth 2.0 with dynamic client registration
- Operating model
- SaaS (gitlab.com) and self-managed – beta without feature flags since 18.6 (previously an experiment from 18.3)
How to Connect GitLab to CompanyGPT
GitLab ships an official MCP server that is not operated separately but forms part of the GitLab application itself. It is reachable under the API path gitlab.com/api/v4/mcp; for self-managed installations the same path applies under your own instance URL – as a beta without feature flags since GitLab 18.6, and previously as an experiment from 18.3. GitLab Duo with beta features enabled is a prerequisite. Transport is streamable HTTP.
According to the vendor, the server is in beta. In practice that means it is usable, but the set of exposed tools is still growing and may change between versions. We recommend starting the integration with a clearly scoped use case and evolving the functional coverage from there.
Sign-in uses OAuth with dynamic client registration, so CompanyGPT can register as a client without a manually created application. Every user authorizes with their own GitLab account and therefore only sees projects and groups they are entitled to anyway. Who may use the integration in the first place is controlled by your administrators in CompanyGPT via roles and groups.
Typical Use Cases
How AI agents in CompanyGPT work with GitLab
Put merge requests in context
Ahead of a review, the agent summarizes what a merge request changes functionally, which issue sits behind it and which discussion points are still open.
Narrow down pipeline failures
After a failed CI run, the agent pulls status and error output of the affected jobs and names the likely cause – without switching to the web interface.
Status report for project leads
A project lead asks about the state of an epic and receives an overview of the related issues, their status and the most recently merged changes.
Frequently Asked Questions
GitLab and AI – the most important answers
Does GitLab have an official MCP server?
Yes. GitLab ships an official MCP server as part of the platform. It is reachable under the API path /api/v4/mcp and is currently in beta.
Does this work with our self-managed instance?
Yes. Since GitLab 18.6 the MCP endpoint has been available in self-managed installations as a beta without feature flags under your own instance URL; before that it was available from 18.3 as an experiment. GitLab Duo with beta features enabled is a prerequisite. CompanyGPT is then connected to that URL instead of gitlab.com.
What does beta status mean for production use?
The server is usable, but the tool coverage keeps evolving and may change between GitLab versions. We recommend a clearly scoped initial use case and accompany the further rollout.
Does the AI see every project on our GitLab instance?
No. Authorization happens per user via OAuth, so the agent only reaches projects and groups the respective account is entitled to. Existing permission structures remain untouched.
Do we have to create an OAuth application in GitLab first?
Usually not – the server supports dynamic client registration, so CompanyGPT registers itself as a client. For restrictively configured instances we align the approach with your IT team.
Related Integrations
Development & DevOps
GitLab and Your AI – GDPR-Compliant with CompanyGPT
CompanyGPT is the enterprise AI assistant in your own cloud tenant: all relevant AI models, your company data and integrations like GitLab – centrally managed, with roles and permissions. We set up the connection together with you.
GitLab is a trademark of its respective owner (GitLab Inc.). Its mention describes compatibility and does not imply any partnership or endorsement. Availability and scope of the connection depend on the respective vendor.
