GitLab API MCP README

The full upstream README, mirrored for reference. Install config, tool schemas, adoption signals and our own overview live on the GitLab API MCP listing page.

Gitlab Api

CLI or API | MCP

PyPI - Version MCP Server PyPI - Downloads GitHub Repo stars GitHub forks GitHub contributors PyPI - License GitHub GitHub last commit (by committer) GitHub pull requests GitHub closed pull requests GitHub issues GitHub top language GitHub language count GitHub repo size GitHub repo file count (file type) PyPI - Wheel PyPI - Implementation

Version: 27.3.2

Documentation — Installation, deployment, usage across the API, CLI, and MCP backing GitLab instance are maintained in the official documentation.


Overview

Gitlab Api is a production-grade Agent and Model Context Protocol (MCP) server designed to interface directly with GitLab API + MCP Server.


Key Features

  • Consolidated Action-Routed MCP Tools: Minimizes token overhead and eliminates tool bloat in LLM contexts by grouping methods into optimized, togglable tool modules.
  • Enterprise-Grade Security: Complete support for Eunomia policies, OIDC token delegation, and granular execution context tracking.
  • Native Telemetry & Tracing: Out-of-the-box OpenTelemetry exports and native Langfuse tracing.

CLI or API

This agent wraps the GitLab API + MCP Server API. The operator can interact with it programmatically or via its integrated execution entrypoints.

Detailed instructions on how to use the underlying API wrappers, extended schema bindings, and developer SDK references are maintained in docs/index.md.


MCP

This server use dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.

Tool surface — MCP_TOOL_MODE

Set MCP_TOOL_MODE (in the shared ~/.config/agent-connector-sdk/config.json or env): condensed (default — the action-routed tools below), verbose (one named 1:1 tool per API method, e.g. gitlab_get_branches(...), tagged verbose), or both. Filter the verbose set with --tools tag:verbose / MCP_ENABLED_TAGS=verbose. See the agent-connector-sdk MCP Tool Modes guide.

Available MCP Tools

Auto-generated from the live MCP server — do not edit by hand.

Condensed action-routed tools (default — MCP_TOOL_MODE=condensed)

MCP ToolToggle Env VarDescription
api_requestCUSTOM_APITOOLExecute arbitrary GitLab REST API requests directly.
gitlab_branchesBRANCHESTOOLManage gitlab branches operations.
gitlab_commitsCOMMITSTOOLManage gitlab commits operations.
gitlab_deploy_tokensDEPLOY_TOKENSTOOLManage gitlab deploy tokens operations.
gitlab_discover_graphql_schemaGRAPHQLTOOLDiscover the dynamic GitLab GraphQL schema including types, fields, and custom attributes in real-time.
gitlab_environmentsENVIRONMENTSTOOLManage gitlab environments operations.
gitlab_epicsEPICSTOOLManage GitLab epics.
gitlab_graphqlGRAPHQLTOOLExecute raw GraphQL queries and mutations natively on GitLab.
gitlab_graphql_opsGRAPHQL_OPSTOOLRun a typed GitLab GraphQL operation by name.
gitlab_groupsGROUPSTOOLManage gitlab groups operations.
gitlab_ingest_pipelinesMISCTOOLNatively ingest GitLab CI pipeline runs (+ jobs) into epistemic-graph.
gitlab_ingest_projectsMISCTOOLNatively ingest GitLab projects into epistemic-graph as typed :Project nodes.
gitlab_instancesMISCTOOLList the configured GitLab tenants (CONCEPT:AU-KG.backend.declared-columns-so-schema).
gitlab_issuesISSUESTOOLManage GitLab issues.
gitlab_jobsJOBSTOOLManage gitlab jobs operations.
gitlab_labelsLABELSTOOLManage GitLab labels.
gitlab_membersMEMBERSTOOLManage gitlab members operations.
gitlab_merge_requestsMERGE_REQUESTSTOOLManage gitlab merge requests operations.
gitlab_merge_rulesMERGE_RULESTOOLManage gitlab merge rules operations.
gitlab_milestonesMILESTONESTOOLManage GitLab milestones.
gitlab_namespacesNAMESPACESTOOLManage gitlab namespaces operations.
gitlab_notesNOTESTOOLManage GitLab notes/comments on issues, merge requests, commits, and epics.
gitlab_packagesPACKAGESTOOLManage gitlab packages operations.
gitlab_pipeline_schedulesPIPELINE_SCHEDULESTOOLManage gitlab pipeline schedules operations.
gitlab_pipelinesPIPELINESTOOLManage gitlab pipelines operations.
gitlab_projectsPROJECTSTOOLManage gitlab projects operations.
gitlab_protected_branchesPROTECTED_BRANCHESTOOLManage gitlab protected branches operations.
gitlab_releasesRELEASESTOOLManage gitlab releases operations.
gitlab_runnersRUNNERSTOOLManage gitlab runners operations.
gitlab_snippetsSNIPPETSTOOLManage GitLab snippets.
gitlab_tagsTAGSTOOLManage gitlab tags operations.
gitlab_usersUSERSTOOLManage gitlab users operations.
gitlab_vulnerabilitiesVULNERABILITIESTOOLReview a project's dependency list and security vulnerabilities (the GitLab counterpart to GitHub Dependabot).
gitlab_wikiWIKITOOLManage gitlab wiki operations.

