Skip to content

feat: add protected environments API support #39

@vish288

Description

@vish288

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions