Truth in IT
    • Sign In
    • Register
        • Videos
        • Channels
        • Pages
        • Galleries
        • News
        • Events
        • All
Truth in IT Truth in IT
  • Data Management ▼
    • Converged Infrastructure
    • DevOps
    • Networking
    • Storage
    • Virtualization
  • Cybersecurity ▼
    • Application Security
    • Backup & Recovery
    • Data Security
    • Identity & Access Management (IAM)
    • Zero Trust
    • Compliance & GRC
    • Endpoint Security
  • Cloud ▼
    • Hybrid Cloud
    • Private Cloud
    • Public Cloud
  • Webinar Library
  • TiPs
  • DRAW

Fix C++ Bugs with GitLab MCP and Claude Code

Gitlab
10/12/2026
0 (0%)
Share
  • Comments
  • Download
  • Transcript
Report Like Favorite
  • Share/Embed
  • Email
Link
Embed

Transcript


I'm a Developer Advocate here at GitLab, and in today's video, we want to look into Cloud Code and GitLab, specifically context with the GitLab MCP server. In the previous video, which I will link in the description, we looked into the Tanuki IoT platform already and the Arduino IoT collector crashing. There is a specific issue open for that, which we will look into in the next steps. Now we want to connect that into Cloud Code, and by default, Cloud Code might not know about this, but there is one way to bring more agentic context into Cloud Code, and this is MCP, so the Model Context Protocol. GitLab provides a GitLab MCP server for that purpose, and there's also documentation available to make that happen with Cloud Code directly. So this specific command for Cloud to add a GitLab MCP server. I will show you that in the terminal right now, I've prepared it already, so we want to work against GitLab.com, and we can run that configuration. Now we know it has been added, and then let's start Cloud again, and type in slash MCP to manage that server. GitLab is disabled. Let's enable that, and it also needs authentication. Let's go back, authenticate. It will open a browser window. Let's authorize that, close the browser window, go back into Cloud Code. Authentication is successful. Now that this works, we can immediately put it to test. Remember, we are working or looking at issue number four, so quick check here, issue number four, and in Cloud Code, I can say, I need help with fixing issue four. Please help. And we can see that it's building up a strategy here. It will attempt, or it reads the Git configuration and invokes a tool call. So we can see it uses the GitLab MCP server here and the git underscore issue tool call in order to get an insight of what's going on. So it knows immediately the issue is about the Arduino IoT collector. It crashes with an uncalled exception when the Arduino port isn't found. It immediately read that from the GitLab instance, can either be gitlab.com, self-managed, dedicated. It's available everywhere, and we can see we get to fixing much faster here. The problem is clear, and it wants us, or it starts immediately with a fix. First, it catches the exception here. So a try and catch block is introduced. It now goes ahead and actually wants to create a new Git branch. Yes, please do that. And it wants to create a merge request. The first thing we need to do is to git push and set the upstream origin, which happens with the dash U here. So the local branch is tracking the remote branch and pushes that. Now we could go ahead and click on the URL, which is a little unreadable here in blue, but we also have the GitLab MCP server configured, which has to create merge request tool, which we can see here, and it can use that. So let's prove that. I'm authenticated against the GitLab server. So the merge request has been created. It's linked to issue number four. Here's a summary for the root cause. It implemented a fix, and we can open the merge request here. And we can see there's a summary, a test plan. It was generated with cloud code. And the good thing is, again, GitLab workflow kicks in. The CI-CD pipelines are running, so we can follow the progress along here to verify that the source code works. We can also see that an approval is required here from a code review perspective. And last but not least, we see GitLab 2.18 platform with the code review flow automatically triggering on a merge request. So any change that's being made is, again, reviewed against the, for example, the development style guide for C++ and any specific other requirements necessary for code reviews. We will also see in a little bit that there is, well, not in a little bit, we can see actually that it kicked off GitLab advanced test and also the advanced test scanner for C++. So we can make sure that the code is not introducing any security vulnerabilities or regressions or whatnot. And from there, let's peek into our sessions. We can either go here or on the right-hand side, we have the GitLab 2 sessions that are running. And we can see that it's reason, or that the agents are reasoning in the background, providing a summary. And as I've shown this, the review completed, the try and catch block properly handles Arduino sensor initialization failures. Error logging is correct. And it also uses, for example, smart pointers with STD unique pointer, which is a requirement in the code review instructions. And that's fine. And we can also see that when advanced test finishes, that everything works out. If I cannot wait, pressing Command R sometimes also is helpful, but doesn't speed up the CICD pipelines. But yeah, so we can see this is a fix for the initial problem. And we can then move further and loop in more custom agents and flows from the GitLab 2 agent platform. But essentially this video just showed the pipelines are passing. We can approve the changes. And then I could click on merge and have the same nice integration. What I can also do before I close off here, we have to merge request now. Go back to Claude and say, is the merge request running okay? Or something similar to avoid the context switch. Now it uses a different tool to get the merge request pipelines. So essentially fetching the state. Merge is green and ready to merge. So I wouldn't order, it's not necessary for me to do the context switch from the terminal directly into the GitLab UI. I could have just stayed here in the terminal, create the merge request and then check in on the merge request status while I'm already working on something else. So this is a great integration showing the GitLab MCP server together with Claude code, avoiding context switches, get the best of both tools, both worlds. And yeah, I hope you've learned something new today and let us know how things are going. Yeah, thanks for watching and see you next time.

