by GitLab
MCP Server for the GitLab API, enabling project management, file operations, and more.
Updated 6 days ago
Official
npx @mintlify/mcp add gitlab --client claude
Features
- Automatic Branch Creation: When creating/updating files or pushing changes, branches are automatically created if they don't exist
- Comprehensive Error Handling: Clear error messages for common issues
- Git History Preservation: Operations maintain proper Git history without force pushing
- Batch Operations: Support for both single-file and multi-file operations
Setup
Personal Access Token
Create a GitLab Personal Access Token with appropriate permissions:
- Go to User Settings > Access Tokens in GitLab
- Select the required scopes:
api
for full API accessread_api
for read-only accessread_repository
andwrite_repository
for repository operations
- Create the token and save it securely
Environment Variables
GITLAB_PERSONAL_ACCESS_TOKEN
: Your GitLab personal access token (required)GITLAB_API_URL
: Base URL for GitLab API (optional, defaults tohttps://gitlab.com/api/v4
)
Available tools
create_or_update_file
Create or update a single file in a project
push_files
Push multiple files in a single commit
search_repositories
Search for GitLab projects
create_repository
Create a new GitLab project
get_file_contents
Get contents of a file or directory
create_issue
Create a new issue
create_merge_request
Create a new merge request
fork_repository
Fork a project
create_branch
Create a new branch