# GitLab MCP

> Lets your agent work in GitLab: issues and work items, merge requests and reviews, the repository and CI/CD pipelines.

GitLab's own MCP server, built into GitLab. Your agent connects to it and works with your projects as you: issues, epics, tasks and other work items, merge requests and reviews, the repository, and CI/CD pipelines. It's on the Free, Premium and Ultimate tiers, on GitLab.com, GitLab Self-Managed and GitLab Dedicated.

What you can do with it
- Find, create and update issues, tasks, epics and other work items, link them and comment on them
- List, create and update merge requests, read their diffs, commits, pipelines and conflicts, review them with diff comments, and merge them
- Browse the repository: files, the file tree, branches, commits, tags and releases, and add branches and commits
- Check pipelines and jobs, read job logs and artifacts, and run, retry or cancel pipelines
- Search across GitLab, and list projects, groups, members and labels
- With GitLab Duo Agent Platform, start and follow Duo agent sessions; on Ultimate, list and triage vulnerabilities

How it connects
On GitLab.com it's at https://gitlab.com/api/v4/mcp over HTTP. On GitLab Self-Managed or GitLab Dedicated, use https://<your instance>/api/v4/mcp instead. Sign-in is OAuth: the first time your agent connects, it registers itself with GitLab and you approve the request in your browser. A fine-grained personal access token with the MCP tool permission works too. Agents that only speak stdio can connect through npx mcp-remote.

Good to know
- On GitLab.com, access to the MCP server is on by default for top-level groups. A group Owner can turn it off under Settings, General, Permissions and group features.
- Every tool checks your project and namespace permissions when it's called.
- You can limit the tools it offers with the X-Gitlab-Enabled-Mcp-Server-Toolsets header: core, merge_requests, work_items, repository and ci by default, plus opt-in wikis, code_security and orbit.
- GitLab asks you to guard against prompt injection: use its tools only on GitLab objects you trust.

- Type: Plugin
- Made by: Gitlab
- Category: Developer tools
- Formats: Remote MCP
- Version: 0.0.1
- Website: https://docs.gitlab.com/user/model_context_protocol/mcp_server/
- Source: https://gitlab.com/gitlab-org/gitlab
- Page: https://pluginboard.ai/plugins/gitlab-mcp

## Works with

- ChatGPT
- Claude
- Muse
- Grok Bot
- Gemini
- Grok
- GitHub Copilot
- Cursor
- Claude Code
- Codex
- Antigravity
- Gemini CLI
- Replit
- OpenClaw
- OpenCode
- Hermes Agent

## Install

### ChatGPT

In ChatGPT on the web: Plugins → + → Add custom MCP server, then paste https://gitlab.com/api/v4/mcp under Connection. Business and Enterprise plans; Pro can add read-only servers.

### Claude

In Claude (web or desktop): Customize → Connectors → Add custom connector, then paste https://gitlab.com/api/v4/mcp

### Muse

In Muse: In a Muse chat, ask it to create a custom connector for the MCP server at https://gitlab.com/api/v4/mcp. Then tap Connect on the card it shows and sign in, or add your key.

### Grok Bot

In Grok Bot: In a chat with your Bot, say "Add this MCP server: https://gitlab.com/api/v4/mcp". It confirms the details with you and sets it up, and the tools are ready from your next message.

### Gemini

In Gemini: At gemini.google.com: Settings → Connected Apps → Add a custom app, then paste https://gitlab.com/api/v4/mcp

### Grok

In Grok on the web: At grok.com/connectors: New Connector → Custom, then enter https://gitlab.com/api/v4/mcp and sign in if it asks.

### GitHub Copilot

Add to VS Code: vscode:mcp/install?%7B%22name%22%3A%22gitlab-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fgitlab.com%2Fapi%2Fv4%2Fmcp%22%7D

Copilot CLI:

```shell
copilot mcp add --transport http gitlab-mcp https://gitlab.com/api/v4/mcp
```

### Cursor

Add to Cursor: cursor://anysphere.cursor-deeplink/mcp/install?name=gitlab-mcp&config=eyJ1cmwiOiJodHRwczovL2dpdGxhYi5jb20vYXBpL3Y0L21jcCJ9

Add to .cursor/mcp.json:

```json
{
  "mcpServers": {
    "gitlab-mcp": {
      "url": "https://gitlab.com/api/v4/mcp"
    }
  }
}
```

### Claude Code

Run in your terminal:

```shell
claude mcp add --transport http gitlab-mcp https://gitlab.com/api/v4/mcp
```

### Codex

Run in your terminal:

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

### Antigravity

Add to ~/.gemini/config/mcp_config.json:

```json
{
  "mcpServers": {
    "gitlab-mcp": {
      "url": "https://gitlab.com/api/v4/mcp"
    }
  }
}
```

### Gemini CLI

Run in your terminal:

```shell
gemini mcp add --transport http gitlab-mcp https://gitlab.com/api/v4/mcp
```

### Replit

In Replit: At replit.com/integrations, open MCP Servers → + Add MCP server, paste https://gitlab.com/api/v4/mcp (add any headers under Advanced settings), then click Test & save.

### OpenClaw

Run in your terminal:

```shell
openclaw mcp add gitlab-mcp --url https://gitlab.com/api/v4/mcp --transport streamable-http
```

If it needs a key or sign-in: For https://gitlab.com/api/v4/mcp, add --header NAME=value for each header it needs, or --auth oauth and then run openclaw mcp login gitlab-mcp.

### OpenCode

Run in your terminal:

```shell
opencode mcp add gitlab-mcp --url https://gitlab.com/api/v4/mcp
```

If it needs a key: For https://gitlab.com/api/v4/mcp, add --header 'NAME=value' for each header it needs. Add --global to use it in every project.

### Hermes Agent

Run in your terminal:

```shell
hermes mcp add gitlab-mcp --url https://gitlab.com/api/v4/mcp
```

Add to ~/.hermes/config.yaml:

```json
{
  "mcp_servers": {
    "gitlab-mcp": {
      "url": "https://gitlab.com/api/v4/mcp"
    }
  }
}
```

If it signs in with OAuth: If https://gitlab.com/api/v4/mcp asks you to sign in, add --auth oauth to the command, or auth: oauth to its entry.

---
From Pluginboard (https://pluginboard.ai).
