API access control governance for MCP tools
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
Grant MCP tools the minimum required permissions instead of full OAuth user privileges we have today. We'll follow the principle of least privilege with a simple, practical scope design that focuses on real security risks.
Proposal
We need to define the minimum access level required for MCP tools to interact with the GitLab API (both for internal and external usage).
Scope taxonomy
Resource | Operations | Risk Level |
---|---|---|
repo |
read , write
|
|
issue |
read , write
|
|
mr |
read , write
|
|
epic |
read , write
|
|
work-item |
read , write
|
|
commit |
read |
|
pipeline |
read , logs
|
|
security |
read , write
|
|
audit |
read |
|
project |
read |
|
Tools by scope and risk level
Tool | Required Scope | Risk Level | Use Case |
---|---|---|---|
Repository Operations |
|||
|
|
|
Source code access |
|
|
|
Repo structure |
|
|
|
Code search |
|
|
|
Code changes in MR |
|
|
|
Code changes in commit |
|
|
|
Documentation search |
|
|
|
Source code modification |
Pipeline Operations |
|||
|
|
|
Access build logs (secrets risk) |
|
|
|
Pipeline status |
|
|
|
CI config validation |
Security Operations |
|||
|
|
|
Security scanning |
|
|
|
Vulnerability details |
|
|
|
Security management |
|
|
|
Security management |
|
|
|
Security management |
|
|
|
Security workflow |
Audit Operations |
|||
|
|
|
Compliance data |
|
|
|
Compliance data |
|
|
|
Compliance data |
Issue Operations |
|||
|
|
|
Issue viewing |
|
|
|
Issue browsing |
|
|
|
Issue search |
|
|
|
Issue comments |
|
|
|
Issue comments |
|
|
|
Issue creation |
|
|
|
Issue modification |
|
|
|
Issue commenting |
Merge Request Operations |
|||
|
|
|
MR viewing |
|
|
|
MR search |
|
|
|
MR comments |
|
|
|
MR creation |
|
|
|
MR modification |
|
|
|
MR commenting |
Epic Operations |
|||
|
|
|
Epic viewing |
|
|
|
Epic browsing |
|
|
|
Epic comments |
|
|
|
Epic comments |
|
|
|
Epic creation |
|
|
|
Epic modification |
Work Item Operations |
|||
|
|
|
Work item viewing |
|
|
|
Work item browsing |
|
|
|
Work item comments |
|
|
|
Work item creation |
|
|
|
Work item commenting |
Commit Operations |
|||
|
|
|
Commit browsing |
|
|
|
Commit details |
|
|
|
Commit comments |
Project Operations |
|||
|
|
|
Project info |
|
|
|
User info |