Support Personal Access Token (PAT) authentication for MCP Server
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
Add support for calling the GitLab MCP server as a non-human identity - a project access token, a group access token, or another service-account mechanism - alongside the OAuth and fine-grained personal access token support that already exists.
Status
Fine-grained personal access tokens scoped to MCP tool / Execute now authenticate to the MCP server directly (!242106 (merged), documented in !261131 (merged) - see Authentication). That covers a human's own automation (a CI pipeline, a cron job, a script) running under their own account with a scoped, expiring token, without the interactive OAuth flow.
Problem
What's still blocked is automation that isn't tied to a specific named human account:
- CI/CD pipelines authenticating as a project access token - the standard bot-identity pattern for pipeline automation. Still hard-rejected by the MCP server regardless of scope.
- Shared automation services authenticating as a group access token - cross-project bot identity. Still hard-rejected.
- Classic/legacy personal access tokens - rejected regardless of scope, even with
api. - Enterprise requirements: token lifecycle policies and audit trails for a service identity, not a person's own account.
Proposed Solution
Extend MCP server authorization to accept a bot/service identity, not only a human user:
- Project access tokens, scoped to
MCP tool/Execute(or equivalent) for a single project - Group access tokens, for cross-project automation
- Whichever mechanism is chosen, it should not require impersonating or reusing a specific person's own credentials
Benefits
- Removes the remaining adoption barrier for CI/CD and headless automation that can't be tied to one person's account
- Lets automation be revoked or rotated independently of any individual's employment or account status
- Matches how these same GitLab API endpoints already support project and group access tokens outside MCP