Verbose 1:1 API-mapped tools (MCP_TOOL_MODE=verbose or both)

196 per-operation tools — one per public API method (click to expand)
MCP ToolToggle Env VarDescription
gitlab_accept_merge_requestMERGE_REQUESTSTOOLAccept (merge) a merge request.
gitlab_api_requestSYSTEMTOOLMake a custom API request to the GitLab server.
gitlab_approve_merge_requestMERGE_REQUESTSTOOLApprove a specific merge request.
gitlab_archive_projectPROJECTSTOOLArchive a specific project.
gitlab_cancel_merge_when_pipeline_succeedsMERGE_REQUESTSTOOLCancel a merge request's queued "merge when pipeline succeeds" (auto-merge).
gitlab_cancel_project_jobPROJECTSTOOLCancel a specific job within a project.
gitlab_cherry_pick_commitREPOSITORIESTOOLCherry-pick a commit into a new branch.
gitlab_create_branchREPOSITORIESTOOLCreate a new branch in a project.
gitlab_create_commitREPOSITORIESTOOLCreate a new commit.
gitlab_create_commit_commentREPOSITORIESTOOLCreate a comment on a commit.
gitlab_create_environmentENVIRONMENTSTOOLCreate a new environment for a project.
gitlab_create_epicISSUESTOOLCreate a new group epic.
gitlab_create_group_deploy_tokenUSERS_GROUPSTOOLCreate a deploy token for a group.
gitlab_create_issueISSUESTOOLCreate a new issue.
gitlab_create_labelISSUESTOOLCreate a new label.
gitlab_create_merge_requestMERGE_REQUESTSTOOLCreate a new merge request.
gitlab_create_milestoneISSUESTOOLCreate a project milestone.
gitlab_create_noteOTHERTOOLCreate a new note/comment on an issue.
gitlab_create_pipeline_schedulePIPELINESTOOLCreate a pipeline schedule for a specific project.
gitlab_create_pipeline_schedule_variablePIPELINESTOOLCreate a variable for a pipeline schedule.
gitlab_create_projectPROJECTSTOOLCreate a new project.
gitlab_create_project_deploy_tokenPROJECTSTOOLCreate a deploy token for a project.
gitlab_create_project_level_rulePROJECTSTOOLCreate a new project-level merge request approval rule.
gitlab_create_releaseENVIRONMENTSTOOLCreate a new release in a project.
gitlab_create_release_evidenceENVIRONMENTSTOOLCreate evidence for a release in a project.
gitlab_create_snippetOTHERTOOLCreate a project snippet or personal snippet.
gitlab_create_tagREPOSITORIESTOOLCreate a tag in a project.
gitlab_create_userUSERS_GROUPSTOOLCreate a new user.
gitlab_create_wiki_pageOTHERTOOLCreate a new wiki page for a project.
gitlab_delete_branchREPOSITORIESTOOLDelete a branch in a project.
gitlab_delete_environmentENVIRONMENTSTOOLDelete an environment for a project.
gitlab_delete_epicISSUESTOOLDelete a group epic.
gitlab_delete_group_deploy_tokenUSERS_GROUPSTOOLDelete a deploy token for a group.
gitlab_delete_issueISSUESTOOLDelete an issue.
gitlab_delete_labelISSUESTOOLDelete a label.
gitlab_delete_merged_branchesREPOSITORIESTOOLDelete all merged branches in a project.
gitlab_delete_milestoneISSUESTOOLDelete a project milestone.
gitlab_delete_noteOTHERTOOLDelete a note.
gitlab_delete_pipeline_schedulePIPELINESTOOLDelete a pipeline schedule for a specific project.
gitlab_delete_pipeline_schedule_variablePIPELINESTOOLDelete a variable from a pipeline schedule.
gitlab_delete_projectPROJECTSTOOLDelete a specific project.
gitlab_delete_project_deploy_tokenPROJECTSTOOLDelete a deploy token for a project.
gitlab_delete_project_level_rulePROJECTSTOOLDelete a project-level merge request approval rule.
gitlab_delete_project_runnerPROJECTSTOOLDelete a runner from a project.
gitlab_delete_releaseENVIRONMENTSTOOLDelete a release in a project.
gitlab_delete_runnerPIPELINESTOOLDelete a runner.
gitlab_delete_shared_project_linkPROJECTSTOOLUnshare a specific project from a group.
gitlab_delete_snippetOTHERTOOLDelete a snippet.
gitlab_delete_stopped_environmentsENVIRONMENTSTOOLDelete stopped environments (review apps) for a project.
gitlab_delete_tagREPOSITORIESTOOLDelete a tag in a project.
gitlab_delete_userUSERS_GROUPSTOOLDelete a user.
gitlab_delete_wiki_pageOTHERTOOLDelete a wiki page for a project.
gitlab_download_release_assetENVIRONMENTSTOOLDownload a release asset from a group's release.
gitlab_download_repository_packageOTHERTOOLDownload a repository package for a specific project.
gitlab_edit_groupUSERS_GROUPSTOOLEdit a specific group.
gitlab_edit_group_level_ruleUSERS_GROUPSTOOLEdit a group-level merge request approval setting.
gitlab_edit_pipeline_schedulePIPELINESTOOLEdit a pipeline schedule for a specific project.
gitlab_edit_projectPROJECTSTOOLEdit a specific project.
gitlab_edit_project_level_rulePROJECTSTOOLEdit a project-level merge request approval setting.
gitlab_enable_project_runnerPROJECTSTOOLEnable a runner in a project.
gitlab_erase_project_jobPROJECTSTOOLErase a specific job within a project.
gitlab_get_approval_state_merge_requestsMERGE_REQUESTSTOOLGet the approval state of merge requests for a specific project.
gitlab_get_branchREPOSITORIESTOOLRetrieve information about a specific branch in a project.
gitlab_get_branchesREPOSITORIESTOOLRetrieve information about branches in a project.
gitlab_get_commitREPOSITORIESTOOLGet a specific commit.
gitlab_get_commit_commentsREPOSITORIESTOOLGet comments on a commit.
gitlab_get_commit_diffREPOSITORIESTOOLGet the diff of a commit.
gitlab_get_commit_discussionsREPOSITORIESTOOLGet discussions on a commit.
gitlab_get_commit_gpg_signatureREPOSITORIESTOOLGet GPG signature of a commit.
gitlab_get_commit_merge_requestsREPOSITORIESTOOLGet merge requests associated with a commit.
gitlab_get_commit_referencesREPOSITORIESTOOLGet references of a commit.
gitlab_get_commit_statusesREPOSITORIESTOOLGet statuses of a commit.
gitlab_get_commitsREPOSITORIESTOOLGet commits.
gitlab_get_deploy_tokensENVIRONMENTSTOOLGet all deploy tokens.
gitlab_get_environmentENVIRONMENTSTOOLGet details of a specific environment.
gitlab_get_environmentsENVIRONMENTSTOOLGet a list of environments for a project.
gitlab_get_epicISSUESTOOLGet a specific group epic.
gitlab_get_epicsISSUESTOOLGet all epics for a group.
gitlab_get_groupUSERS_GROUPSTOOLGet details of a specific group.
gitlab_get_group_deploy_tokenUSERS_GROUPSTOOLGet a specific deploy token for a group.
gitlab_get_group_deploy_tokensUSERS_GROUPSTOOLGet deploy tokens for a specific group.
gitlab_get_group_descendant_groupsUSERS_GROUPSTOOLGet descendant groups of a specific group.
gitlab_get_group_issuesISSUESTOOLGet the list of issues for a group (and, by default, its subgroups).
gitlab_get_group_level_ruleUSERS_GROUPSTOOLGet details of a group-level merge request approval setting.
gitlab_get_group_membersUSERS_GROUPSTOOLGet members of a specific group.
gitlab_get_group_merge_requestsMERGE_REQUESTSTOOLGet merge requests associated with a specific group.
gitlab_get_group_projectsPROJECTSTOOLGet projects associated with a specific group.
gitlab_get_group_releasesUSERS_GROUPSTOOLGet information about releases in a group.
gitlab_get_group_runnersPIPELINESTOOLGet information about runners in a group.
gitlab_get_group_subgroupsUSERS_GROUPSTOOLGet subgroups of a specific group.
gitlab_get_group_vulnerabilitiesVULNERABILITIESTOOLGet a group's security vulnerability findings (Ultimate).
gitlab_get_groupsUSERS_GROUPSTOOLGet a list of groups.
gitlab_get_issueISSUESTOOLGet a single issue.
gitlab_get_issuesISSUESTOOLGet list of issues. Can filter by project_id.
gitlab_get_labelISSUESTOOLGet a specific label by name.
gitlab_get_labelsISSUESTOOLGet all labels for a project.
gitlab_get_latest_releaseENVIRONMENTSTOOLGet information about the latest release in a project.
gitlab_get_latest_release_assetENVIRONMENTSTOOLGet the asset for the latest release in a project.
gitlab_get_latest_release_evidenceENVIRONMENTSTOOLGet evidence for the latest release in a project.
gitlab_get_merge_request_level_rulesMERGE_REQUESTSTOOLGet merge request-level approval rules for a specific project and merge request.
gitlab_get_merge_requestsMERGE_REQUESTSTOOLGet a list of merge requests.
gitlab_get_milestoneISSUESTOOLGet a specific project milestone.
gitlab_get_milestonesISSUESTOOLGet all milestones for a project.
gitlab_get_namespaceUSERS_GROUPSTOOLGet information about a specific namespace.
gitlab_get_namespacesUSERS_GROUPSTOOLGet information about namespaces.
gitlab_get_nested_projects_by_groupPROJECTSTOOLGet information about nested projects within a group.
gitlab_get_noteOTHERTOOLGet a specific note.
gitlab_get_notesOTHERTOOLGet all notes for a specific issue.
gitlab_get_pipelinePIPELINESTOOLGet information about a specific pipeline in a project.
gitlab_get_pipeline_jobsPIPELINESTOOLGet jobs associated with a specific pipeline within a project.
gitlab_get_pipeline_schedulePIPELINESTOOLGet information about a specific pipeline schedule in a project.
gitlab_get_pipeline_schedulesPIPELINESTOOLGet pipeline schedules for a specific project.
gitlab_get_pipelinesPIPELINESTOOLGet information about pipelines for a specific project.
gitlab_get_pipelines_triggered_from_schedulePIPELINESTOOLGet pipelines triggered from a specific pipeline schedule.
gitlab_get_projectPROJECTSTOOLGet information about a specific project.
gitlab_get_project_contributorsPROJECTSTOOLGet information about contributors to a project.
gitlab_get_project_dependenciesVULNERABILITIESTOOLGet a project's Dependency List (all detected dependencies).
gitlab_get_project_deploy_tokenPROJECTSTOOLGet a specific deploy token for a project.
gitlab_get_project_deploy_tokensPROJECTSTOOLGet deploy tokens for a specific project.
gitlab_get_project_groupsPROJECTSTOOLGet groups associated with a specific project.
gitlab_get_project_jobPROJECTSTOOLGet details of a specific job within a project.
gitlab_get_project_job_logPROJECTSTOOLGet the log of a specific job within a project.
gitlab_get_project_jobsPROJECTSTOOLGet jobs associated with a specific project.
gitlab_get_project_level_merge_request_rulePROJECTSTOOLGet details of a specific project-level merge request approval rule.
gitlab_get_project_level_merge_request_rulesPROJECTSTOOLGet project-level merge request approval rules.
gitlab_get_project_level_rulePROJECTSTOOLGet details of a project-level merge request approval setting.
gitlab_get_project_membersPROJECTSTOOLGet members of a specific project.
gitlab_get_project_merge_requestPROJECTSTOOLGet details of a specific merge request in a project.
gitlab_get_project_merge_requestsPROJECTSTOOLGet merge requests for a specific project.
gitlab_get_project_runnersPROJECTSTOOLGet information about runners in a project.
gitlab_get_project_statisticsPROJECTSTOOLGet statistics for a specific project.
gitlab_get_project_vulnerabilitiesVULNERABILITIESTOOLGet a project's security vulnerabilities (Ultimate).
gitlab_get_projectsPROJECTSTOOLGet information about projects.
gitlab_get_protected_branchREPOSITORIESTOOLGet information about a specific protected branch in a project.
gitlab_get_protected_branchesREPOSITORIESTOOLGet information about protected branches in a project.
gitlab_get_protected_environmentENVIRONMENTSTOOLGet details of a specific protected environment.
gitlab_get_protected_environmentsENVIRONMENTSTOOLGet a list of protected environments for a project.
gitlab_get_protected_tagREPOSITORIESTOOLGet information about a specific protected tag in a project.
gitlab_get_protected_tagsREPOSITORIESTOOLGet information about protected tags in a project.
gitlab_get_release_by_tagREPOSITORIESTOOLGet information about a release by its tag in a project.
gitlab_get_releasesENVIRONMENTSTOOLGet information about releases in a project.
gitlab_get_repository_packagesOTHERTOOLGet information about repository packages for a specific project.
gitlab_get_runnerPIPELINESTOOLGet information about a specific runner.
gitlab_get_runner_jobsPIPELINESTOOLGet jobs for a specific runner.
gitlab_get_runnersPIPELINESTOOLGet information about runners.
gitlab_get_snippetOTHERTOOLGet a specific snippet.
gitlab_get_snippetsOTHERTOOLGet list of snippets. Can filter by project_id.
gitlab_get_tagREPOSITORIESTOOLGet information about a specific tag in a project.
gitlab_get_tagsREPOSITORIESTOOLGet information about tags in a project.
gitlab_get_userUSERS_GROUPSTOOLGet information about a specific user.
gitlab_get_usersUSERS_GROUPSTOOLGet information about users.
gitlab_get_vulnerabilityVULNERABILITIESTOOLGet a single vulnerability by its global ID (Ultimate).
gitlab_get_wiki_listOTHERTOOLGet a list of wiki pages for a project.
gitlab_get_wiki_pageOTHERTOOLGet information about a specific wiki page.
gitlab_merge_request_level_approvalsMERGE_REQUESTSTOOLGet approvals for a specific merge request.
gitlab_pause_runnerPIPELINESTOOLPause or unpause a specific runner.
gitlab_post_build_status_to_commitREPOSITORIESTOOLPost build status to a commit.
gitlab_protect_branchREPOSITORIESTOOLProtect a specific branch in a project.
gitlab_protect_environmentENVIRONMENTSTOOLProtect an environment for a project.
gitlab_protect_tagREPOSITORIESTOOLProtect a tag in a project.
gitlab_publish_repository_packageOTHERTOOLPublish a repository package for a specific project.
gitlab_register_new_runnerPIPELINESTOOLRegister a new runner.
gitlab_require_code_owner_approvals_single_branchREPOSITORIESTOOLRequire code owner approvals for a specific branch in a project.
gitlab_reset_gitlab_runner_tokenPIPELINESTOOLReset GitLab runner registration token.
gitlab_reset_group_runner_tokenPIPELINESTOOLReset registration token for a group's runner.
gitlab_reset_project_runner_tokenPROJECTSTOOLReset registration token for a project's runner.
gitlab_reset_tokenOTHERTOOLReset authentication token for a runner.
gitlab_retry_project_jobPROJECTSTOOLRetry a specific job within a project.
gitlab_revert_commitREPOSITORIESTOOLRevert a commit.
gitlab_run_pipelinePIPELINESTOOLRun a pipeline for a specific project.
gitlab_run_pipeline_schedulePIPELINESTOOLRun a pipeline schedule for a specific project.
gitlab_run_project_jobPROJECTSTOOLRun a specific job within a project.
gitlab_share_projectPROJECTSTOOLShare a specific project with a group.
gitlab_stop_environmentENVIRONMENTSTOOLStop an environment for a project.
gitlab_stop_stale_environmentsENVIRONMENTSTOOLStop stale environments for a project.
gitlab_take_pipeline_schedule_ownershipPIPELINESTOOLTake ownership of a pipeline schedule for a specific project.
gitlab_unapprove_merge_requestMERGE_REQUESTSTOOLUnapprove a specific merge request.
gitlab_unarchive_projectPROJECTSTOOLUnarchive a specific project.
gitlab_unprotect_branchREPOSITORIESTOOLUnprotect a specific branch in a project.
gitlab_unprotect_environmentENVIRONMENTSTOOLUnprotect an environment for a project.
gitlab_unprotect_tagREPOSITORIESTOOLUnprotect a tag in a project.
gitlab_update_environmentENVIRONMENTSTOOLUpdate an existing environment for a project.
gitlab_update_epicISSUESTOOLUpdate a group epic.
gitlab_update_issueISSUESTOOLUpdate an issue.
gitlab_update_labelISSUESTOOLUpdate an existing label.
gitlab_update_milestoneISSUESTOOLUpdate a project milestone.
gitlab_update_noteOTHERTOOLUpdate a note.
gitlab_update_project_level_rulePROJECTSTOOLUpdate an existing project-level merge request approval rule.
gitlab_update_protected_environmentENVIRONMENTSTOOLUpdate a protected environment for a project.
gitlab_update_releaseENVIRONMENTSTOOLUpdate information about a release in a project.
gitlab_update_runner_detailsPIPELINESTOOLUpdate details for a specific runner.
gitlab_update_snippetOTHERTOOLUpdate a snippet.
gitlab_update_userUSERS_GROUPSTOOLUpdate an existing user.
gitlab_update_wiki_pageOTHERTOOLUpdate an existing wiki page for a project.
gitlab_upload_wiki_page_attachmentOTHERTOOLUpload an attachment to a wiki page for a project.
gitlab_verify_runner_authenticationPIPELINESTOOLVerify runner authentication.

34 action-routed tool(s) (default) · 196 verbose 1:1 tool(s). Each is enabled unless its <DOMAIN>TOOL toggle is set false; MCP_TOOL_MODE selects the surface (condensed default · verbose 1:1 · both). Auto-generated — do not edit.

Detailed tool schemas, parameter shapes, and validation constraints are preserved in docs/usage.md.

Dynamic Tool Selection & Visibility

This MCP server supports dynamic toolset selection and visibility filtering at runtime. This allows the operator to restrict the set of exposed tools to prevent blowing up the LLM's context window.

The operator can configure tool filtering via multiple input channels:

  • CLI Arguments: Pass --tools or --toolsets (or their disabled counterparts --disabled-tools and --disabled-toolsets) during startup.
  • Environment Variables: Define standard environment variables:
    • MCP_ENABLED_TOOLS / MCP_DISABLED_TOOLS
    • MCP_ENABLED_TAGS / MCP_DISABLED_TAGS
  • HTTP SSE Request Headers: Pass custom headers during transport initialization:
    • x-mcp-enabled-tools / x-mcp-disabled-tools
    • x-mcp-enabled-tags / x-mcp-disabled-tags
  • HTTP SSE Request Query Parameters: Append query parameters directly to the operator's transport connection URL:
    • ?tools=tool1,tool2
    • ?tags=tag1

When query strings or parameters are supplied, an LLM-free Knowledge Graph resolution layer (using DynamicToolOrchestrator) matches query intents against known tool tags, names, or descriptions, with safe fallback and automated 24-hour background cache refreshing.


MCP Configuration Examples

Install the connector-focused [mcp] extra. Examples use gitlab-api[mcp] to add FastMCP / FastAPI through agent-connector-sdk; the required Agent Connector SDK core still carries epistemic-graph[full]. The [agent-runtime] extra additionally enables model orchestration.

stdio Transport (local IDEs — Cursor, Claude Desktop, VS Code)

config.json
{
  "mcpServers": {
    "gitlab-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "gitlab-api[mcp]",
        "gitlab-mcp"
      ],
      "env": {
        "MCP_TOOL_MODE": "intent",
        "BRANCHESTOOL": "True",
        "COMMITSTOOL": "True",
        "CUSTOM_APITOOL": "True",
        "DEPLOY_TOKENSTOOL": "True",
        "ENVIRONMENTSTOOL": "True",
        "EPICSTOOL": "True",
        "GITLAB_TOKEN": "your_gitlab_token_here",
        "GITLAB_URL": "https://gitlab.example.com",
        "GRAPHQLTOOL": "True",
        "GRAPHQL_OPSTOOL": "True",
        "GROUPSTOOL": "True",
        "ISSUESTOOL": "True",
        "JOBSTOOL": "True",
        "LABELSTOOL": "True",
        "MEMBERSTOOL": "True",
        "MERGE_REQUESTSTOOL": "True",
        "MERGE_RULESTOOL": "True",
        "MILESTONESTOOL": "True",
        "MISCTOOL": "True",
        "NAMESPACESTOOL": "True",
        "NOTESTOOL": "True",
        "PACKAGESTOOL": "True",
        "PIPELINESTOOL": "True",
        "PIPELINE_SCHEDULESTOOL": "True",
        "PROJECTSTOOL": "True",
        "PROTECTED_BRANCHESTOOL": "True",
        "RELEASESTOOL": "True",
        "RUNNERSTOOL": "True",
        "SNIPPETSTOOL": "True",
        "TAGSTOOL": "True",
        "USERSTOOL": "True",
        "VULNERABILITIESTOOL": "True",
        "WIKITOOL": "True"
      }
    }
  }
}

Runtime references require an alias-aware launcher such as Arbora. Other launchers must omit those entries and inject the resolved values through their own runtime secret boundary.

Streamable-HTTP Transport (networked / production)

config.json
{
  "mcpServers": {
    "gitlab-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "gitlab-api[mcp]",
        "gitlab-mcp",
        "--transport",
        "streamable-http",
        "--port",
        "8000"
      ],
      "env": {
        "TRANSPORT": "streamable-http",
        "HOST": "127.0.0.1",
        "PORT": "8000",
        "MCP_TOOL_MODE": "intent",
        "BRANCHESTOOL": "True",
        "COMMITSTOOL": "True",
        "CUSTOM_APITOOL": "True",
        "DEPLOY_TOKENSTOOL": "True",
        "ENVIRONMENTSTOOL": "True",
        "EPICSTOOL": "True",
        "GITLAB_TOKEN": "your_gitlab_token_here",
        "GITLAB_URL": "https://gitlab.example.com",
        "GRAPHQLTOOL": "True",
        "GRAPHQL_OPSTOOL": "True",
        "GROUPSTOOL": "True",
        "ISSUESTOOL": "True",
        "JOBSTOOL": "True",
        "LABELSTOOL": "True",
        "MEMBERSTOOL": "True",
        "MERGE_REQUESTSTOOL": "True",
        "MERGE_RULESTOOL": "True",
        "MILESTONESTOOL": "True",
        "MISCTOOL": "True",
        "NAMESPACESTOOL": "True",
        "NOTESTOOL": "True",
        "PACKAGESTOOL": "True",
        "PIPELINESTOOL": "True",
        "PIPELINE_SCHEDULESTOOL": "True",
        "PROJECTSTOOL": "True",
        "PROTECTED_BRANCHESTOOL": "True",
        "RELEASESTOOL": "True",
        "RUNNERSTOOL": "True",
        "SNIPPETSTOOL": "True",
        "TAGSTOOL": "True",
        "USERSTOOL": "True",
        "VULNERABILITIESTOOL": "True",
        "WIKITOOL": "True"
      }
    }
  }
}

