home / mcp / gitlab mcp server

GitLab MCP Server

A fully-typed TypeScript MCP server for comprehensive GitLab API integration with Claude Desktop. Manage projects, issues, merge requests, CI/CD pipelines, and job logs with advanced features for large-scale DevOps workflows.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "alosies-gitlab-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@alosies/gitlab-mcp-server"
      ],
      "env": {
        "GITLAB_BASE_URL": "https://gitlab.mycompany.com",
        "NPM_CONFIG_TOKEN": "YOUR_TOKEN"
      }
    }
  }
}

You can integrate GitLab data and actions into your workflow with a fully typed MCP server. It exposes projects, issues, merge requests, pipelines, jobs, and repository data through a clean, strongly typed interface so you can automate, query, and act on GitLab resources from your MCP client.

How to use

With the GitLab MCP Server you connect from an MCP client to perform common GitLab operations. You will authenticate with your GitLab token or via a self-hosted GitLab base URL, then issue requests like listing projects, viewing open issues, creating merge requests, commenting on MRs, and retrieving job logs. You interact through your MCP client’s standard endpoints, receiving structured data and status updates that match GitLab concepts.

How to install

Prerequisites you need before installing: Node.js and npm installed on your machine.

1) Prepare the MCP server configuration for Claude Desktop. Use the following JSON snippet to enable the GitLab MCP Server via the standard MCP setup.

{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": ["-y", "@alosies/gitlab-mcp-server"],
      "env": {
        "NPM_CONFIG_TOKEN": "your-gitlab-token-here"
      }
    }
  }
}

Additional configuration for self-hosted GitLab

If you are running a self-hosted GitLab instance, you can point the MCP server to your base URL while keeping the same MCP server package. Use the following configuration snippet in Claude Desktop to specify your GitLab base URL.

{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": ["-y", "@alosies/gitlab-mcp-server"],
      "env": {
        "NPM_CONFIG_TOKEN": "your-token",
        "GITLAB_BASE_URL": "https://gitlab.mycompany.com"
      }
    }
  }
}

Available tools

Projects

List projects and fetch detailed information about each project.

Issues

List, get details, and create issues within projects.

Merge Requests

List, get, create, and update merge requests with full review workflow support; includes comments and discussions management.

Pipelines

List, get, create, retry, cancel, or delete pipelines.

Jobs

List jobs and retrieve logs with advanced tracing options.

Repository

List branches and get commits for repository inspection.

User

Get information about the currently authenticated user.