Skip to main content

Gitlab Service MCP Integration

Provides Gitlab service invocation via the MCP protocol, supporting project repository management, file operations, and other features.

Deploy MCP Server


Environment Variables​

Usage Instructions​

Gitlab MCP Server Reference Documentation

🗺️ Feature List​

Tool IdentifierFunction DescriptionCore Parameters
create_or_update_fileFile creation/updateproject_id, file_path, content, branch
push_filesBatch push filesproject_id, branch, files
search_repositoriesRepository searchsearch, page
create_repositoryCreate repositoryname, visibility
get_file_contentsGet file or directory contentsproject_id, file_path, ref
create_issueCreate issueproject_id, title, description
create_merge_requestCreate merge requestproject_id, source_branch, target_branch
fork_repositoryFork repositoryproject_id, namespace
create_branchCreate branchproject_id, branch, ref

Repository URL​

https://github.com/modelcontextprotocol/servers/tree/main/src/gitlab

Usage​

CloudBase MCP Console

Parameter Description​

1. create_or_update_file​

File creation/update

Parameter NameTypeOptionalDescription
project_idstringRequiredProject ID or URL-encoded path
file_pathstringRequiredFile storage path (must include the extension)
contentstringRequiredFile content
commit_messagestringRequiredCommit description
branchstringRequiredBranch for creating/updating files
previous_pathstringOptionalFile path to be moved/renamed

Returns: File content and commit details

2. push_files​

Batch push files

Parameter NameTypeOptionalDescription
project_idstringRequiredProject ID or URL-encoded path
branchstringRequiredBranch to push to
filesarrayRequiredFiles to push, each containing file_path and content
commit_messagestringRequiredCommit message

Returns: Updated branch reference

3. search_repositories​

Repository Search

Parameter NameTypeOptionalDescription
searchstringRequiredSearch keywords
pagenumberOptionalPage number for pagination
per_pagenumberOptionalNumber of results per page (default: 20)

Returns: Repository search results

4. create_repository​

Creating Repository

Parameter NameTypeOptionalDescription
namestringRequiredRepository name
descriptionstringOptionalProject description
visibilitystringOptionalVisibility level: private/internal/public (default: private)
initialize_with_readmebooleanOptionalWhether to automatically generate a README.md file

Returns: Details of the created project

5. get_file_contents​

Get file or directory contents

Parameter NameTypeOptionalDescription
project_idstringRequiredProject ID or URL-encoded path
file_pathstringRequiredFile/directory path
refstringOptionalThe branch/tag/commit from which to retrieve content

Returns: File/directory contents

6. create_issue​

Create issue

Parameter NameTypeOptionalDescription
project_idstringRequiredProject ID or URL-encoded path
titlestringRequiredissue title
descriptionstringOptionalissue description
assignee_idsnumber[]OptionalArray of assignee IDs
labelsstring[]OptionalArray of labels
milestone_idnumberOptionalMilestone ID

Returns: created issue details

7. create_merge_request​

Create merge request

Parameter NameTypeOptionalDescription
project_idstringRequiredProject ID or URL-encoded path
source_branchstringRequiredSource branch name
target_branchstringRequiredTarget branch
draftbooleanOptionalCreate as a draft merge request
allow_collaborationbooleanOptionalAllow commits from upstream members
titlestringRequiredMR title
descriptionstringOptionalMerge Request description

Returns: created merge request details

8. fork_repository​

Fork repository

Parameter NameTypeOptionalDescription
project_idstringRequiredProject ID or URL-encoded path
namespacestringOptionalTarget namespace to fork to

Returns: Details of the forked project

9. create_branch​

Create branch

Parameter NameTypeOptionalDescription
project_idstringRequiredProject ID or URL-encoded path
branchstringRequiredNew branch name
refstringOptionalSource branch

Returns: Created branch reference