Alternatively, connect to a pre-deployed Streamable-HTTP instance by url:

config.json
{
  "mcpServers": {
    "gitlab-mcp": {
      "url": "http://localhost:8000/gitlab-mcp/mcp"
    }
  }
}

Run a reviewed container image as a least-privilege stdio child (no listener or published port):

Terminal
docker run -i --rm \
  --read-only \
  --cap-drop=ALL \
  --security-opt=no-new-privileges \
  --pids-limit=256 \
  --tmpfs /tmp:rw,noexec,nosuid,nodev,size=64m \
  -e TRANSPORT=stdio \
  -e MCP_TOOL_MODE=intent \
  -e BRANCHESTOOL=True \
  -e COMMITSTOOL=True \
  -e CUSTOM_APITOOL=True \
  -e DEPLOY_TOKENSTOOL=True \
  -e ENVIRONMENTSTOOL=True \
  -e EPICSTOOL=True \
  -e GITLAB_TOKEN=your_gitlab_token_here \
  -e GITLAB_URL=https://gitlab.example.com \
  -e GRAPHQLTOOL=True \
  -e GRAPHQL_OPSTOOL=True \
  -e GROUPSTOOL=True \
  -e ISSUESTOOL=True \
  -e JOBSTOOL=True \
  -e LABELSTOOL=True \
  -e MEMBERSTOOL=True \
  -e MERGE_REQUESTSTOOL=True \
  -e MERGE_RULESTOOL=True \
  -e MILESTONESTOOL=True \
  -e MISCTOOL=True \
  -e NAMESPACESTOOL=True \
  -e NOTESTOOL=True \
  -e PACKAGESTOOL=True \
  -e PIPELINESTOOL=True \
  -e PIPELINE_SCHEDULESTOOL=True \
  -e PROJECTSTOOL=True \
  -e PROTECTED_BRANCHESTOOL=True \
  -e RELEASESTOOL=True \
  -e RUNNERSTOOL=True \
  -e SNIPPETSTOOL=True \
  -e TAGSTOOL=True \
  -e USERSTOOL=True \
  -e VULNERABILITIESTOOL=True \
  -e WIKITOOL=True \
  registry.example.invalid/gitlab-api@sha256:<digest> gitlab-mcp

For containerized network HTTP, supply an authenticated TLS ingress (or direct server TLS), exact MCP_ALLOWED_HOSTS, and an exact trusted-proxy CIDR policy through the operator-owned deployment profile. The generator does not emit an unauthenticated non-loopback listener.

Auto-generated from the code-read env surface (MCP_TOOL_MODE + package vars) — do not edit.

Additional Deployment Options

gitlab-api can run as a local stdio process or container, or behind a remote network boundary. The Deployment guide carries the detailed transport contract.

  • Local container — launch a reviewed immutable image as a least-privilege stdio child with no listener or published port.
  • Remote URL — connect through an operator-supplied authenticated HTTPS ingress. Keep its URL, outbound identity references, trust profile, and exact MCP_ALLOWED_HOSTS in AgentConfig.

Environment Variables

Package environment variables

VariableExampleDescription
HOST0.0.0.0
PORT8000
TRANSPORTstdiooptions: stdio, streamable-http, sse
ENABLE_OTELTrue
OTEL_EXPORTER_OTLP_ENDPOINThttp://localhost:8080/api/public/otel
OTEL_EXPORTER_OTLP_PUBLIC_KEYsecret-injected
OTEL_EXPORTER_OTLP_SECRET_KEYsecret-injected
OTEL_EXPORTER_OTLP_PROTOCOLhttp/protobuf
EUNOMIA_TYPEnoneoptions: none, embedded, remote
EUNOMIA_POLICY_FILEmcp_policies.json
EUNOMIA_REMOTE_URLhttp://eunomia-server:8000
GITLAB_URLhttps://gitlab.example.com
GITLAB_TOKENsecret-injected
GITLAB_TLS_PROFILE—named AgentConfig TLS profile; blank uses the configured default
MISCTOOLTrue
BRANCHESTOOLTrue
PROTECTED_BRANCHESTOOLTrue
COMMITSTOOLTrue
DEPLOY_TOKENSTOOLTrue
ENVIRONMENTSTOOLTrue
EPICSTOOLTrue
GROUPSTOOLTrue
ISSUESTOOLTrue
JOBSTOOLTrue
LABELSTOOLTrue
MEMBERSTOOLTrue
MERGE_REQUESTSTOOLTrue
MERGE_RULESTOOLTrue
MILESTONESTOOLTrue
NAMESPACESTOOLTrue
NOTESTOOLTrue
PACKAGESTOOLTrue
PIPELINESTOOLTrue
PIPELINE_SCHEDULESTOOLTrue
PROJECTSTOOLTrue
RELEASESTOOLTrue
RUNNERSTOOLTrue
SNIPPETSTOOLTrue
TAGSTOOLTrue
USERSTOOLTrue
VULNERABILITIESTOOLTrue
WIKITOOLTrue
CUSTOM_APITOOLTrue
GRAPHQLTOOLTrue
GRAPHQL_OPSTOOLTrue

