Back to Home

Create Your GitLab Token

Step 1 Create a personal access token so your AI assistant can interact with GitLab on your behalf.

An access token is like a password for your AI assistant. It lets it read and write to your GitLab projects on your behalf.

  1. Log in to https://gitlab.com
  2. Click your avatar in the top-right corner, then select Edit profile (or Preferences in older versions)
  3. In the left sidebar, navigate to AccessPersonal access tokens
  4. Click Add new token (or use the Generate token dropdown)
  5. Enter a token name like "AI Assistant"
  6. Optional: Add a description
  7. Choose an expiration date (defaults to 365 days; non-expiring tokens were removed in GitLab 16.0)
  8. Select scopes: api for full access, or read_api for read-only
  9. Click Generate token
  10. Copy the token immediately — you won't be able to see it again

Need help? See GitLab's guide: Managing personal access tokens

Scope Quick Guide
ScopeWhat It Lets Your AI Do
apiCreate issues, edit files, open MRs, **create project tokens for git operations**, and more
read_apiView issues, MRs, files, and pipelines (read-only). Write tools will be disabled.
About Project Permissions

Your GitLab role on each project controls what your AI can do there. Maintainer is needed for write actions (editing files, creating branches) and for the server to create short-lived project tokens for git operations. Developer allows read access and limited writes, but the server can't create project tokens — it will fall back to using your PAT directly for git operations. Reporter is enough for reading issues and files.

Next: Connect Your AI Assistant