What Codex can do with GitLab
Ask your agent in plain language. Each of these maps to a real tool on the server.
- Ask Codex to use the list deployments tool in GitLab
- Ask Codex to use the manage job tool in GitLab
- Ask Codex to use the list jobs tool in GitLab
- Ask Codex to use the get pipeline tool in GitLab
- Ask Codex to use the manage ci/cd variables tool in GitLab
Add the GitLab MCP server to Codex
Run these once. Afterwards, everyone you give access to signs in the same way.
1. Enable GitLab in Metorial
In your Metorial portal, enable the GitLab MCP server and sign in with the account that owns the data. Access stays governed by your team policies.
2. Add the server and sign in
The Codex CLI, IDE extension and ChatGPT desktop app share this config.
codex mcp add metorial --url <your-magic-mcp-url>codex mcp login metorial3. Check the connection
Type /mcp in Codex to see Metorial and its GitLab tools.
Give your team GitLab in Codex
Once GitLab is enabled in Metorial, teammates sign in with SSO and get the same connection in Codex, with only the tools their role allows.
One link covers every app you approve. See how the MCP gateway handles access, roles and audit logs for the whole company.
GitLab tools available in Codex
Full descriptions and inputs are on the GitLab MCP server page.
- Create Release: Create a new release for a project, or list existing releases.
- Manage Pipeline: Trigger, retry, or cancel a CI/CD pipeline.
- Manage Project: Create, update, fork, or delete a GitLab project.
- Manage Issue: Create, update, close, reopen, or delete a GitLab issue.
- List Merge Requests: List GitLab merge requests, optionally scoped to a project.
- Manage Merge Request: Create, update, or merge a GitLab merge request.
- List Issues: List GitLab issues filtered by project, state, labels, milestone, assignee, author, or search term.
- List Pipelines: List CI/CD pipelines for a project.
- Add Comment: Add a comment (note) to an issue or merge request.
- Get Project: Retrieve detailed information about a specific GitLab project by its ID or URL-encoded path (e.g.
- Browse Repository: Browse a project's repository tree, read file contents, or compare branches.
- Manage Branch: List, create, or delete branches in a project repository.
- Search: Search across GitLab for projects, issues, merge requests, milestones, code (blobs), commits, wiki content, and users.
- List Groups: List GitLab groups accessible to the authenticated user.
- List Projects: List GitLab projects accessible to the authenticated user.
- And 15 more on the GitLab MCP server page.
Using GitLab tools in Codex
What to expect once GitLab is connected.
- Limit which GitLab tools Codex sees with enabled_tools and disabled_tools on the metorial server in config.toml.
- Set default_tools_approval_mode to auto, prompt, writes or approve. writes prompts only for tools that are not marked read-only.
- Type /mcp in the composer to see the connected servers.
- Override the approval behavior for a single GitLab tool with tools.<tool>.approval_mode.
Troubleshooting Codex
- Metorial is listed but tools are missing
- Codex can connect without credentials and then see nothing. Run codex mcp login metorial to complete the OAuth sign-in.
- Metorial times out at startup
- Codex waits 10 seconds by default. Raise startup_timeout_sec under [mcp_servers.metorial] in ~/.codex/config.toml.
- Long tool calls fail after a minute
- The default tool timeout is 60 seconds. Raise tool_timeout_sec for the metorial server in config.toml.
Based on the Codex MCP documentation.
Frequently asked questions
Common questions about connecting GitLab to AI agents with Metorial.
Does Codex support the GitLab MCP server?
Yes. Codex connects to the GitLab MCP server through one CLI command, pointed at your Metorial URL. You need the Codex CLI, IDE extension or ChatGPT desktop app.Do I need an API key to connect GitLab to Codex?
No. You sign in to GitLab once through Metorial, and Codex uses that connection. No API keys go into Codex's settings.Which GitLab tools can Codex use?
All 30 GitLab tools your team allows, such as Create Release, Manage Pipeline, Manage Project. Admins can narrow that list per team.Can I control which teammates use GitLab in Codex?
Yes. Role-based access control decides who can use GitLab and which of its tools appear in Codex, and every call is logged with the person's identity.What if Codex doesn't show GitLab tools?
Codex can connect without credentials and then see nothing. Run codex mcp login metorial to complete the OAuth sign-in.
GitHub
Linear