GitLab MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GITLAB_URL | No | GitLab instance URL | https://gitlab.com |
| GITLAB_TIMEOUT | No | Request timeout in milliseconds | 30000 |
| GITLAB_AUTH_MODE | No | Authentication mode (hybrid, per-user, or shared) | hybrid |
| GITLAB_MAX_PAGE_SIZE | No | Maximum items per page (1-100) | 50 |
| GITLAB_SHARED_ACCESS_TOKEN | No | Shared token for read operations (optional in hybrid mode) |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
| prompts | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_projectA | Get detailed information about a specific GitLab project (read-only) |
| get_issuesB | Get issues from a specific GitLab project (read-only) |
| get_merge_requestsB | Get merge requests from a specific GitLab project (read-only) |
| execute_custom_queryA | Execute custom GraphQL queries for complex filtering (e.g., issues with assigneeUsernames: ["user"], labelName: ["bug"]). Use this for structured filtering by assignee/author/labels when search tools return 0 results. Use pagination and limit complexity to avoid timeouts. |
| execute_rest_readA | Execute an arbitrary GET request against the GitLab REST API at /api/v4. Open-ended escape hatch for read endpoints not covered by a dedicated tool — e.g. /projects/:id/repository/files, /projects/:id/pipelines/:pipeline_id/test_report, /admin/*. Provide the path beginning with "/" (no host, no /api/v4 prefix) and an optional query object. For writes, use execute_rest_write. |
| get_available_queriesA | Get list of available GraphQL queries and mutations from the GitLab schema |
| get_merge_request_pipelinesA | Get CI/CD pipelines for a merge request, including status, duration, and stages |
| get_pipeline_jobsA | Get jobs for a specific pipeline, including status, stage, duration, and retry/cancel info |
| get_merge_request_diffsA | Get diff statistics for a merge request, including per-file additions/deletions and diff refs |
| get_merge_request_commitsA | Get commits for a merge request (excluding merge commits), with commit count and details |
| get_notesA | Get notes (comments) on an issue or merge request, including system notes and inline MR comments |
| get_issue_contextA | Bundle issue body, all notes (paginated up to maxNotes), related merge requests (mentioning), closing merge requests, linked issues (relates_to/blocks/is_blocked_by) into a single call. Use this instead of fanning out across get_issues + get_notes + search_merge_requests when investigating an issue. |
| get_merge_request_contextA | Bundle MR body, all notes (paginated up to maxNotes, filtered to non-system by default), commits, pipeline summary, reviewers with approval state, and issues this MR will close into a single call. Use this instead of fanning out across get_merge_requests + get_notes + get_merge_request_commits + get_merge_request_pipelines when investigating an MR. |
| list_milestonesA | List milestones for a project or group with progress statistics (total/closed issue counts) |
| list_iterationsB | List iterations (sprints) for a group with cadence info. Requires GitLab Premium/Ultimate. |
| get_time_trackingA | Get time tracking data (estimate, spent, timelogs) for an issue or merge request |
| get_merge_request_reviewersA | Get approval and reviewer status for a merge request, including who approved and review states |
| get_project_statisticsA | Get aggregate project statistics: open issues/MRs, star/fork counts, storage sizes, commit count, last pipeline status, release count, and language breakdown |
| list_broadcast_messagesB | List all GitLab broadcast messages (instance-wide announcements). Read-only. |
| get_broadcast_messageA | Get a specific GitLab broadcast message by ID. |
| get_work_itemA | Fetch a GitLab work item (issue, task, epic, incident, OKR) by global ID. Returns the raw widgets array so epic hierarchy, health status, iteration, milestone, and dates are all visible. Accepts either a numeric id or a full gid (gid://gitlab/WorkItem/123). |
| list_work_itemsA | List work items within a namespace (group or project fullPath). Supports filtering by type (ISSUE, TASK, EPIC, INCIDENT, OBJECTIVE, KEY_RESULT) and state, plus cursor pagination and fetchAll. |
| list_user_eventsA | List a specific user's public GitLab activity feed by username or numeric ID. Use for tracking what a teammate has been working on. |
| list_project_eventsA | List activity events for a single GitLab project — commits pushed, MRs opened/merged, issues touched, notes added. Accepts project full path or numeric ID. |
| list_my_eventsA | List the authenticated user's GitLab activity feed — pushes, MRs, comments, approvals, issue actions. Primary tool for "what did I just do". Requires user authentication. |
| analytics_user_summaryA | Aggregated activity summary for a user over a time window — totals by action type (pushes, MRs opened/merged, comments, approvals), breakdown by project and by day. Use this instead of list_user_events when you want counts rather than a raw event feed. |
| analytics_group_summaryA | Aggregated activity summary for an entire group (optionally including subgroups) over a time window — totals by action type (pushes, MRs opened/merged, comments, approvals), with breakdowns by project, by contributor, and by day. Use this to answer "what did this team do" without fanning out across list_project_events yourself. |
| analytics_review_bottlenecksA | Aggregate open (non-draft) merge requests across a group or project to surface review bottlenecks. Returns per-reviewer queue stats, age-bucket histogram, and the stalest MRs by updatedAt. MRs with no reviewer assigned are bucketed under "(unassigned)". |
| get_current_userA | Get information about the current authenticated GitLab user |
| get_projectsB | List projects accessible to the user (requires authentication to see private projects) |
| execute_rest_writeA | Execute an arbitrary POST/PUT/PATCH/DELETE request against the GitLab REST API at /api/v4. Open-ended escape hatch for write endpoints not covered by a dedicated tool. Destructive — DELETE is permitted, so check the path before invoking. For reads, use execute_rest_read. |
| create_issueA | Create a new issue in a GitLab project (requires user authentication with write permissions) |
| create_merge_requestA | Create a new merge request in a GitLab project (requires user authentication with write permissions) |
| create_noteA | Add a comment/note to an issue or merge request (requires user authentication) |
| delete_noteA | Delete a comment (note) on a GitLab issue or merge request. Requires a user token belonging to the note author or a maintainer. |
| update_noteA | Edit the body of an existing comment (note) on a GitLab issue or merge request. Requires a user token belonging to the note author. |
| manage_pipelineA | Retry or cancel a CI/CD pipeline (requires user authentication with write permissions) |
| create_broadcast_messageB | Create a GitLab broadcast message. Requires administrator privileges on the GitLab instance. |
| update_broadcast_messageB | Update an existing GitLab broadcast message. Requires administrator privileges. |
| delete_broadcast_messageA | Delete a GitLab broadcast message by ID. Requires administrator privileges. |
| mark_todo_doneA | Mark a single to-do item as done for the authenticated user. Requires the todo's ID (numeric or full gid://gitlab/Todo/N form) from list_my_todos. |
| mark_all_todos_doneA | Mark pending to-do items as done for the authenticated user. With no arguments, marks every pending todo. Optional scoping args (groupPath, projectPath, action, type, authorIds, targetId) narrow which todos are marked. Irreversible without per-item restore_todo calls. Returns the actual list of updated todos. |
| restore_todoA | Restore a previously-marked-done to-do item back to pending state. Accepts the todo's ID (numeric or full gid://gitlab/Todo/N form). |
| update_issueA | Update an issue (title, description, assignees, labels, due date) with schema-aware mutations |
| delete_issueA | Delete a GitLab issue. Requires a user token with permission to delete issues in the project (typically the issue author or a maintainer). |
| update_merge_requestA | Update a merge request (title, description, assignees, reviewers, labels) with schema-aware mutations |
| resolve_pathA | Resolve a GitLab path to either a project or group and list group projects when applicable |
| get_group_projectsA | List projects inside a GitLab group (optionally filter by search term) |
| get_type_fieldsA | List available fields on a GraphQL type using introspected schema (requires schema to be introspected) |
| search_gitlabA | Text search across GitLab projects and issues (Note: Does not support filtering by assignee/labels - use search_issues for that. MRs cannot be searched globally - use search_merge_requests with username) |
| search_projectsA | Search for GitLab projects by name or description |
| search_issuesA | Search for issues with text search and/or structured filtering (assignee, author, labels, state). For filtering by assignee/author/labels without text search, leave searchTerm empty. |
| search_merge_requestsA | Search merge requests by username (supports "username", "author:username", "assignee:username") or search within a specific project. Note: GitLab does not support global text search for MRs - use projectPath for text searches. |
| get_user_issuesA | Get all issues assigned to a specific user - uses proper GraphQL filtering for reliable results |
| get_user_merge_requestsA | Get merge requests for a specific user (as author or assignee) - uses proper GraphQL filtering |
| list_my_todosA | List the authenticated user's GitLab to-do items (notifications about issues, MRs, mentions, reviews requested, etc.). Filter by state, action, target type, or group/project. Requires user authentication. |
| search_usersB | Search for GitLab users by username or name - useful for finding team members or contributors |
| search_groupsB | Search for GitLab groups and organizations |
| search_labelsA | Search for labels in a project or group, with optional text filtering |
| search_notesA | Full-text search across issue and merge request comments. Scope can be global, a project, or a group. NOTE: on self-hosted GitLab, the "notes" search scope requires Advanced Search (Elasticsearch) to be enabled — without it, this endpoint returns an error. search_gitlab does NOT search note bodies; this tool does. |
| browse_repositoryA | Browse repository files and folders - essential for exploring codebase structure |
| get_file_contentB | Get the content of a specific file from a GitLab repository - crucial for code analysis |
| list_group_membersA | List group members with access levels, optionally filtered by search term |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| explore-project | Explore a GitLab project structure and recent activity |
| find-my-work | Find issues and merge requests assigned to you |
| review-merge-request | Review a specific merge request with code changes |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ttpears/gitlab-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server