Add the connector
1
Create the token in GitLab
A personal access token from a dedicated service account is recommended, so one identity covers every group you add it to. Project and group access tokens also work if you only need a single project or group. Grant the
api scope for read and write, or read_api for read-only. The token starts with glpat-.2
Add the connector
Go to Organization settings > Claude Tag > Connectors, click Add, select GitLab, and paste the token. For self-managed GitLab, switch to the form’s Advanced tab and add your instance’s hostname under Allowed websites. The first credential you add for a service from the Connectors tab is on in every workspace and channel as soon as you save it. To give it narrower reach, see where a new connector applies before you save the connector. Click Connect to save the connector.
@Claude what can you access from this channel? returns it in a new thread in any channel where the connector is on. New threads pick up the connector on their own; in an existing thread, ask Claude to use the service by name.
GitLab’s own guide for creating tokens is at docs.gitlab.com.
How GitLab differs from GitHub
The connector is API-only. The token authenticates GitLab API requests, not git, so Claude gets a 401 error when it tries to clone a private project or push to any project over HTTPS, even with the connector in place. To clone a repository into the session workspace, connect it through GitHub instead.
The token is auto-injected on every API request to your GitLab host. The model and the sandbox are not given the key; see how Agent Proxy works.
Related resources
- Configure GitHub access: the GitHub App path, which is different
- Give Claude access: the full credential-type and allowed-hosts reference