gitlab
🦊 Model Context Protocol (MCP) server for seamless AI integration with GitLab projects, issues, MRs & more.
claude mcp add --transport stdio luiscusihuaman-gitlab-mcp-server docker run -i --rm -e GITLAB_TOKEN -e GITLAB_HOST your-docker-registry/gitlab-mcp-server:latest \
--env GITLAB_HOST="${input:gitlab_host}" \
--env GITLAB_TOKEN="${input:gitlab_token}"How to use
The GitLab MCP Server exposes a set of toolsets that let you automate and interact with GitLab APIs through the Model Context Protocol. By default, it enables a broad range of GitLab capabilities (projects, issues, merge requests, security data, users, and search) that you can selectively enable via the GITLAB_TOOLSETS environment variable or the --toolsets flag when running the binary. Use this server to automate workflows, fetch project and group data, manage issues and MRs, and incorporate GitLab information into AI-assisted tasks. When running in Docker or VS Code agent mode, you wire up credentials (token and host) and choose which toolsets are exposed to the AI tool you’re using, tailoring access to your security and productivity needs.
How to install
Prerequisites:
- Docker installed and running (recommended for quick setup).
- A GitLab Access Token with the required scopes (api, read_repository, write_repository, etc.).
Installation steps:
-
Prerequisites check
- Ensure Docker is installed: https://www.docker.com/get-started
- Generate a GitLab token with appropriate scopes for your use case.
-
Run via Docker (recommended):
-
Replace the image path with your published image when available:
docker run -i --rm
-e GITLAB_TOKEN=<YOUR_TOKEN>
-e GITLAB_HOST=<YOUR_GITLAB_HOST_OR_EMPTY>
-e GITLAB_TOOLSETS=<comma-separated-toolsets-or-all>
your-docker-registry/gitlab-mcp-server:latest -
If you want to set toolsets, you can do so via the environment variable GITLAB_TOOLSETS (e.g., "issues,merge_requests,projects"), or omit it to use the default (all toolsets).
-
-
Build from source (Go):
-
Clone the repository
-
Navigate to the repository root
-
Build the server: go build -o gitlab-mcp-server ./cmd/gitlab-mcp-server
-
Run the binary with environment variables:
/path/to/gitlab-mcp-server stdio
-e GITLAB_TOKEN=<YOUR_TOKEN>
-e GITLAB_HOST=<YOUR_GITLAB_URL_OR_EMPTY>
-e GITLAB_TOOLSETS="issues,merge_requests,projects" -
If you built the binary, you can configure your MCP client (VS Code, Claude) to point to this executable using the provided examples in the README.
-
Additional notes
Notes and tips:
- Toolsets: The server exposes groups of capabilities (projects, issues, merge_requests, security, users, search). Use GITLAB_TOOLSETS or the stdio flag to enable only what you need, reducing context size and improving tool selection.
- Dynamic tool discovery (if implemented): You may enable dynamic toolsets to expose tools progressively. Use the dynamic-toolsets flag or environment variable as described in the README when supported.
- Docker usage: Ensure the image path is updated to your published image. Use --rm for cleaner container lifecycle and map environment variables securely.
- Host value: If you are connecting to a self-hosted GitLab instance, provide the full host URL in GITLAB_HOST; leave empty for gitlab.com defaults.
- Security: Never hard-code tokens in your config. Use environment variables or secret management in your orchestration layer.
- If you plan to run in Claude Desktop or similar clients, follow the examples in the README to pass tokens and host values either via env or inline as shown.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go