get_mcp_server_version
Returns the current version of the GitLab MCP server.
GitLab's own endpoint for project, issue and merge-request data — gated behind Duo, beta features and an instance-level switch.
LABSCO SUMMARY
Duo, beta features, and an instance or group allowance are each somebody's decision, and in most organisations not the same person's. That is defensible for a server reaching source code, but it means 'try GitLab MCP this afternoon' is usually not available. The pre-registration advice is worth heeding at scale: dynamic registration per client hits rate limits when a team all connect at once.
GitLab's hosted endpoint at their API. Self-managed instances use the same path on their own host. Three things must be switched on before it works at all.
GitLab Duo enabled, beta features allowed, and MCP permitted at instance or group level. Then OAuth with dynamic client registration; pre-registering an app avoids hitting registration rate limits.
Paste a URL, then authorize — add the endpoint to your client, then approve the OAuth consent screen
USE CASES
Pull the data from the same conversation as the code rather than a browser tab.
The same API path on your own host rather than gitlab.com.
Pre-register one OAuth app instead of letting every client register itself.
Listed in project docs. Your client may show a different list.
get_mcp_server_versionReturns the current version of the GitLab MCP server.
get_projectReturns metadata for a single GitLab project: numeric ID, full path, default branch, visibility, and web URL.
add_commitAdds a commit with one or more file actions to a branch in a single call.
save_merge_requestCreates or updates a merge request in a GitLab project. The presence of merge_request_iid selects the operation: omit it to create a merge request, or provide it to update an existing one.
get_merge_requestRetrieves a merge request and, optionally, its diffs, commits, notes, pipelines, discussions, approvals, or conflicts. Only the base merge request is returned unless you request associated data with the include parameter.
list_duo_agents_and_flowsLists the GitLab Duo agents and flows enabled in a project, so you can discover what is available instead of guessing a flow name. Which agents and flows a project offers is configured per project, and their IDs differ between projects. Each entry includes can_start_session, which is true for a flow you have permission to run, and for a foundational chat agent the instance has a flow configuration for when you can run sessions in CI in the project. GitLab Duo itself, other agents, and external agents are listed for discovery and are never startable, and a flow you cannot execute, or whose version is unreleased or still a draft, is listed as not startable too. Only startable flows carry the ai_catalog_item_consumer_id that start_duo_session takes; a foundational chat agent is started by passing its workflow_definition as agent. Descriptions might be truncated. The list covers the agents, flows and external agents configured in the project, plus the foundational chat agents. The chat agents are a fixed list rather than part of the paginated project results, so they are returned with the first page only, and are omitted unless agents are included. They come in addition to first, so the first page can contain more entries than you asked for. They carry a workflow_definition instead of an ai_catalog_item_consumer_id, which also tells apart the two agents that share the display name GitLab Duo; entries configured in the project have workflow_definition set to null. Foundational chat agents are governed by the project’s top-level group on GitLab.com, and by the organization on GitLab Self-Managed, rather than by the project.
start_duo_sessionStarts an asynchronous GitLab Duo Agent Platform session to accomplish a goal in a project. Returns a workflow_id immediately. Use get_duo_session with that ID to track progress and retrieve the final result. The session runs in a CI job that can push commits and open merge requests. Provide exactly one of url or project_id. Provide at most one of flow, flow_item_id, ai_catalog_item_consumer_id, or agent.
list_duo_sessionsLists your GitLab Duo Agent Platform sessions, excluding Duo Chat sessions. Each session includes its individual status, goal preview, flow definition, and creation timestamp. Project sessions also include a session URL. The goal preview might be truncated.
get_duo_sessionChecks the status of a GitLab Duo Agent Platform session. Running sessions include a suggested polling delay, which is longer while the session waits for its CI job to start. Finished sessions and completed chat turns include the latest agent answer. Any merge request, work item or comment the session created is included once it exists, as created_merge_requests, created_work_items and created_notes. Each is an array, empty when the session created nothing of that kind, and holds at most the 20 most recent items. When a list is cut off, artifacts_truncated names the lists that were cut and artifact_limit gives the cap. Use get_merge_request with include: ["notes"] to page through every comment on a merge request. Sessions waiting for approval include instructions for continuing the session with send_duo_session_input. Failed sessions also include: failure_reason: the reason recorded for the failure, or null if no reason was recorded. job_url: the CI job that ran the session, or null if no CI job ran or you cannot read its log. When a session failed before its agent started, the response says it made no changes and can be started again. Sessions older than 30 days do not include this message. Checkpoints older than 30 days are not retained, so the tool cannot identify if the agent ran the session.
send_duo_session_inputAnswers a GitLab Duo Agent Platform session that is waiting for input: approves or rejects a pending plan or tool call, or replies to a question the agent asked. Works for sessions started from ai_catalog_item_consumer_id and for those started from agent. A session accepts input once its last CI job has finished, whether it is waiting with status input_required, plan_approval_required, or tool_call_approval_required. The session continues in a CI job. The response includes a suggested polling delay; use get_duo_session with the same workflow_id to follow progress.
list_merge_requestsLists or searches merge requests in a GitLab project or group, returning compact merge request metadata. Group scope always includes merge requests from every project in the group and its subgroups, but excludes merge requests from archived projects. A group result also includes the owning project path of each merge request, for use with get_merge_request.
save_noteAdds a comment to a GitLab merge request or work item, or replies to an existing discussion thread, as the authenticated user.
save_merge_request_reviewWrites merge request review artifacts as the authenticated user. Each call performs exactly one operation, selected with the method parameter.
list_project_membersLists the members of a GitLab project with their role and access level.
get_userGets a single GitLab user. Use this tool to resolve a username, or your own account, to a numeric user ID. For example, use it before you set assignees or reviewers with other tools. Provide exactly one of username, id, or me.
accept_merge_requestMerges a merge request, or schedules it to merge automatically. Without strategy, the merge starts immediately and completes asynchronously. With strategy, auto-merge is armed and the merge request merges once its checks pass. To approve a merge request instead, use the save_merge_request_review tool. Calls against a merge request that is already merged succeed with status already_merged, and calls with a strategy against a merge request that is already scheduled succeed with status already_scheduled.
add_branchAdds a branch to a GitLab project from a source ref.
fork_repositoryForks a GitLab project into a namespace. The fork is created asynchronously. The response contains the new project attributes, including an import_status field, such as scheduled, that shows fork progress. The call fails due to reasons based on the following statuses: 409 status when the namespace already has a fork of the project. 404 status when the project or namespace doesn’t exist, or you don’t have permission to fork the project.
list_branchesLists the branches of a GitLab project, optionally filtered by name.
get_repository_fileRetrieves the contents of a single file from a repository at a specific ref. Content comes from the repository, not from your local filesystem. The file is returned as committed at ref, so uncommitted changes in a local checkout are not included.
list_repository_treeLists the files and directories in a GitLab repository at a given path and ref. Returns entry metadata only, never file contents. To read the contents of a file, use get_repository_file.
get_commitRetrieves a single commit’s metadata, and optionally its diff or notes.
list_commitsLists the commits of a GitLab project, optionally filtered by ref, author, path, or date. Returns compact commit metadata. To get the diff or notes of a single commit, use get_commit.
list_releasesLists releases in a GitLab project, most recently released first.
list_tagsLists tags in a GitLab project, most recently updated first. If search matches a tag name exactly, GitLab lists that tag first.
get_pipelineRetrieves a pipeline, and optionally its jobs, downstream pipelines, bridge (trigger) jobs, or the artifacts its jobs produced.
get_jobGets a CI/CD job’s metadata, and optionally its trace/log or the artifacts it produced.
get_artifact_fileReads a file from inside the artifacts archive of a CI/CD job as text. To discover what a job or pipeline produced, use the get_job or get_pipeline tool with include: artifacts.
list_pipelinesLists pipelines in a GitLab project, with optional filters.
save_pipelineRuns, retries, cancels, or renames a CI/CD pipeline in a GitLab project. To delete a pipeline, use the manage_pipeline tool instead. To list pipelines, use the list_pipelines tool instead.
manage_pipelineUpdates pipeline metadata or deletes a pipeline in a GitLab project. To create, retry, or cancel a pipeline, use the save_pipeline tool instead. To list pipelines, use the list_pipelines tool instead.
get_work_itemRetrieves a single work item (issue, epic, task, incident, objective, or key result) with its type, dates, assignees, labels, milestone, and parent. Optionally includes its notes or the merge requests related to it. Widgets the work item type does not support are omitted.
link_work_itemsLinks a work item to one or more other work items with a relationship type.
get_saved_view_work_itemsRetrieves a saved view and its list of work items from a namespace. The tool applies the filters and the sort order in the saved view to the returned work items.
list_vulnerabilitiesLists security vulnerabilities in a GitLab project, with optional filters and cursor pagination. Returns paginated vulnerability metadata. To get full details for a single vulnerability, use get_vulnerability. Requires the security dashboard feature to be enabled.
get_vulnerabilityReturns comprehensive details for a single vulnerability, including title, state, description, severity, and identifiers.
save_vulnerabilityPerforms write operations on a vulnerability in a GitLab project.
save_work_itemCreates or updates a GitLab work item, such as an issue, task, or epic. Omit work_item_iid to create a new work item. Provide work_item_iid or a work item URL to update an existing one. Send only the fields you intend to set, and omit the rest. The tool names create_work_item and update_work_item are aliases for this tool.
list_work_itemsLists or searches work items (issues, incidents, test cases, requirements, tasks, tickets, objectives, key results, epics) in a group or project. Group scope includes work items of descendant projects and subgroups. Each result contains only the ID, IID, title, state, web URL, full reference, created and updated timestamps, and work item type, with cursor pagination. Use get_work_item to read one work item in depth.
get_work_item_typesLists the work item types available in a namespace (group or project), including system-defined types (such as Issue, Epic, and Task) and custom types. Each returned type includes its global ID, name, icon, and the widget types enabled on it, so you can avoid setting fields the type does not support.
list_projectsWithout group_id, lists projects where you have at least the Guest role by default; pass min_access_level to raise the threshold. With group_id, lists every project in that group and its subgroups regardless of access level; adding min_access_level or visibility narrows the listing to that group only, not its subgroups, because GitLab does not support combining subgroup traversal with those filters when listing a group’s projects.
list_groupsLists groups, for navigating the group hierarchy and discovering group IDs and full paths to use with other tools. Without group_id, this tool lists top-level groups where you are a member. With group_id, it lists the direct subgroups of that group, regardless of membership. Set include_subgroups to true to recurse into all descendant subgroups. With no group_id, that lists your groups at any depth. Archived groups and groups pending deletion are excluded.
searchSearches for a term across the entire GitLab instance with the search API. This tool is available for global, group, and project search. Available scopes depend on the search type.
search_labelsSearches for labels in a GitLab project or group.
list_wiki_pagesLists the wiki pages in a GitLab project or group.
semantic_searchSearches relevant content in a GitLab project by meaning rather than by keyword. Use this tool when you do not know the exact symbol or file name, or to discover how a behavior is implemented across a codebase. For more information, including setup and enablement, see semantic code search.
attach_scan_profileAttaches the given security scan profile to the specified projects, or to all projects under the specified groups.
BEFORE YOU INSTALL
47 tools named in the project's documentation. Nine older names, such as create_issue and get_merge_request_diffs, are no longer listed but still answer; save_work_item, get_work_item, get_merge_request and get_pipeline replace them. semantic_search is behind a feature flag.
INSTALLATION
Add the endpoint to your client, then approve the OAuth consent screen.
https://gitlab.com/api/v4/mcp