GitLab MCP Server
v3.2.0Developer-ready GitLab MCP server for CE and EE instances.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
gitlab_find_actions Find GitLab Actions
Search and discover available GitLab operations on-demand across the entire platform. Returns matching action names, purpose descriptions, and parameter schemas for use with 'gitlab_execute_action'. Keeps prompt context minimal (<500 tokens) while retaining 100% coverage.
| Parameter | Type | Description |
|---|---|---|
format * | string | Output format: 'markdown' (default, compact human/LLM-readable text table) or 'json' (structured object with parameter schemas) |
page * | number | Page number for paginated action results (default: 1) |
per_page * | number | Number of actions per page (default: 15) |
domain | string | Optional domain to scope the search |
query | string | Search keywords to find operations (e.g. 'merge request', 'pipeline', 'runner', 'mirror', 'release', 'branch', 'job trace') |
gitlab_execute_action Execute GitLab Action
Execute any discovered GitLab platform action with input validation and token-optimized response projection. Dispatches directly to the corresponding API endpoint while enforcing read-only safety restrictions.
| Parameter | Type | Description |
|---|---|---|
action * | string | The exact GitLab action name to execute (e.g. 'create_merge_request', 'list_pipelines', 'trigger_push_mirror_sync') |
format * | string | Output format: 'markdown' (default, token-optimized compact table/text for LLM) or 'json' (structured JSON) |
parameters | object | Key-value parameters for the designated action (as discovered from gitlab_find_actions) |
params | object | Alias for parameters (for cross-client compatibility) |
get_file_contents Get File Contents
Read the raw content of a specific file or directory tree from a repository at a designated branch, tag, or commit ref. Use when inspecting current repository source code or configs. Do NOT use for reviewing diffs between branches (use 'get_merge_request_changes') or viewing commit diffs (use 'get_commit').
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the file or directory in repo (e.g. 'pom.xml', 'docs/README.md', or 'src' for directory tree) |
outline_only * | boolean | When true, extract and return only high-level symbol declarations (classes, functions, interfaces, methods, types) with their line numbers instead of full content (default: false) |
project_id * | string | number | Project numeric ID (e.g. 31) or namespace path (e.g. 'group/project-name'). URL-encoding is handled automatically. |
end_line | number | Optional 1-based end line to slice content |
ref | string | Branch name, tag, or commit SHA (default: default branch / HEAD) |
start_line | number | Optional 1-based start line to slice content |
get_project Get Project Details
Retrieve comprehensive metadata for a specific GitLab project, including default branch, repository statistics, visibility, and topic tags. Use to inspect repository settings or verify project access. Do NOT use to inspect directory trees or source code; use 'get_file_contents' instead.
| Parameter | Type | Description |
|---|---|---|
format * | string | Output format: 'markdown' (default) or 'json' |
project_id * | string | number | Project numeric ID (e.g. 31) or namespace path (e.g. 'group/project-name'). URL-encoding is handled automatically. |
statistics * | boolean | Include project repository and storage statistics |
get_commit Get Commit Details & Diff
Retrieve comprehensive details for a specific Git commit SHA, including author info, statistics, modified files, and selective unified file diffs. Use to inspect exact code changes made in a commit. Supports file_path filtering and line limits to prevent context exhaustion on large commits.
| Parameter | Type | Description |
|---|---|---|
format * | string | Output format: 'markdown' (default) or 'json' |
ignore_lockfiles * | boolean | If true, automatically collapses diffs for lockfiles and minified assets (default: true) |
max_diff_lines * | number | Maximum lines of diff text to return per file (default: 500) |
project_id * | string | number | Project numeric ID (e.g. 31) or namespace path (e.g. 'group/project-name'). URL-encoding is handled automatically. |
sha * | string | Commit SHA or short commit hash to inspect |
with_diff * | boolean | If true, includes file diffs for the commit |
file_path | string | Filter diffs to only this specific file (prevents token blowout on large multi-file commits) |