Inherited agent-connector-sdk variables (apply to every connector)

VariableExampleDescription
MCP_TOOL_MODEintentTool surface: intent | condensed | verbose | both
MCP_ENABLED_TOOLS—Comma-separated tool allow-list
MCP_DISABLED_TOOLS—Comma-separated tool deny-list
MCP_ENABLED_TAGS—Comma-separated tag allow-list
MCP_DISABLED_TAGS—Comma-separated tag deny-list
MCP_CLIENT_AUTH—Outbound MCP child auth: oidc-client-credentials | basic | none
OIDC_CLIENT_ID—OIDC client id (service-account auth)
OIDC_CLIENT_SECRET_REFsecret://identity/oidc-client-secretRuntime secret reference for the OIDC service account
MCP_BASIC_AUTH_USERNAME—HTTP Basic username (MCP_CLIENT_AUTH=basic)
MCP_BASIC_AUTH_PASSWORD_REFsecret://identity/mcp-basic-passwordRuntime secret reference for HTTP Basic auth (MCP_CLIENT_AUTH=basic)
DEBUGFalseVerbose logging
PYTHONUNBUFFERED1Unbuffered stdout (recommended in containers)
MCP_URLhttp://localhost:8000/mcpURL of the MCP server the agent connects to
PROVIDERopenaiLLM provider for the agent
MODEL_IDgpt-4oModel id for the agent

45 package + 16 inherited variable(s). Auto-generated from .env.example + the shared agent-connector-sdk set — do not edit.

Every variable the server reads.

Connection & Credentials

The connector is single-host by default and multi-tenant when gitlab_instances is configured (see Multi-Tenancy). When no instances are configured, it falls back to the single-host GITLAB_* values below.

VariableDescriptionDefault
GITLAB_URLBase GitLab instance URLhttps://gitlab.example.com
GITLAB_TOKENGitLab personal/project access token (glpat-…)—
GITLAB_TLS_PROFILEOptional runtime TLS profile selector(unset)

Multiple instances are declared once under gitlab_instances in the shared agent-connector-sdk XDG config (~/.config/agent-connector-sdk/config.json) — each entry has name, url, token, and optional tls_profile. Target a tenant by name from the client factory; an unset instance resolves to the first configured one (else GITLAB_URL / GITLAB_TOKEN).

MCP server / transport

VariableDescriptionDefault
TRANSPORTstdio, streamable-http, or ssestdio
HOSTBind host (HTTP transports)0.0.0.0
PORTBind port (HTTP transports)8000
MCP_TOOL_MODETool surface: condensed, verbose, or bothcondensed
MCP_ENABLED_TOOLS / MCP_DISABLED_TOOLSComma-separated tool allow/deny list—
MCP_ENABLED_TAGS / MCP_DISABLED_TAGSComma-separated tag allow/deny list—
DEBUGVerbose loggingFalse
PYTHONUNBUFFEREDUnbuffered stdout (recommended in containers)1

Tool toggles

Each action-routed tool can be disabled individually via its toggle env var (set to false). The full list is in the Available MCP Tools table above (e.g. PROJECTSTOOL, MERGE_REQUESTSTOOL, PIPELINESTOOL, GRAPHQLTOOL, CUSTOM_APITOOL).

Telemetry & governance

VariableDescriptionDefault
ENABLE_OTELEnable OpenTelemetry exportTrue
OTEL_EXPORTER_OTLP_ENDPOINTOTLP collector endpoint—
OTEL_EXPORTER_OTLP_PUBLIC_KEY / OTEL_EXPORTER_OTLP_SECRET_KEYOTLP auth keys—
OTEL_EXPORTER_OTLP_PROTOCOLOTLP protocol (e.g. http/protobuf)—
EUNOMIA_TYPEAuthorization mode: none, embedded, remotenone
EUNOMIA_POLICY_FILEEmbedded policy filemcp_policies.json
EUNOMIA_REMOTE_URLRemote Eunomia server URL—

Agent

Set credentials

export GITLAB_URL="your_value" export GITLAB_TOKEN="your_value"

Connector-focused MCP server (includes the shared graph engine)

uv pip install "gitlab-api[mcp]"

Everything (development)

uv pip install "gitlab-api[all]" # or: python -m pip install "gitlab-api[all]"

Code

### Container images (`:mcp`)

One multi-stage `docker/Dockerfile` builds the MCP-only image (`--target mcp`):

| Image tag | Build target | Contents | Entrypoint |
|-----------|--------------|----------|------------|
| `example/gitlab-api:mcp` | `--target mcp` | `gitlab-api[mcp]` — **connector-focused**, includes `epistemic-graph[full]`; no model-orchestration stack | `gitlab-mcp` |

```bash
docker build --target mcp   -t example/gitlab-api:mcp    docker/   # connector-focused MCP server