Gitlab MCP Server
This server lets an AI assistant search and execute GitLab actions through MCP, covering GitLab REST and GraphQL operations across Free, Premium, Ultimate, self-managed, and GitLab.com.
Search the local GitLab action catalog with
gitlab_find_actionwithout calling GitLab, including schemas, hints, destructive flags, parameter guidance, and execute examples.Execute a specific GitLab action by canonical ID or alias with
gitlab_execute_action, passing action-specific parameters as an object.Work with GitLab domains such as projects, issues, merge requests, pipelines, CI variables, releases, and more, with up to 1,103 actions.
Require explicit
confirm=truefor destructive actions and support guard rails such as read-only mode, safe mode, excluded tools, and confirmation before destructive operations.Paginate list results using page metadata such as
has_moreandnext_page.Use it with MCP clients such as Claude, Cursor, VS Code, Codex, and other clients over stdio or HTTP.
Compatible with Windsurf (Codeium's editor), enabling GitLab operations through the MCP server within the AI-assisted development environment.
Supports integration with VS Code through GitHub Copilot, allowing AI-assisted GitLab operations directly within the development environment via MCP server configuration.
Provides comprehensive GitLab REST API v4 coverage with 1006 tools across 162 domain sub-packages, enabling AI assistants to manage projects, branches, tags, releases, merge requests, issues, pipelines, jobs, groups, users, wikis, environments, deployments, packages, container registry, runners, and more through natural language commands.
Supports integration with JetBrains IDEs through the AI Assistant MCP configuration, allowing GitLab operations within IntelliJ-based development environments.
GitLab MCP Server
All of GitLab for your AI assistant. Up to 1,103 actions over GitLab's REST and GraphQL APIs, from Free to Ultimate and on GitLab.com, in one self-contained binary that works with Claude, Cursor, VS Code, Codex and any other MCP client. You ask in plain language; it does the GitLab work.
11,343 tokens of startup context by default, the same on every GitLab tier (1,941 with GITLAB_MCP_CAPABILITY_SURFACE=minimal). Two tools reach the whole catalog, where listing every tool as its own costs from 576,788 to 734,051 tokens. Measured with the cl100k_base tokenizer and checked in CI. How it is measured
"Review merge request !15: is it safe to merge?" · "Why did the last pipeline fail?" · "List open issues assigned to me" · "Generate release notes from v1.0 to v2.0"
Why this server
Every tier and every instance. Free/CE, Premium and Ultimate, self-managed or GitLab.com with its Orbit knowledge graph. The tier is detected and the catalog follows it.
The token you already have. A personal, project or group access token with
api, orread_apifor the actions GitLab accepts from it; a fine-grained token, judged action by action from its grant; OAuth in HTTP mode. Each action's tool reference entry says which scope and which fine-grained permissions it needs.Guard rails. Read-only mode, safe mode (a preview of each write instead of the write), tools excluded by name, and a confirmation before anything destructive.
Three surfaces, two transports. Two discovery tools by default, one tool per domain or one per action; stdio for a desktop client, or HTTP for a shared deployment that keeps each credential apart. 45 resources and 37 prompts besides.
Releases you can verify. Signed checksums, an SBOM per binary and build provenance for every artifact.
Related MCP server: GitLab MCP Server
Install
The buttons register the Docker image, so they need Docker; the Claude Desktop row downloads a native extension instead. Create a personal access token with the api scope (or read_api for the actions GitLab accepts from it; add GITLAB_MCP_READ_ONLY=true when nothing may be written).
Claude Code. The registration command never carries the token: -e GITLAB_TOKEN forwards it from the environment Claude Code hands docker.
export GITLAB_TOKEN=glpat-xxxx
claude mcp add gitlab --transport stdio \
-- docker run -i --rm -e GITLAB_TOKEN ghcr.io/jmrplens/gitlab-mcp-server:latestAny other client runs one of these as the server's command, with GITLAB_TOKEN in the environment it passes:
npx -y @jmrp.io/gitlab-mcp-server # npm, nothing installed first
uvx jmrplens-gitlab-mcp-server # PyPI, nothing installed first
dnx gitlab-mcp-server # NuGet (.NET 10 SDK), nothing installed first
brew install jmrplens/tap/gitlab-mcp-server # Homebrew, macOS and Linux
winget install --id jmrplens.gitlab-mcp-server -e # winget, Windows
docker run -i --rm -e GITLAB_TOKEN ghcr.io/jmrplens/gitlab-mcp-server:latestFor a self-managed instance, set GITLAB_URL=https://gitlab.example.com beside the token; with the Docker image, also forward it by adding -e GITLAB_URL to the docker arguments, since the container receives only the variables named there (Docker install). Every channel, per-client configuration and verification step is in the installation guide, and an assistant installing it for you will find the same in llms.txt.
To try it first, a public instance runs at https://mcp.jmrp.io/gitlab, and the browser inspector calls it read-only after an OAuth sign-in. Your token and every request pass through that machine, so run it yourself to keep using it; the hosted endpoint page says what it is and is not.
Documentation
Everything else is at docs.jmrp.io/gitlab-mcp-server, in English and Spanish: getting started, configuration, tool surfaces, HTTP server mode, security, privacy and troubleshooting.
Contributing, security and licence
Contributions are welcome here on GitHub; CONTRIBUTING.md describes the workflow, and CODE_OF_CONDUCT.md applies. Report a vulnerability privately, as SECURITY.md describes. The server is MIT licensed (LICENSE).
Maintained by José M. Requena Plens · Project page · Hosted instance: mcp.jmrp.io/gitlab
Available Tools
2 toolsgitlab_execute_actionGitLab Execute ActionADestructiveInspect
Execute one GitLab catalog action by canonical ID or alias. Always pass params as an object. Destructive actions require top-level confirm=true. Use find first only when action or params are unclear. Example: {"action":"issue.list","params":{"project_id":"group/project"}}
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Canonical action ID returned by gitlab_find_action, or a supported compatibility alias, such as project.list, issue.update, or issue.close. | |
| params | Yes | Required action-specific parameters object validated by the selected action schema. Use an empty object for actions with no parameters. | |
| confirm | No | Set top-level confirm=true to explicitly approve destructive actions. Do not put confirm inside params for gitlab_execute_action. |
Output Schema
| Name | Required | Description |
|---|---|---|
| next_steps | No | Optional. Suggested follow-up actions or tool calls for the LLM, contextual to the result. |
| pagination | No | Present on list actions. A REST list carries the fields below: while `has_more` is true, call again with `page` set to `next_page`, or on a keyset page with `page_token` set to `next_page_token`. A GraphQL list carries cursor fields instead: while `has_next_page` is true, pass `end_cursor` as `after`. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare destructive, open-world, non-idempotent behavior. The description adds important operational context: destructive actions require top-level confirm=true, confirm must not go inside params, and params must always be an object.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short, front-loaded with the core operation, and includes a compact example. Every sentence carries routing, parameter, or safety information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex action dispatcher, it covers the essential execution vs discovery flow and destructive-action confirmation. With full schema coverage and an output schema, remaining details such as action-specific parameter shape are appropriately delegated to the selected action schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already defines action, params, and confirm. The description adds an example and reinforces that params is an object, but it does not add much beyond the structured parameter documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: execute one GitLab catalog action by canonical ID or alias. It also distinguishes the tool from its sibling by explaining when to use gitlab_find_action first.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit routing guidance: execute when the action/params are known, and use find first only when they are unclear. It also states the confirm requirement for destructive actions, leaving little ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gitlab_find_actionGitLab Find ActionARead-onlyIdempotentInspect
Search the local GitLab action catalog. Read-only and no GitLab API call. Use when the action ID or params are unclear. Returns schemas, hints, destructive flags, and execute examples. Example: {"query":"issue list"}
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of matches to return. Defaults to 20 and is capped at 50. | |
| query | Yes | Search terms combining a GitLab domain or resource with a verb, filter, or object name, such as project create, merge request approve, pipeline retry, issue delete, or ci variable. At most 256 characters: a longer query is refused, not truncated. | |
| explain | No | When true, include deterministic scoring reasons for each returned action. Defaults to false to keep responses compact. |
Output Schema
| Name | Required | Description |
|---|---|---|
| count | Yes | Number of returned matches. |
| query | Yes | Original search query. |
| results | Yes | Matching GitLab catalog actions with schemas and execute examples. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive/openWorld, so the safety profile is covered. The description adds genuinely new context: the lookup is local with no GitLab API call, and it discloses the return contents (schemas, hints, destructive flags, execute examples), which helps an agent understand cost and payoff.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads the verb and the local/no-API constraint, then the usage condition, then the return payload, ending with a minimal example. Every sentence carries distinct information with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present, return values need not be enumerated, yet the description still summarizes them; parameters are fully covered by the schema and the usage trigger is stated. Nothing an agent needs to select or call this tool is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so query/limit/explain are fully documented in the schema itself. The example {"query":"issue list"} is a concrete illustration but adds little beyond the schema's own query-format guidance, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ("Search the local GitLab action catalog") plus scope qualifiers ("local", "no GitLab API call"). The clause "Use when the action ID or params are unclear" functionally separates it from the gitlab_execute_action sibling without needing the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
"Use when the action ID or params are unclear" gives a clear triggering condition and implies the converse path (use execute when they are clear). It stops short of naming the alternative tool or stating exclusions explicitly, so it is clear context rather than a full routing rule.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v3.3.0- Changed
gitlab_execute_action7 fields changed- changed
Output schema / properties / pagination / descriptionPrevious value: -"Present on list actions. Use `has_more` and `next_page` to paginate through results."New value: +"Present on list actions. A REST list carries the fields below: while `has_more` is true, call again with `page` set to `next_page`, or on a keyset page with `page_token` set to `next_page_token`. A GraphQL list carries cursor fields instead: while `has_next_page` is true, pass `end_cursor` as `after`." - changed
Output schema / properties / pagination / properties / has_more / descriptionPrevious value: -"True when more pages are available after the current one."New value: +"True when GitLab named a next page: `next_page` on an offset page, `next_page_token` on a keyset page. A keyset link can lead to one empty page after the last rows." - changed
Output schema / properties / pagination / properties / next_page / descriptionPrevious value: -"Next page index when `has_more` is true."New value: +"Next page index on an offset page that has a successor. It is 0 on the last page and on every keyset page, whose successor is `next_page_token`." - added
Output schema / properties / pagination / properties / next_page_tokenAdded value: +{ + "description": "On a page GitLab served by keyset pagination, which names no next_page, the value to pass back unchanged as `page_token` for the next page. Absent otherwise.", + "type": "string" +} - removed
Output schema / properties / pagination / properties / totalRemoved value: -{ - "description": "Total item count when known (some endpoints omit it for performance).", - "type": "integer" -} - added
Output schema / properties / pagination / properties / total_itemsAdded value: +{ + "description": "Items across all pages, 0 when GitLab sends no total.", + "type": "integer" +} - changed
Output schema / properties / pagination / properties / total_pages / descriptionPrevious value: -"Total page count when known."New value: +"Pages in all, 0 when GitLab sends no total."
- Changed
gitlab_find_action1 field changed- added
Output schema / properties / results / items / properties / required_params_any_ofAdded value: +{ + "description": "Alternative groups: a call also needs every name of one group, not all groups.", + "items": { + "items": { + "type": "string" + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] +}
2 tool updates
v3.0.0- Changed
gitlab_execute_action1 field changed- changed
Input schema / properties / confirm / descriptionPrevious value: -"Set top-level confirm=true to explicitly approve destructive actions; do not put confirm inside params for gitlab_execute_action."New value: +"Set top-level confirm=true to explicitly approve destructive actions. Do not put confirm inside params for gitlab_execute_action."
- Changed
gitlab_find_action2 fields changed- changed
Input schema / properties / query / descriptionPrevious value: -"Search terms combining a GitLab domain or resource with a verb, filter, or object name, such as project create, merge request approve, pipeline retry, issue delete, or ci variable."New value: +"Search terms combining a GitLab domain or resource with a verb, filter, or object name, such as project create, merge request approve, pipeline retry, issue delete, or ci variable. At most 256 characters: a longer query is refused, not truncated." - added
Input schema / properties / query / maxLengthAdded value: +256
1 tool update
v2.7.5- Changed
gitlab_execute_action1 field changed- changed
Input schema / properties / action / x-mcp-headerPrevious value: -"Mcp-Param-Action"New value: +"Action"
1 tool update
v2.6.0- Added
gitlab_execute_action
1 tool update
v2.5.2- Removed
gitlab_execute_action
3 tool updates
v2.1.3- Added
gitlab_execute_action - Removed
gitlab_execute_tool - Changed
gitlab_find_action4 fields changed- changed
Output schema / properties / results / items / properties / example / descriptionPrevious value: -"Example gitlab_execute_tool call."New value: +"Example gitlab_execute_action call." - changed
Output schema / properties / results / items / properties / example / properties / arguments / descriptionPrevious value: -"Example arguments for gitlab_execute_tool."New value: +"Example arguments for gitlab_execute_action." - changed
Output schema / properties / results / items / properties / id / descriptionPrevious value: -"Canonical action ID to pass to gitlab_execute_tool."New value: +"Canonical action ID to pass to gitlab_execute_action." - changed
Output schema / properties / results / items / properties / required_params / descriptionPrevious value: -"Required parameter names captured from the input schema."New value: +"Required action-specific parameter names to place inside gitlab_execute_action params."
TDQS
Scored across 2 tools
The two tools have clearly distinct roles: gitlab_find_action is read-only catalog search, while gitlab_execute_action performs an action. There is no ambiguity about which tool to use, and the descriptions explicitly state when to use each.
Both names follow the same gitlab_<verb>_action pattern, using consistent snake_case and predictable verbs (find, execute). The convention is immediately clear across the set.
Two tools is thin in absolute terms, but here they act as a deliberate gateway exposing a large GitLab action catalog. The meta-tool pattern keeps the surface small and well-scoped rather than being an underbuilt server.
The execute tool can run any canonical catalog action, and the find tool supports discovery with schemas and hints, so the surface is broad and lifecycle coverage depends on the catalog. Minor gaps may exist if the catalog is incomplete, but destructive-action confirmation and discovery are handled.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
GitLab MCP — wraps the GitLab REST API v4 (BYO API key)
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- AlicenseAqualityAmaintenanceFirst gitlab mcp for you, building together39103,930 npm2,063MIT
- -licenseNot gradedqualityNot gradedmaintenanceA Model Context Protocol server that enables AI assistants to interact with GitLab repositories, allowing tasks like managing merge requests, searching projects, and creating comments through RESTful API integration.12 npm2-
- AlicenseBqualityCmaintenanceA Model Context Protocol (MCP) server for GitLab and Jira integration. This server allows AI agents like gemini-cli to interact with your GitLab and Jira instances.3215 npm11MIT
- AlicenseNot gradedqualityAmaintenanceFull-coverage GitLab MCP server with 44 tools across 18 resource types. Agent-optimized CQRS design — one tool call handles complete multi-step operations. Supports OAuth 2.1, read-only mode, stdio/SSE/StreamableHTTP transports, and GraphQL-native work items with full hierarchy (epics,issues,etc)1,922 npm8Apache 2.0