Summary
GitLab exposes protected environments via the REST API (docs), but the MCP server has no tools for managing them.
Requested Tools
| Tool |
API Endpoint |
Description |
gitlab_list_protected_environments |
GET /projects/:id/protected_environments |
List all protected environments |
gitlab_get_protected_environment |
GET /projects/:id/protected_environments/:name |
Get a single protected environment |
gitlab_protect_environment |
POST /projects/:id/protected_environments |
Protect an environment with deploy/approval rules |
gitlab_update_protected_environment |
PUT /projects/:id/protected_environments/:name |
Update deploy access and approval rules |
gitlab_unprotect_environment |
DELETE /projects/:id/protected_environments/:name |
Remove environment protection |
Key Use Cases
- Add/remove deployment approvers (users or groups) for protected environments
- Set required approval counts for deployments
- Manage deploy access levels (maintainer, developer, specific users)
- Automate environment protection setup for new projects
Context
Currently the only way to manage deployment approvers is through the GitLab UI (Settings > CI/CD > Protected environments). Having MCP tools for this would allow full CI/CD configuration management without leaving the editor.
Summary
GitLab exposes protected environments via the REST API (docs), but the MCP server has no tools for managing them.
Requested Tools
gitlab_list_protected_environmentsGET /projects/:id/protected_environmentsgitlab_get_protected_environmentGET /projects/:id/protected_environments/:namegitlab_protect_environmentPOST /projects/:id/protected_environmentsgitlab_update_protected_environmentPUT /projects/:id/protected_environments/:namegitlab_unprotect_environmentDELETE /projects/:id/protected_environments/:nameKey Use Cases
Context
Currently the only way to manage deployment approvers is through the GitLab UI (Settings > CI/CD > Protected environments). Having MCP tools for this would allow full CI/CD configuration management without leaving the editor.