TL;DR

  • GitLab's MCP server can be added to Claude Code in minutes, enabling OAuth-authenticated access to issues, repositories, and pipelines directly from the terminal.
  • Claude Code uses MCP tool calls to automatically fetch GitLab issue context, diagnose C++ bugs, and implement fixes using try-catch blocks and smart pointers without manual copy-paste.
  • Merge requests are created natively via MCP, complete with branch creation, upstream push, issue linking, and an AI-generated summary and test plan — all from the CLI.
  • CI/CD pipelines, GitLab Duo automated code reviews, and Advanced Test security scans trigger automatically on the MR, and their status can be queried back through Claude Code to avoid context switching.

GitLab MCP Server Setup and Authentication

This walkthrough demonstrates how to connect Claude Code to GitLab repositories using the Model Context Protocol (MCP), eliminating the need to context-switch between a terminal and a web browser during development. Developer Advocate Michael Friedrich begins by registering the GitLab MCP server endpoint in Claude Code, enabling it against GitLab.com, and completing OAuth authentication via a browser prompt. Once authenticated, Claude Code gains real-time, agentic access to GitLab issues, project metadata, and CI/CD pipelines — all queryable directly from the terminal CLI. The setup applies equally to GitLab.com, self-managed, and dedicated GitLab instances.

C++ Bug Fix and Merge Request Workflow

With the MCP server active, Michael prompts Claude Code to help fix issue number four — a crash in the Arduino IoT collector caused by an unhandled exception when an Arduino port is not found. Claude Code automatically invokes the GitLab MCP `get_issue` tool call to retrieve the issue description, diagnoses the root cause, and implements a fix using a try-catch block and C++ smart pointers (std::unique_ptr), satisfying the project's code review style guide requirements. It then creates a new Git branch, commits the changes, pushes to the remote with upstream tracking, and uses the MCP `create_merge_request` tool to open a structured MR linked directly to issue four — complete with a generated summary and test plan, all without leaving the terminal.

CI/CD Pipelines and GitLab Duo Code Review

Once the merge request is created, GitLab's standard CI/CD workflow triggers automatically. Michael demonstrates how GitLab Duo performs an automated code review against the C++ development style guide, confirming that the try-catch block correctly handles Arduino sensor initialization failures and that smart pointer usage meets project requirements. GitLab Advanced Test and the Advanced Test Scanner for C++ also run to check for security vulnerabilities and regressions. Finally, Michael queries Claude Code directly — asking whether the merge request pipeline is passing — and receives a confirmation that the MR is green and ready to merge, demonstrating that the entire review-and-merge cycle can be monitored from the terminal without ever opening the GitLab UI.

Chapters

