How to Connect Codex to GitLab (and What It Can't Do)
Mostly yes — but not natively. OpenAI Codex is GitHub-first: cloud tasks, @codex mentions, and automatic PR reviews all assume a connected GitHub account. There is no equivalent built-in GitLab connection. What you can do is wire Codex to GitLab through the official GitLab MCP server, which GitLab ships as part of the platform (introduced as an experiment in GitLab 18.3, beta since 18.6). Once connected, Codex can pull issue context, read merge requests, and open MRs from your terminal. It works — GitLab even published its own walkthrough of fixing bugs with Codex in May 2026. But it’s a developer setup end to end, and it stops at session-scoped coding tasks: Codex won’t watch your pipelines overnight or send anyone an MR digest.
Here’s the real state of Codex + GitLab, how to wire it up, where it falls short, and what to use for the operational layer around your GitLab activity.
What Codex can actually do with GitLab
Since the standalone Codex app merged into the single ChatGPT app on July 9, 2026, Codex runs as a surface inside ChatGPT on every plan, metered against your plan’s usage allowance — and it supports MCP servers across the CLI, desktop app, and IDE extension. That’s the door GitLab walks through. With the GitLab MCP server connected, Codex can:
- Pull issue context into a session — fetch an issue’s description, requirements, and discussion so you don’t paste them in by hand.
- Read and create merge requests — open an MR for the branch it just worked on, including linking the work (“Closes #32”) in the description.
- Interact with your GitLab projects via the API surface — repositories, issues, and MRs on gitlab.com or your self-managed instance.
- Work on GitLab-hosted repos locally regardless — Codex CLI operates on any local git checkout, so cloning from GitLab and letting Codex edit, test, and commit has always worked. The MCP server adds the GitLab-side context (issues, MRs) that plain git can’t see.
There’s also a second, more enterprise-shaped path: GitLab’s Duo Agent Platform can run Codex as an external agent inside the GitLab UI itself — addressing review feedback in an MR, committing fixes to the branch, and posting summary comments back. That’s GitLab orchestrating Codex, not Codex reaching into GitLab.
What Codex can’t do: cloud tasks and @codex mentions remain GitHub-only. There’s no “@codex” in a GitLab issue thread, and no automatic Codex review when an MR opens.
How to set it up
This is a terminal-and-config job, per GitLab’s own guide:
- Make sure the MCP server is enabled on your GitLab instance or top-level group (it’s on for gitlab.com).
- Add the server to Codex over HTTP transport:
codex mcp add --url "https://gitlab.com/api/v4/mcp" GitLab(swap in your own host if self-managed). - Enable the remote-MCP client feature in
~/.codex/config.tomlif your Codex version requires it. - Run
/mcpinside Codex to authenticate via OAuth.
Rough edges exist — there are open Codex issues about specific version combinations failing during initialization — so expect occasional debugging. If you don’t live in a terminal, none of this is for you.
The limits that actually matter
- No native integration means no event layer. GitHub gets
@codexon PRs and automatic reviews; GitLab gets a session-scoped MCP connection. Nothing fires when an MR opens, a pipeline fails, or an issue is filed — you have to be at the keyboard, mid-session, asking. - It’s a coding-task engine, not a GitLab ops manager. Codex will fix the bug in issue #32 and open the MR. It won’t triage incoming issues to the right person, chase stale MRs, or send your team a Friday summary of what merged.
- The setup assumes a developer. CLI commands, config.toml edits, feature flags, OAuth flows, MCP protocol versions. This is plumbing for engineers, not a connect button for an operator.
Codex + GitLab MCP is great for “pull issue #32, fix it, open the MR.” It is not built for “keep the team and the stakeholders on top of what’s happening in GitLab.”
If you want GitLab work handled by an assistant: Carly
The moment you want GitLab activity handled — a merged MR that triggers a stakeholder update, a failed pipeline that becomes a Slack alert, a weekly release summary that emails itself — you’ve crossed past what a coding agent is for.
That’s where Carly fits. Carly is an AI executive assistant built to act on triggers across your whole stack, set up by conversation instead of config files:
- No-code setup. Tell Carly “every morning, email me a digest of failed GitLab pipelines” or “when an MR merges to main, post a summary to Slack” in plain English; it interviews you and builds the workflow. No MCP server, no config.toml.
- Fires on events, 24/7, in the cloud — when something happens in GitLab, Carly acts; nothing to keep running on your machine.
- Connects GitLab to the rest of your work — repo activity flows into email, calendar, Slack, and project trackers like Linear or Jira.
- Actually sends and updates — drafts and sends email (Gmail and Outlook), posts messages, files tasks, updates records.
AI agents start at $35/month, and workflow steps that don’t use AI run free and unlimited. Carly connects to 200+ tools natively — including GitLab — and reaches anything else via your own API key.
Codex + GitLab vs Carly
| Codex (GitLab via MCP) | Carly | |
|---|---|---|
| Native GitLab support | No (MCP server required) | Yes (/integrations/gitlab) |
| Purpose | Write and fix code with GitLab context | Handle GitLab + ops work |
| Setup | CLI, config.toml, OAuth, feature flags | Describe it in plain English |
| Reads issues & MRs | Yes (in-session) | Yes |
| Acts on triggers (pipeline fails, MR merges) | No | Yes |
| Sends digests / updates the team | No | Yes (email, Slack) |
| Runs without your machine | No (MCP is local-session) | Yes (cloud, 24/7) |
| Built for | Developers | Execs, EAs, operators |
| Pricing | ChatGPT plan (usage-metered) | AI agents from $35/mo |
Codex-with-GitLab is a coding agent that can see your GitLab context during a session. Carly is an assistant that works your GitLab activity into the rest of your day.
Frequently Asked Questions
Does OpenAI Codex integrate with GitLab natively?
No. Codex’s built-in code-hosting integration is GitHub-only — cloud tasks, @codex mentions, and automatic PR reviews all require a connected GitHub account. GitLab support comes via the official GitLab MCP server, which you add to Codex yourself.
How do I connect Codex to GitLab?
Add GitLab’s MCP server over HTTP: codex mcp add --url "https://gitlab.com/api/v4/mcp" GitLab, then authenticate with /mcp inside Codex. Your GitLab instance or top-level group needs the MCP server enabled (beta since GitLab 18.6). GitLab’s blog walkthrough covers the full flow.
Can Codex review my GitLab merge requests automatically?
Not the way it reviews GitHub PRs. There’s no automatic-review toggle for GitLab. GitLab’s Duo Agent Platform can run Codex as an external agent to address feedback inside an MR, but that’s driven from GitLab’s side, not a Codex feature you flip on.
Can Codex alert me when a GitLab pipeline fails?
No. The MCP connection is session-scoped — Codex acts when you’re in a session asking it to. For trigger-based GitLab automation (pipeline failure alerts, MR digests, issue routing), use an agent platform like Carly, which connects to GitLab natively and runs 24/7 in the cloud.
More: Codex + GitHub · Codex + Bitbucket · Codex + Slack · Claude + GitLab · ChatGPT MCP explained · Codex alternatives
Ready to automate your busywork?
Carly schedules, researches, and briefs you—so you can focus on what matters.
See what people say
"Before Carly, I relied on a Calendly link, but the whole process felt impersonal and not very professional. Carly changed that by handling all the back-and-forth, so I'm no longer stuck in endless email threads trying to line up schedules.
Now Carly reaches out to candidates, shares my real-time availability, lets them pick a slot, then sends a Zoom link and drops it straight into my calendar. She sends reminders to both of us before each call, which has significantly reduced no-shows and last-minute confusion.
On top of scheduling, Carly acts like a full executive assistant, sending me my schedule the night before so I can prepare for each call. It reminds me of the old x.ai assistant, but Carly is noticeably smarter, faster, and better suited to my healthcare recruitment business."


