home / mcp / gitlab mcp server

GitLab MCP Server

Fork with more tools and streaming http

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "atla-digital-mcp-gitlab": {
      "url": "http://host.docker.internal:3001/mcp",
      "headers": {
        "PORT": "3000",
        "NODE_ENV": "development",
        "LOG_LEVEL": "info",
        "X-GitLab-URL": "https://your-gitlab-instance.com",
        "AXIOS_TIMEOUT": "30000",
        "X-GitLab-Token": "YOUR_GITLAB_TOKEN",
        "SESSION_MAX_AGE": "604800000",
        "ENABLE_DETAILED_ERRORS": "false",
        "ENABLE_REQUEST_LOGGING": "true",
        "SESSION_CLEANUP_INTERVAL": "300000"
      }
    }
  }
}

You have an MCP Server that lets you interact with GitLab from a programmable interface. It provides structured workflows, code review actions, issue and project management, and full CI/CD integration, enabling you to automate and streamline GitLab development tasks with guided steps and consistent practices.

How to use

You connect an MCP client to the GitLab MCP Server and start performing GitLab operations through guided, workflow-driven commands. Typical tasks include listing projects, inspecting merge requests, retrieving diffs, adding comments or internal notes to reviews, and triggering pipelines. When paired with an MCP workflow, you follow established steps for each operation, ensuring consistency and traceability across your development process.

How to install

Choose your preferred deployment method and follow these steps.

# Option 1: Using Pre-built Docker Image (Recommended)

# Pull the latest image
docker pull ghcr.io/atla-digital/mcp-gitlab:latest

# Run the container
docker run -d -p 3001:3000 --name mcp-gitlab-server ghcr.io/atla-digital/mcp-gitlab:latest

Access the MCP endpoint at the address below to configure clients and automation scripts.

# Option 2: Using Docker Compose

# docker-compose.yml
services:
  mcp-gitlab:
    image: ghcr.io/atla-digital/mcp-gitlab:latest
    ports:
      - "3001:3000"
    restart: unless-stopped
```

Then start the service with the following command.

Additional configuration and runtimes

You can configure access and behavior through environment variables and explicit MCP connection endpoints. The server supports HTTP transport for remote access and can be connected via a standard MCP URL provided by your client tooling.

If you plan to connect Claude Code or similar tooling, you will use an HTTP MCP URL and pass necessary headers for GitLab access, such as your GitLab API token and GitLab URL. The server exposes an endpoint at the MCP path you deploy.

Configuration details

Configure the MCP client to point at the server’s MCP endpoint and provide any required authentication headers. Typical integration steps include setting the MCP URL, the GitLab API token, and the GitLab instance URL. The server supports standard HTTP-based MCP connections and maintains session state for long-running workflows.

Notes on security and maintenance

Keep the MCP endpoint reachable only to your trusted tooling and team members. Use access controls and tokens to guard GitLab credentials. Regularly rotate tokens and monitor logs for unusual activity. The server offers structured logging and error handling to assist with debugging and maintenance.

Troubleshooting tips

If you cannot connect to the MCP endpoint, verify that the container is running and that port 3001 is accessible from your client. Check that your GitLab token is valid and has the required API scopes. Review logs for authentication or network errors and confirm that the MCP URL matches your deployment.

Available tools

gitlab_get_merge_request

Retrieve details for a specific merge request in a given project.

gitlab_get_merge_request_changes

Fetch the changes/files touched by a merge request.

gitlab_create_merge_request_discussion

Create a line-specific discussion or comment on a merge request.

workflow_get_step

Query the current step in an MCP-Workflow guided process.

gitlab_list_projects

List projects accessible with the configured GitLab API token.