GitLab MCP Server. Connects AI Agents to GitLab via HTTP for managing Projects, Issues, and MRs.
587
This is a Model Context Protocol (MCP) Server designed to connect AI Agents and clients (like Claude Desktop, Cursor, and VS Code) to your GitLab infrastructure safely. It acts as a bridge, allowing your AI to interact seamlessly with GitLab APIs using a standard interface.
Built with .NET 9.0, this container uses an HTTP (Server-Sent Events) transport mechanism on the /api/mcp endpoint, making it highly compatible with modern networking and container-based tooling like the Docker MCP Toolkit.
Note: This server handles operations for GitLab Projects, Merge Requests, and Issues robustly.
/api/mcp endpoint.MCP_SERVER_API_KEY for client connection, and a GITLAB_TOKEN (provided globally or per-request).To run the server in the background and bind it to localhost port 8080, run the following command. You need to provide a custom Secret API Key to secure the connection and, optionally, a default GitLab Private Token.
docker run -d -p 8080:8080 \
-e ASNETCORE_URLS="http://+:8080" \
-e MCP_SERVER_API_KEY="your_secure_secret_password" \
-e GITLAB_TOKEN="your_personal_gitlab_token" \
-e GITLAB_URL="https://gitlab.com" \
--name gitlab-mcp-server \
alissonstocheroarq/gitlab-mcp:0.2.0
💡 TIP for Multi-Client/Multi-User environments: If this server is going to be used by multiple different users or AI clients simultaneously, it is highly recommended NOT to set a global
GITLAB_TOKENenvironment variable on the backend container. Instead, leave it out of the arguments and require each user/client to securely pass their own Private Token in theX-GitLab-Tokenheader. This ensures proper access control and audit logging in GitLab.
If no GITLAB_TOKEN is exported globally, clients must send the token via the X-GitLab-Token header on every request.
When the container is running locally, point your AI tools to the HTTP endpoint using your MCP_SERVER_API_KEY and GITLAB_TOKEN.
For detailed code examples on how to inject mcp.json into VS Code, Cursor, Codex CLI, or GitHub Copilot, please check the Official Client Documentation on GitHub.
get_projectslist_open_merge_requestsget_merge_request_detailsget_merge_request_commentsadd_merge_request_commentadd_merge_request_diff_commentget_merge_request_diffset_merge_request_titleset_merge_request_descriptionapprove_merge_requestget_issue_detailsThe full source code, architecture details, and contribution guidelines are available on the repository: AlissonStochero/gitlab_mcp.
Content type
Image
Digest
sha256:c5a6a6f64…
Size
90 MB
Last updated
9 months ago
docker pull alissonstocheroarq/gitlab-mcp:0.2