# Connect GitLab with Unblocked to give AI agents codebase context

URL: https://getunblocked.com/integrations/gitlab/

Unblocked integrates with GitLab to give AI coding agents and developers cited context from your repositories and merge requests — alongside your docs, tickets, and conversations.

---

## GitLab integration details

- **Category:** Source code
- **Indexed data:** repositories, merge requests, code history
- **Supported products:** GitLab.com · GitLab Self-Managed (Enterprise plan)
- **Works with:** Claude Code, Cursor, Windsurf, GitHub Copilot, Codex, VS Code — via one MCP server connection
- **Content reviewed:** July 20, 2026
- **Documentation:** <https://docs.getunblocked.com/data-sources/gitlab>
- **Website:** <https://gitlab.com>

## What the GitLab integration adds

GitLab gives an agent both the current implementation and the merge-request history that shaped it. Unblocked retrieves those records together, helping an agent distinguish the code that is authoritative now from the discussions that explain why it changed.

GitLab context doesn’t live alone. Unblocked links merge requests and their discussions to the code they touch, then combines them with your docs, tickets, and conversations from every other connected source. Instead of raw search results, agents and developers get one reconciled answer with GitLab sources cited.

Once connected, any MCP-compatible coding agent — Claude Code, Cursor, Windsurf, GitHub Copilot, Codex — can pull this context through a single Unblocked MCP server connection.

### What you get

- **Repository context** — Unblocked indexes your source code and keeps it current as you push commits. The default branch is the source of truth.
- **Merge request history** — Every merge request and its discussion becomes searchable context. Agents can reference past MRs to understand why code works the way it does.
- **Decision tracing** — Unblocked traces decisions back to the merge request discussions behind them, so answers explain recent changes rather than just describing the diff.
- **Cross-source synthesis** — GitLab data is combined with Slack threads, Jira tickets, Confluence docs, and Sentry errors into a single knowledge graph.

## How to connect GitLab to Unblocked

Prerequisites:

- An Unblocked account (free to start).
- A GitLab account with access to the group whose repositories you want to index. GitLab Self-Managed requires the Enterprise plan.
- An MCP-compatible coding agent (Claude Code, Cursor, Windsurf, etc.) to use the context in your editor.

### Step 1: Connect GitLab to Unblocked

1. Navigate to Team Settings → Data Sources in Unblocked and select GitLab.
2. Authorize the Unblocked app via OAuth (sign in to GitLab if prompted). This lets Unblocked read your groups and repositories but doesn’t index anything yet.
3. Select the group or account whose repositories you want Unblocked to use.
4. Choose the repositories to index — Unblocked preselects repos active in the last 6 months; forks and archived repos are excluded — then click Save and Continue. Full index completes in minutes.

See the complete setup guide, screenshots, and troubleshooting: <https://docs.getunblocked.com/data-sources/gitlab>

### Step 2: Install the Unblocked MCP server

On macOS, one command auto-detects and configures your supported agents (Claude Code, Cursor, Windsurf, GitHub Copilot, Codex, VS Code):

```bash
curl -fsSL https://getunblocked.com/install-mcp.sh | bash
```

The install script supports macOS only. On Windows or Linux, add the server manually using the configuration below, or follow the manual install guide: <https://docs.getunblocked.com/unblocked-mcp/mcp-overview#install-windows-%2F-linux-%2F-other>

Claude Code — add the remote server, then run /mcp in Claude Code, select unblocked, and log in via OAuth:

```bash
claude mcp add -s user --transport http unblocked https://getunblocked.com/api/mcpsse
```

Cursor — open View: Open MCP Settings → Add Custom MCP, add the server, then click Connect to authenticate via OAuth:

```json
{
  "mcpServers": {
    "unblocked": {
      "url": "https://getunblocked.com/api/mcpsse"
    }
  }
}
```

Any MCP-compatible client (Windsurf, Codex, VS Code, Claude Desktop, and others) can connect to the remote server with OAuth: `https://getunblocked.com/api/mcpsse`

## Connect GitLab to Claude Code, Cursor, and other AI agents

To give Claude Code, Cursor, GitHub Copilot, Codex, or another MCP-compatible AI coding agent access to GitLab context, connect GitLab to Unblocked and add the single Unblocked MCP server to your agent.

Unblocked acts as the MCP context layer for your GitLab data, searching repositories, merge requests, code history alongside your other connected sources and returning cited results through these tools:

- **`context_research`** — Multi-source research across your GitLab repositories, merge requests, docs, and messaging. Returns a synthesized answer with citations, so agents understand not just what the code does but why it changed.
- **`context_get_urls`** — Fetches the full content behind GitLab merge request and file URLs your agent encounters — plus Jira, Linear, Notion, Confluence, Slack, and more.

## Questions to ask an AI agent about GitLab

Questions you (or your agent) can ask Unblocked about your GitLab data:

- "Why was the retry logic changed in the payments service, and which MR introduced it?"
- "What decisions were made about the database migration approach?"
- "Which merge requests have touched the auth module in the last 30 days?"
- "What did the discussion on !1204 conclude about backward compatibility?"

## Related integrations

- [GitHub](https://getunblocked.com/integrations/github/) — Repositories, pull requests, issues, discussions, and full code history — indexed, kept in sync on every push, and cited in answers.
- [Bitbucket](https://getunblocked.com/integrations/bitbucket/) — Repositories and pull requests from Bitbucket Cloud and Data Center — kept current as your team pushes, and cited as sources in answers.
- [Azure DevOps](https://getunblocked.com/integrations/azure-devops/) — Azure DevOps repositories and pull requests as cited context, so agents and developers can ask how the code works and why it changed.
- [GitLab Pipelines](https://getunblocked.com/integrations/gitlab-pipelines/) — The CI Failure Agent analyzes failed GitLab pipeline runs on your selected projects and posts root-cause reports to the merge request.

## Get started with Unblocked

- Start a free trial: <https://getunblocked.com/dashboard/get-started>
- Pricing: <https://getunblocked.com/pricing/>
- Documentation: <https://docs.getunblocked.com/data-sources/gitlab>
- All integrations: <https://getunblocked.com/integrations/>