0:00 - Introduction & Demo Overview
0:48 - Adding the GitLab MCP Server
1:32 - OAuth Authentication
2:05 - Querying Issue Details via MCP
3:04 - C++ Bug Fix with Try-Catch
3:40 - Creating the Merge Request
4:48 - CI/CD Pipelines & Duo Code Review
7:44 - Checking Pipeline Status & Wrap-Up

Key Quotes

0:39 "There is one way to bring more agentic context into Cloud Code, and this is MCP, so the Model Context Protocol."
2:43 "It knows immediately the issue is about the Arduino IoT collector. It crashes with an uncalled exception when the Arduino port isn't found. It immediately read that from the GitLab instance."
6:38 "It also uses, for example, smart pointers with STD unique pointer, which is a requirement in the code review instructions."
8:08 "Merge is green and ready to merge. So I wouldn't order, it's not necessary for me to do the context switch from the terminal directly into the GitLab UI."
8:33 "This is a great integration showing the GitLab MCP server together with Claude code, avoiding context switches, get the best of both tools, both worlds."

FAQ

Does the GitLab MCP server work with self-managed or dedicated GitLab instances, or only GitLab.com?

According to the demo, the GitLab MCP server works with GitLab.com, self-managed GitLab instances, and GitLab Dedicated — the integration is not limited to the SaaS offering.

What does Claude Code actually do with the GitLab MCP server — does it just read issues, or can it write back to GitLab?

Claude Code can both read and write. In the demo it reads issue details using the `get_issue` tool call and writes back to GitLab by creating a Git branch, pushing commits, and opening a merge request using the `create_merge_request` MCP tool — all from the terminal.


Categories:
  • » Cybersecurity » Application Security
  • » Data Protection
Channels:
News:
Events:
Tags:
  • Demo
  • DevSecOps
  • AI & Machine Learning
  • Technical Deep Dive
  • How-To
  • Model Context Protocol
  • MCP
  • Claude Code integration
  • GitLab MCP server
  • C++ bug fixing
  • AI-assisted code review
  • CI
  • CD pipeline automation
  • Merge request automation
  • GitLab Duo
Show more Show less

