Skip to content

MCP setupGit and releases

GitLab MCP Server

Work with GitLab issues, merge requests and pipelines from your agent through the MCP server built into GitLab itself.

npx workspacetemplates add gitlab-mcp --tool claude-code

Writes 1 file to your project root

.mcp.jsonmerge into your file8 lines · 115 BFile
{
  "mcpServers": {
    "gitlab": {
      "type": "http",
      "url": "https://gitlab.com/api/v4/mcp"
    }
  }
}

What it does

GitLab ships an MCP server inside the product, at /api/v4/mcp on your instance. An agent can read issues and merge requests, look at repository files and check CI pipelines, using the permissions of the account that signed in.

This config points at gitlab.com. For a self-managed instance, change the host. Your group owner (on GitLab.com) or administrator (self-managed) has to allow MCP server access first. Sign-in uses OAuth, so no token is stored in the config.

Example

you › Summarize merge request !482 in the web project and tell me whether its pipeline is green.

agent › !482 "Paginate the audit log" has 2 unresolved threads, both about the page size default. The latest pipeline passed on all 6 jobs, 12 minutes ago.

Questions

Why do I get a 403 error?
GitLab rejects legacy personal and project tokens here. Use the OAuth sign-in, or a fine-grained token with the MCP Execute permission.
Does it work on a self-managed instance?
Yes. Replace gitlab.com in the URL with your host, and have an administrator enable MCP access for the instance.
Can I limit what it exposes?
GitLab groups tools into toolsets and lets you choose them with a request header. Defaults cover core, merge requests, work items, repository and CI.
  • Git MCP Server

    MCP setupGit and releases

    Free
  • GitHub MCP Server

    MCP setupGit and releases

    Free
  • Git Bisect Regression

    SkillGit and releases

    Free
  • Git Conflict Resolution

    SkillGit and releases

    Free