# GitLab (MCP Server)

> GitLab's built-in MCP server for projects, merge requests, work items and CI

- Type: MCP server
- Publisher: GitLab (official)
- Categories: Development, DevOps & Cloud
- Website: https://docs.gitlab.com/user/model_context_protocol/mcp_server/
- Docs: https://docs.gitlab.com/user/model_context_protocol/mcp_server_tools/
- Transport: streamable-http
- Server URL: https://gitlab.com/api/v4/mcp
- Launch command: npx mcp-remote https://gitlab.com/api/v4/mcp
- Sign-in: oauth
- Listed: 2025-11-20

## About

GitLab ships a native MCP server at /api/v4/mcp on GitLab.com, Self-Managed and Dedicated instances (beta, GitLab 18.6+). It authenticates each user via OAuth 2.0 Dynamic Client Registration and exposes toolsets for merge requests, work items, repositories, CI and optional Duo Agent Platform, wiki and code security tools.

## Install

1. **Connect it in ChatGPT** Turn on Developer mode in ChatGPT (Settings → Security and login), open Plugins, select + and paste https://gitlab.com/api/v4/mcp as the MCP server URL, then sign in with OAuth. Add it to a chat from the composer's tools menu.

2. **Or add it to Codex or the API**

   Codex CLI:

   ```bash
   codex mcp add gitlab --url https://gitlab.com/api/v4/mcp
   codex mcp login gitlab
   ```

   config.toml:

   ```toml
   [mcp_servers.gitlab]
   url = "https://gitlab.com/api/v4/mcp"
   ```

   Responses API:

   ```python
   import os
   from openai import OpenAI
   
   client = OpenAI()
   
   response = client.responses.create(
       model="gpt-6-astra",
       tools=[{
           "type": "mcp",
           "server_label": "gitlab",
           "server_url": "https://gitlab.com/api/v4/mcp",
           "authorization": os.environ["GITLAB_API_KEY"],
           "require_approval": "never",
       }],
       input="Summarize merge request !42 in my project",
   )
   print(response.output_text)
   ```

## Tools

- `get_mcp_server_version`
- `get_project`
- `add_commit`
- `get_merge_request`
- `save_merge_request`
- `save_note`
- `list_work_items`
- `save_work_item`
- `search`
- `semantic_search`
- `start_duo_session`
- `get_duo_session`

## Example prompts

- "Summarize merge request !42 in my project"
- "Create a work item for the login timeout bug"
- "Search the codebase for where we validate API tokens"
- "Add a review note to the open merge request"

## Related

- [Chrome DevTools MCP](https://chatgptplugins.directory/mcp/chrome-devtools.md): Let coding agents control and debug a live Chrome browser
- [Playwright MCP](https://chatgptplugins.directory/mcp/playwright.md): Browser automation for agents via Playwright accessibility snapshots
- [GitHub](https://chatgptplugins.directory/mcp/github.md): Manage repos, issues, pull requests and Actions from your AI agent
- [Context7](https://chatgptplugins.directory/mcp/context7.md): Pull up-to-date, version-specific library docs into your coding agent
- [Supabase](https://chatgptplugins.directory/mcp/supabase.md): Manage Supabase databases, migrations, edge functions and logs
- [Stripe](https://chatgptplugins.directory/mcp/stripe.md): Query and act on your Stripe account and search Stripe docs from any agent

---
Source: https://chatgptplugins.directory/mcp/gitlab · Index: https://chatgptplugins.directory/llms.txt · Independent and community-run. Not affiliated with or endorsed by OpenAI. ChatGPT is a trademark of OpenAI.
