Required Environment Variables
- GITLAB_API_URL: The base URL for the GitLab API (default:
https://gitlab.com/api/v4
) - GITLAB_PERSONAL_ACCESS_TOKEN: Your GitLab personal access token
Steps
-
Install Meshagent
-
Authenticate with Meshagent
- Sign up and authenticate using the instructions at Meshagent CLI Getting Started.
-
Start the MCP GitLab Server in a Meshagent Room
- This command launches a Meshagent Room with a cloud-hosted test MCP GitLab server. The room will remain open while actively used, and all services (server, chatbot, etc.) are cleaned up when the room closes.
-
Join the Room with a Chatbot Connected to the GitLab Toolkit
- This starts a chatbot in the Meshagent Room, giving you a conversational interface to the GitLab tools.
- Multiple chatbots or toolkits can be used simultaneously within the same room.
- Meshagent will provide a link to access the room.
-
Interact via the Room Link
- Open the room link in your browser and chat with the agent to run MCP GitLab tools directly!
Project Level Deployment
For production, configure persistent services so the GitLab MCP tools and chatbot automatically join every room in your project. This ensures the MCP server and chatbot are always available, without manual steps or running local processes.Steps
-
Create the MCP GitLab Service (Persistent Agent)
-
Create the Persistent Chatbot Service
Tools Available
Summary of Tools
Tool | Short Description |
---|---|
create_branch | Create a new branch in a GitLab project |
create_issue | Create a new issue in a GitLab project |
create_merge_request | Create a new merge request in a GitLab project |
create_or_update_file | Create or update a single file in a GitLab project |
create_repository | Create a new GitLab project |
fork_repository | Fork a GitLab project to your account or specified namespace |
get_file_contents | Get the contents of a file or directory from a project |
push_files | Push multiple files to a project in a single commit |
search_repositories | Search for GitLab projects |
Tool Details
create_branch
Create a new branch in a GitLab projectParameters:
branch
(string
): Name for the new branchproject_id
(string
): Project ID or URL-encoded pathref
(string
, optional): Source branch/commit for new branch
create_issue
Create a new issue in a GitLab projectParameters:
project_id
(string
): Project ID or URL-encoded pathtitle
(string
): Issue titleassignee_ids
(array
, optional): Array of user IDs to assigndescription
(string
, optional): Issue descriptionlabels
(array
, optional): Array of label namesmilestone_id
(number
, optional): Milestone ID to assign
create_merge_request
Create a new merge request in a GitLab projectParameters:
project_id
(string
): Project ID or URL-encoded pathsource_branch
(string
): Branch with changestarget_branch
(string
): Branch to merge intotitle
(string
): Merge request titleallow_collaboration
(boolean
, optional): Allow commits from upstream membersdescription
(string
, optional): Merge request descriptiondraft
(boolean
, optional): Create as draft merge request
create_or_update_file
Create or update a single file in a GitLab projectParameters:
branch
(string
): Branch to create/update the file incommit_message
(string
): Commit messagecontent
(string
): File contentfile_path
(string
): Path to create/update the fileproject_id
(string
): Project ID or URL-encoded pathprevious_path
(string
, optional): Path of the file to move/rename
create_repository
Create a new GitLab projectParameters:
name
(string
): Repository namedescription
(string
, optional): Repository descriptioninitialize_with_readme
(boolean
, optional): Initialize with README.mdvisibility
(string
, optional): Repository visibility level
fork_repository
Fork a GitLab projectParameters:
project_id
(string
): Project ID or URL-encoded pathnamespace
(string
, optional): Namespace to fork to (full path)
get_file_contents
Get contents of a file or directory from a GitLab projectParameters:
file_path
(string
): Path to the file/directoryproject_id
(string
): Project ID or URL-encoded pathref
(string
, optional): Branch/tag/commit
push_files
Push multiple files to a GitLab project in a single commitParameters:
branch
(string
): Branch to push tocommit_message
(string
): Commit messagefiles
(array
): Array of files to pushproject_id
(string
): Project ID or URL-encoded path
search_repositories
Search for GitLab projectsParameters:
search
(string
): Search querypage
(number
, optional): Page number (default: 1)per_page
(number
, optional): Results per page (default: 20)
Further Information
- Meshagent: https://www.meshagent.com/
- Meshagent Documentation: https://docs.meshagent.com
- Meshagent MCP GitLab Image: https://hub.docker.com/r/meshagent/mcp-gitlab