OfficialVerified

GitLab MCP Server

GitLab API access for project management, file operations, and repository automation.

Data last scanned yesterday · Reviewed 2 months ago

169 tools293JavaScriptMIT

Overview

The GitLab MCP Server provides a direct interface to GitLab API functionality, allowing AI models to handle repository tasks and project management. Users can search for projects, read file contents, and create new repositories directly through their AI-assisted workflow. Advanced features include automatic branch creation for file updates, support for batch file operations, and the ability to open merge requests and issues. The server maintains Git history integrity by avoiding forced pushes during file operations.

Our verdict

This server carries a high-risk security score of 0/100 and should be avoided in sensitive environments. The repository is explicitly archived and unmaintained, with the last commit occurring over 400 days ago. Crucially, the server lacks an authentication method and provides full write access by default without a read-only mode, meaning any misconfiguration exposes significant risk to your GitLab projects.

  • Supports batch file and multi-file push operations
  • Maintains proper Git history without forced pushes
  • Uses a lightweight structure with only 4 dependencies
  • Repository is archived and no longer receives updates
  • Lacks authentication, posing a significant access risk
  • Full write access is granted without read-only restrictions

Setup

Claude Desktop
{
  "mcpServers": {
    "gitlab": {
      "args": [
        "-y",
        "@modelcontextprotocol/server-gitlab"
      ],
      "command": "npx"
    }
  }
}

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows), then restart Claude Desktop. Some servers require API keys or tokens as environment variables — check the project's README and add an "env" object if needed.

  • No read-only mode — running this grants full read/write access.
  • No built-in authentication — anyone with access to this config can invoke every tool it exposes.

Tools

ToolDescriptionRisk
create_or_update_fileCreate or update a single file in a projectmedium
push_filesPush multiple files in a single commitmedium
search_repositoriesSearch for GitLab projectslow
create_repositoryCreate a new GitLab projectmedium
get_file_contentsGet contents of a file or directorylow
create_issueCreate a new issuemedium
create_merge_requestCreate a new merge requestmedium
fork_repositoryFork a projectmedium
create_branchCreate a new branchmedium

Compatibility

ClientLocalDockerRemoteRead-only
ChatGPT
Claude Desktop
Cursor
VS Code
Windsurf

Frequently asked questions

What permissions are required for the Personal Access Token?

You need the 'api' scope for full access, 'read_api' for read-only tasks, or 'read_repository' and 'write_repository' for repository management.

Can I use this server with a self-hosted GitLab instance?

Yes, you can configure the server for self-hosted instances by setting the GITLAB_API_URL environment variable to your instance's API v4 endpoint.

Does this server handle branch creation automatically?

Yes, if you attempt to create, update, or push files to a branch that does not exist, the server will automatically create it for you.

What are the options for deploying the server?

You can run the server using Docker or via npx, both of which are supported in your client's configuration file.

Can I perform operations on multiple files at once?

Yes, the push_files tool allows you to push multiple files in a single commit.

Alternatives

Badge

GitLab MCP Server security score, rated on RepoAI

Maintain this server? Add the live badge to your README.