Skip to main content

Announcing StackOne Defender: leading open-source prompt injection guard for your agent Read More

GitLab MCP Server
for AI Agents

Production-ready GitLab MCP server with 125 extensible actions — plus built-in authentication, security, and optimized execution.

GitLab logo
GitLab MCP Server
Built by StackOne StackOne

Coverage

125 Agent Actions

Create, read, update, and delete across GitLab — and extend your agent's capabilities with custom actions.

Authentication

Agent Tool Authentication

Per-user OAuth in one call. Your GitLab MCP server gets session-scoped tokens with zero credentials stored on your infra.

Agent Auth →

Security

Agent Protection

Every GitLab tool response scanned for prompt injection in milliseconds — 88.7% accuracy, all running on CPU.

Prompt Injection Defense →

Performance

Max Agent Context. Min Cost.

Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every GitLab call.

Tools Discovery →

What is the GitLab MCP Server?

A GitLab MCP server lets AI agents read and write GitLab data through the Model Context Protocol — Anthropic's open standard for connecting LLMs to external tools. StackOne's GitLab MCP server ships with 125 pre-built actions, fully extensible via the Connector Builder — plus managed authentication, prompt injection defense, and optimized agent context. Connect it from MCP clients like Claude Desktop, Cursor, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.

All GitLab MCP Tools and Actions

Every action from GitLab's API, ready for your agent. Create, read, update, and delete — scoped to exactly what you need.

Projects

  • Create Project

    Create a new GitLab project

  • List Projects

    List all GitLab projects accessible to the authenticated user

  • Get Project

    Retrieve details of a specific GitLab project

  • Update Project

    Update settings and configuration of a GitLab project

  • Delete Project

    Delete a GitLab project

Project Members

  • Add Project Member

    Add a user as a member of a GitLab project

  • List Project Members

    List all members of a GitLab project

  • Update Project Member

    Update a project member's access level or expiration

  • Remove Project Member

    Remove a user from a GitLab project

Issues

  • Create Issue

    Create a new issue in a GitLab project

  • Get Issue

    Retrieve details of a specific issue in a GitLab project

  • Update Issue

    Update an existing issue in a GitLab project

  • Move Issue

    Move an issue to a different GitLab project

  • Delete Issue

    Delete an issue from a GitLab project

Issue Notes

  • Create Issue Note

    Add a comment (note) to a GitLab issue

  • List Issue Notes

    List all comments (notes) on a GitLab issue

Merge Requests

  • Create Merge Request

    Create a new merge request in a GitLab project

  • Get Merge Request

    Retrieve details of a specific merge request in a GitLab project

  • Update Merge Request

    Update an existing merge request in a GitLab project

Merge Request Notes

  • Create Merge Request Note

    Add a comment to a GitLab merge request

  • List Merge Request Notes

    List all comments on a GitLab merge request

Commits

  • Create Commit

    Create a commit with multiple file actions in a GitLab project

  • List Commits

    List commits in a GitLab project repository

  • Get Commit

    Retrieve details of a specific commit in a GitLab project

Branchs

  • Create Branch

    Create a new branch in a GitLab project repository

  • Get Branch

    Retrieve details of a specific branch in a GitLab project

  • Delete Branch

    Delete a branch from a GitLab project repository

Users

  • Create User

    Create a new GitLab user account (admin only)

  • List Users

    List all GitLab users accessible to the authenticated user

  • Get User

    Retrieve details of a specific GitLab user by ID

  • Update User

    Update an existing GitLab user account (admin only)

  • Delete User

    Delete a GitLab user account (admin only)

Groups

  • Create Group

    Create a new GitLab group

  • List Groups

    List all GitLab groups accessible to the authenticated user

  • Get Group

    Retrieve details of a specific GitLab group

  • Update Group

    Update settings and configuration of a GitLab group

  • Delete Group

    Schedule a GitLab group for deletion or permanently delete a subgroup

Group Members

  • Add Group Member

    Add a user as a member of a GitLab group

  • List Group Members

    List all members of a GitLab group

  • Remove Group Member

    Remove a user from a GitLab group

Pipelines

  • Create Pipeline

    Trigger a new pipeline for a GitLab project

  • List Pipelines

    List all pipelines for a GitLab project

  • Get Pipeline

    Retrieve details of a specific pipeline in a GitLab project

  • Delete Pipeline

    Delete a pipeline from a GitLab project

Files

  • Create File

    Create a new file in a GitLab project repository

  • Get File

    Retrieve a file from a GitLab project repository

  • Update File

    Update an existing file in a GitLab project repository

  • Delete File

    Delete a file from a GitLab project repository

Tags

  • Create Tag

    Create a new tag in a GitLab project repository

  • List Tags

    List all tags in a GitLab project repository

  • Delete Tag

    Delete a tag from a GitLab project repository

Project Labels

  • Create Project Label

    Create a new label in a GitLab project

  • List Project Labels

    List all labels in a GitLab project

  • Get Project Label

    Retrieve details of a specific label in a GitLab project

  • Update Project Label

    Update an existing label in a GitLab project

  • Delete Project Label

    Delete a label from a GitLab project

Project Milestones

  • Create Project Milestone

    Create a new milestone in a GitLab project

  • List Project Milestones

    List all milestones in a GitLab project

  • Get Project Milestone

    Retrieve details of a specific milestone in a GitLab project

  • Update Project Milestone

    Update an existing milestone in a GitLab project

  • Delete Project Milestone

    Delete a milestone from a GitLab project

Releases

  • Create Release

    Create a new release for a GitLab project

  • List Releases

    List all releases for a GitLab project

  • Get Release

    Retrieve details of a specific release in a GitLab project

  • Update Release

    Update an existing release in a GitLab project

  • Delete Release

    Delete a release from a GitLab project

Environments

  • Create Environment

    Create a new deployment environment for a GitLab project

  • List Environments

    List all deployment environments for a GitLab project

  • Get Environment

    Retrieve details of a specific deployment environment in a GitLab project

  • Update Environment

    Update a deployment environment in a GitLab project

Snippets

  • Create Snippet

    Create a new GitLab snippet

  • List Snippets

    List all snippets for the authenticated GitLab user

  • Get Snippet

    Retrieve details of a specific GitLab snippet

  • Update Snippet

    Update an existing GitLab snippet

  • Delete Snippet

    Delete a GitLab snippet permanently

Project CI/CD Variables

  • Create Project CI/CD Variable

    Create a new CI/CD variable for a GitLab project

  • List Project CI/CD Variables

    List all CI/CD variables for a GitLab project

  • Get Project CI/CD Variable

    Retrieve a specific CI/CD variable from a GitLab project

  • Update Project CI/CD Variable

    Update an existing CI/CD variable in a GitLab project

  • Delete Project CI/CD Variable

    Delete a CI/CD variable from a GitLab project

Project Deploy Keys

  • Add Project Deploy Key

    Add a deploy key to a GitLab project

  • List Project Deploy Keys

    List all deploy keys for a GitLab project

  • Delete Project Deploy Key

    Remove a deploy key from a GitLab project

Namespaces

  • List Namespaces

    List all namespaces accessible to the authenticated GitLab user

  • Get Namespace

    Retrieve details of a specific GitLab namespace

Other (40)

  • List Project Issues

    List all issues in a specific GitLab project

  • List Issue Participants

    List all users participating in a GitLab issue

  • List Related Merge Requests

    List all merge requests related to a GitLab issue

  • List Project Merge Requests

    List all merge requests for a specific GitLab project

  • List Merge Request Commits

    List all commits in a GitLab merge request

  • List Merge Request Diffs

    List diffs of files changed in a GitLab merge request

  • Get Merge Request Participants

    Retrieve all participants in a GitLab merge request

  • Get Commit Diff

    Get the diff of changes introduced by a specific commit

  • List Branches

    List all branches in a GitLab project repository, sorted alphabetically

  • Get Current User

    Retrieve the authenticated user's profile information

  • Get Current User Status

    Retrieve the status of the authenticated user

  • Get User Status

    Retrieve the status of a specific GitLab user

  • List Group Projects

    List all projects belonging to a GitLab group

  • List Group Subgroups

    List visible direct subgroups of a GitLab group

  • Get Pipeline Variables

    Retrieve variables of a specific pipeline in a GitLab project

  • List Pipeline Jobs

    List all jobs in a specific GitLab pipeline

  • Get Job

    Retrieve details of a specific CI/CD job in a GitLab project

  • Get Job Log

    Retrieve the log output of a CI/CD job in a GitLab project

  • List Repository Tree

    List files and directories in a GitLab project repository

  • Get Repository Contributors

    Retrieve the list of contributors for a GitLab project repository

  • Search Globally

    Search across all accessible GitLab resources

  • Search In Group

    Search within a specific GitLab group and its subgroups

  • Search In Project

    Search within a specific GitLab project

  • Fork Project

    Fork a GitLab project into a namespace

  • Archive Project

    Archive a GitLab project to make it read-only

  • Unarchive Project

    Unarchive a GitLab project to restore full access

  • Merge Merge Request

    Accept and merge a GitLab merge request

  • Rebase Merge Request

    Automatically rebase the source branch of a merge request against its target branch

  • Approve Merge Request

    Approve a GitLab merge request

  • Cancel Auto-Merge

    Cancel the auto-merge setting on a GitLab merge request

  • Cherry-Pick Commit

    Cherry-pick a commit onto a target branch in a GitLab project

  • Revert Commit

    Revert a commit in a GitLab project branch

  • Protect Branch

    Add branch protection rules to a GitLab project branch

  • Unprotect Branch

    Remove branch protection rules from a GitLab project branch

  • Retry Pipeline

    Retry failed or canceled jobs in a GitLab pipeline

  • Cancel Pipeline

    Cancel all jobs for a running pipeline in a GitLab project

  • Retry Job

    Retry a CI/CD job in a GitLab project

  • Compare Branches

    Compare two branches, tags, or commits in a GitLab project

  • Stop Environment

    Stop a running deployment environment in a GitLab project

  • Enable Project Deploy Key

    Enable an existing deploy key for a GitLab project

