Get the FREE Ultimate OpenClaw Setup Guide →

gitlab -swift

GitLab MCP server written in Swift - Provides GitLab CLI integration for AI assistants via Model Context Protocol

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio doozmen-gitlab-mcp-swift /Users/YOUR_USERNAME/.swiftpm/bin/git-lab-mcp --log-level info \
  --env PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"

How to use

This MCP server wraps the GitLab CLI (glab) to expose GitLab functionality to Claude Desktop and other MCP-compatible clients. It provides a Swift-based, high-performance MCP server with native async handling, offering a range of core tools that map to common GitLab operations: glab_mr for merge requests, glab_issue for issue management, glab_ci for CI/CD pipelines, glab_repo for repository actions, and direct API access via glab_api. You can also manage authentication with glab_auth and inspect version information via glab_version. The server includes smart prompts such as my-mrs, create-mr, daily-standup, and review-pipeline to streamline workflows without needing to remember exact commands. Use the glab_raw tool to execute any glab command directly if a specific workflow isn’t covered by the core tools. To start using it, configure Claude Desktop with the provided executable path and environment, then invoke prompts or tools to perform GitLab tasks through natural language prompts.

How to install

Prerequisites:

  • macOS with Swift 5.9+ (via Xcode)
  • GitLab CLI (glab) installed and authenticated
  • Claude Desktop or another MCP-compatible client

Quick Install

# Clone the repository
git clone https://github.com/yourusername/gitlab-mcp-swift.git
cd gitlab-mcp-swift

# Run the install script
./install.sh

The install script will:

  1. Build the server using Swift Package Manager
  2. Install it to ~/.swiftpm/bin/git-lab-mcp
  3. Display the configuration for Claude Desktop

Manual Installation
```bash
# Build the project
swift build -c release

# Install to a location in your PATH
cp .build/release/git-lab-mcp ~/.swiftpm/bin/

Additional notes

Tips and troubleshooting:

  • Ensure glab is installed and authenticated: run glab auth login and glab auth status.
  • The server relies on the system glab credentials; if you switch GitLab instances, re-authenticate with glab.
  • In Claude Desktop, ensure the executable path matches the install location (default ~/.swiftpm/bin/git-lab-mcp).
  • If the server fails to start, check that the PATH in the config includes your Homebrew or system bin directories and that Swift tools are available.
  • For debugging, run with --log-level debug to surface more verbose output.
  • You can adjust log verbosity by changing the --log-level flag in the mcp_config.
  • If you need to customize the GitLab host or API access, use glab’s authentication commands or configure glab via glab auth login --hostname <host>.

Related MCP Servers

Sponsor this space

Reach thousands of developers