Browse videos

  • Related
  • Featured
  • By date
  • Most viewed
  • Top rated
  •  

              Video's comments: Fix C++ Bugs with GitLab MCP and Claude Code

              Upcoming 360 View Events

              • Nov
                19

                360View: Govern, Secure & Recover Your Microsoft 365 Environment

                11/19/202601:00 PM ET
                More events

                XStreaminars (watch here)

                • Oct
                  28

                  EnvZero: Near-Zero Time to Resolution--Live Agentic Remediation for Failed and Drifted Infrastructure

                  10/28/202601:00 PM ET
                  More events

                  Industry Events (Sponsor Hosted)

                  • Oct
                    13

                    Ensuring Compliance: Audit Evidence from CJIS to FERPA

                    10/13/202601:00 PM ET
                    • Oct
                      15

                      Risk in Real Time Demo Series: Virtual Patching: Protection at the Speed of Exploitation

                      10/15/202611:00 AM ET
                      • Oct
                        20

                        Harnessing Data Governance for AI with Cyera and Snowflake

                        10/20/202611:00 AM ET
                        • Oct
                          27

                          Maximize Your Microsoft Investment for Security and Growth

                          10/27/202611:00 AM ET
                          • Oct
                            27

                            The HUMAN Experience: Real-Time Insights into Page Intelligence

                            10/27/202601:00 PM ET
                            More events

                            Upcoming Webinar Calendar

                            • 10/13/2026
                              01:00 PM
                              10/13/2026
                              Ensuring Compliance: Audit Evidence from CJIS to FERPA
                              https://www.truthinit.com/index.php/channel/2159/ensuring-compliance-audit-evidence-from-cjis-to-ferpa/
                            • 10/15/2026
                              11:00 AM
                              10/15/2026
                              Risk in Real Time Demo Series: Virtual Patching: Protection at the Speed of Exploitation
                              https://www.truthinit.com/index.php/channel/1372/risk-in-real-time-demo-series-the-autonomous-era-orchestrating-a-resilient-enterprise/
                            • 10/20/2026
                              11:00 AM
                              10/20/2026
                              Harnessing Data Governance for AI with Cyera and Snowflake
                              https://www.truthinit.com/index.php/channel/2137/harnessing-data-governance-for-ai-with-cyera-and-snowflake/
                            • 10/27/2026
                              11:00 AM
                              10/27/2026
                              Maximize Your Microsoft Investment for Security and Growth
                              https://www.truthinit.com/index.php/channel/2178/maximize-your-microsoft-investment-for-security-and-growth/
                            • 10/27/2026
                              01:00 PM
                              10/27/2026
                              The HUMAN Experience: Real-Time Insights into Page Intelligence
                              https://www.truthinit.com/index.php/channel/2139/the-human-experience-real-time-insights-into-page-intelligence/
                            • 10/28/2026
                              01:00 AM
                              10/28/2026
                              [APAC:] Secure AI Everywhere: Visibility, governance and protection for the agentic era
                              https://www.truthinit.com/index.php/channel/2125/apac-ensuring-comprehensive-security-for-ai-applications/
                            • 10/28/2026
                              06:00 AM
                              10/28/2026
                              [EMEA:] Secure AI Everywhere: Visibility, governance and protection for the agentic era
                              https://www.truthinit.com/index.php/channel/2127/emea-ensuring-ai-security-across-all-platforms/
                            • 10/28/2026
                              01:00 PM
                              10/28/2026
                              [AMERICAS:] Secure AI Everywhere: Visibility, governance and protection for the agentic era
                              https://www.truthinit.com/index.php/channel/2126/securing-ai-across-the-americas-strategies-and-insights/
                            • 10/28/2026
                              01:00 PM
                              10/28/2026
                              EnvZero: Near-Zero Time to Resolution--Live Agentic Remediation for Failed and Drifted Infrastructure
                              https://www.truthinit.com/index.php/channel/2179/envzero-near-zero-time-to-resolution-live-agentic-remediation-for-failed-and-drifted-infrastructure/
                            • 11/04/2026
                              11:00 AM
                              11/04/2026
                              Leveraging CISA’s Zero Trust Maturity Model in an AI-Driven Landscape
                              https://www.truthinit.com/index.php/channel/2149/leveraging-cisas-zero-trust-maturity-model-in-an-ai-driven-landscape/
                            • 11/04/2026
                              11:00 AM
                              11/04/2026
                              Aligning Agentic Intent: Understanding Your Agents' Purpose vs. Their Actions
                              https://www.truthinit.com/index.php/channel/2158/aligning-agentic-intent-understanding-your-agents-purpose-vs-their-actions/
                            • 11/05/2026
                              02:00 PM
                              11/05/2026
                              HUMAN Dialogue: Embracing the Rise of the Agentic Consumer in AI
                              https://www.truthinit.com/index.php/channel/2160/human-dialogue-embracing-the-rise-of-the-agentic-consumer-in-ai/
                            • 11/05/2026
                              02:00 PM
                              11/05/2026
                              Reclaim Your Evenings: Leverage Data Intelligence to Minimize Risk and Boost AI Adoption
                              https://www.truthinit.com/index.php/channel/2172/reclaim-your-evenings-leverage-data-intelligence-to-minimize-risk-and-boost-ai-adoption/
                            • 11/19/2026
                              01:00 PM
                              11/19/2026
                              360View: Govern, Secure & Recover Your Microsoft 365 Environment
                              https://www.truthinit.com/index.php/channel/2076/360view-govern-secure-recover-your-microsoft-365-environment/
                            • 11/19/2026
                              01:00 PM
                              11/19/2026
                              Zendesk Deep Dive: Get the work done faster with Employee Service AI Agents
                              https://www.truthinit.com/index.php/channel/2181/zendesk-deep-dive-get-the-work-done-faster-with-employee-service-ai-agents/
                            Truth in IT
                            • Sponsor
                            • About Us
                            • Terms of Service
                            • Privacy Policy
                            • Contact Us
                            • Preference Management
                            Desktop version
                            Standard version