Set Up Your GitLab MCP Server in Minutes

One endpoint. Any framework. Your agent is talking to GitLab in under 10 lines of code.

MCP Clients

Agent Frameworks

Claude Desktop
{
  "mcpServers": {
    "stackone": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.stackone.com/mcp?x-account-id=<account_id>",
        "--header",
        "Authorization: Basic <YOUR_BASE64_TOKEN>"
      ]
    }
  }
}

More Developer Tools MCP Servers

Azure DevOps

172+ actions

Cloudflare

137+ actions

Bitbucket

134+ actions

Supabase

128+ actions

Terraform

118+ actions

OneLogin

109+ actions

LaunchDarkly

85+ actions

GitLab MCP Server FAQ

GitLab MCP server vs direct API integration — what's the difference?
A GitLab MCP server and direct API integration serve different use cases. Direct API integration is for software-to-software — backend code calling GitLab. A GitLab MCP server is for AI agents — MCP clients like Claude and Cursor, plus framework agents built with OpenAI, LangChain, or Vercel AI — discovering and calling GitLab at runtime. StackOne provides both.
How does GitLab authentication work for AI agents?
GitLab authentication for AI agents works through a StackOne Connect Session. Create one via the dashboard or the SDK — you get an auth link and ready-to-paste config for Claude Desktop, Cursor, and other MCP clients. Your user authenticates their own GitLab account; StackOne handles token exchange, storage, and refresh. Credentials never reach the LLM, and each user is isolated via origin_owner_id.
Are GitLab MCP tools vulnerable to prompt injection?
Yes — GitLab MCP tools can be vulnerable to indirect prompt injection. Any tool that reads user-written content — documents, messages, tickets, records, or free-text fields — is a potential vector. StackOne Defender scans every tool response before it enters the agent's context — regex patterns in ~1ms, then a MiniLM classifier in ~4ms. 88.7% accuracy, CPU-only.
What is the context bloat of a GitLab agent and how do I avoid it?
Context bloat happens when GitLab tool schemas and API responses eat your GitLab agent's memory, preventing it from reasoning effectively. A single GitLab query can return a massive JSON response, and connecting multiple tools compounds the problem. Tools Discovery and Code Mode reduce context bloat — loading only relevant tools per query and keeping raw responses out of the agent's context.
Can I limit which actions my GitLab agent can access?
Yes — you can limit which actions your GitLab agent can access directly from the StackOne dashboard. Toggle actions on or off, or restrict them to specific accounts, with no code changes to your agent. Session tokens can be scoped to exact actions so if one leaks, exposure stays contained.
Can I create custom agent actions for my GitLab MCP server?
Yes — you can create custom agent actions for your GitLab MCP server using Connector Builder. It's an integration agent your coding assistant (Claude Code, Cursor, or Copilot) can invoke to research GitLab's API, generate production-ready connector YAML, test against the live API, and validate before you ship.
When should I NOT use a GitLab MCP server?
Skip a GitLab MCP server if your integration is purely software-to-software — direct GitLab API integration is simpler when no AI agent is involved. For deterministic, compliance-critical operations (financial transactions, regulatory reporting), direct API gives you predictable behavior without agent-driven decision-making. MCP shines when AI agents need to dynamically discover and call GitLab actions at runtime.
What AI frameworks and AI clients does the StackOne GitLab MCP server support?
The StackOne GitLab MCP server supports both. MCP clients (paste-and-go apps): Claude Desktop, Claude Code, Cursor, VS Code, Goose. Agent frameworks (code SDKs you build with): OpenAI Agents SDK, Anthropic, Vercel AI, Google ADK, CrewAI, Pydantic AI, LangChain, LangGraph, Azure AI Foundry.

Put your AI agents to work

All the tools you need to build and scale AI agent integrations, with best-in-class connectivity, execution, and security.