GitLab MCP Server

v3.2.0
io.github.sumirati/mcp-gitlab Checked 16 hours ago Published 1 month ago

Developer-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.

ParameterTypeDescription
format *stringOutput format: 'markdown' (default, compact human/LLM-readable text table) or 'json' (structured object with parameter schemas)
page *numberPage number for paginated action results (default: 1)
per_page *numberNumber of actions per page (default: 15)
domainstringOptional domain to scope the search
querystringSearch 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.

ParameterTypeDescription
action *stringThe exact GitLab action name to execute (e.g. 'create_merge_request', 'list_pipelines', 'trigger_push_mirror_sync')
format *stringOutput format: 'markdown' (default, token-optimized compact table/text for LLM) or 'json' (structured JSON)
parametersobjectKey-value parameters for the designated action (as discovered from gitlab_find_actions)
paramsobjectAlias 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').

ParameterTypeDescription
file_path *stringPath to the file or directory in repo (e.g. 'pom.xml', 'docs/README.md', or 'src' for directory tree)
outline_only *booleanWhen 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 | numberProject numeric ID (e.g. 31) or namespace path (e.g. 'group/project-name'). URL-encoding is handled automatically.
end_linenumberOptional 1-based end line to slice content
refstringBranch name, tag, or commit SHA (default: default branch / HEAD)
start_linenumberOptional 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.

ParameterTypeDescription
format *stringOutput format: 'markdown' (default) or 'json'
project_id *string | numberProject numeric ID (e.g. 31) or namespace path (e.g. 'group/project-name'). URL-encoding is handled automatically.
statistics *booleanInclude 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.

ParameterTypeDescription
format *stringOutput format: 'markdown' (default) or 'json'
ignore_lockfiles *booleanIf true, automatically collapses diffs for lockfiles and minified assets (default: true)
max_diff_lines *numberMaximum lines of diff text to return per file (default: 500)
project_id *string | numberProject numeric ID (e.g. 31) or namespace path (e.g. 'group/project-name'). URL-encoding is handled automatically.
sha *stringCommit SHA or short commit hash to inspect
with_diff *booleanIf true, includes file diffs for the commit
file_pathstringFilter diffs to only this specific file (prevents token blowout on large multi-file commits)