GitLab CLI MCP Server
About
Seamlessly integrate AI assistants with GitLab using the glab CLI tool.
Details
- Author
- doozmen
- Categories
- Developer Tools, Other, Infrastructure
Jump to
Setup
Install GitLab CLI MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/doozmen/gitlab-mcp-swift
Follow the installation instructions in the repository README, then restart your MCP client.
Seamlessly integrate AI assistants with GitLab using the glab CLI tool.
A Model Context Protocol (MCP) server that wraps the GitLab CLI (glab) to provide GitLab functionality to AI assistants like Claude Desktop.
- πNative Swift implementationusing the official MCP Swift SDK
- π§Full GitLab CLI integration- supports allglabcommands
- π―Smart promptsfor common workflows (merge requests, CI/CD, daily standup)
- πJSON output parsingwith fallback to plain text
- πSecure authenticationvia systemglabcredentials
- β‘High performancewith Swift's async/await concurrency
- macOS (Swift 5.9+ installed via Xcode)
- glab CLIinstalled and authenticated
- Claude Desktop or another MCP-compatible client
# Clone the repository git clone https://github.com/yourusername/gitlab-mcp-swift.git cd gitlab-mcp-swift # Run the install script ./install.sh
- Build the server using Swift Package Manager
- Install it to~/.swiftpm/bin/git-lab-mcp
- Display the configuration for Claude Desktop
# Build the project swift build -c release # Install to a location in your PATH cp .build/release/git-lab-mcp ~/.swiftpm/bin/
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):
{ "mcpServers": { "gitlab": { "command": "/Users/YOUR_USERNAME/.swiftpm/bin/git-lab-mcp", "args": ["--log-level", "info"], "env": { "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin" } } } }
The server uses your existingglabCLI authentication:
# Login to GitLab glab auth login # Check authentication status glab auth status
- glab_mr- Merge request operations (list, create, view, merge, approve)
- glab_issue- Issue management (list, create, view, close, update)
- glab_ci- CI/CD pipeline operations (view, list, run, retry)
- glab_repo- Repository operations (clone, fork, view, archive)
- glab_api- Direct GitLab API access
- glab_auth- Authentication management
- glab_version- Version information
- glab_raw- Execute any glab command directly
The server includes intelligent prompts for common workflows:
- my-mrs- Check your merge requests
- create-mr- Create a merge request with guided parameters
- daily-standup- Gather GitLab activity for daily standups
- review-pipeline- Review CI/CD pipeline status
Use the prompt "my-mrs" to see all your open merge requests
Use the prompt "create-mr" with: - title: "Fix: Memory leak in user service" - source_branch: "fix/memory-leak" - target_branch: "main"
Use tool "glab_ci" with: - subcommand: "run" - repo: "myteam/myproject"
# Clone the repository git clone https://github.com/yourusername/gitlab-mcp-swift.git cd gitlab-mcp-swift # Build in debug mode swift build # Run tests swift test # Build for release swift build -c release
gitlab-mcp-swift/ βββ Sources/ β βββ GitLabMCP/ β βββ GitLabMCPServer.swift # Main server implementation β βββ GitLabMCPCommand.swift # CLI entry point β βββ GitLabCLI.swift # GitLab CLI wrapper βββ Package.swift # Swift package manifest βββ install.sh # Installation script βββ README.md # This file
- Ensureglabis installed:which glab
- Check authentication:glab auth status
- Run with debug logging:--log-level debug
Commands return "not authenticated"
- Runglab auth loginto authenticate
- For self-hosted instances:glab auth login --hostname your.gitlab.instance
- Restart Claude Desktop after configuration changes
- Check the logs in Claude Desktop's developer console
- Verify the executable path is correct in the configuration
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details
- Built with theModel Context Protocol Swift SDK
- Wraps the excellentGitLab CLI (glab)
- Inspired by the need for better GitLab integration in AI assistants
An improved GitLab MCP server with bug fixes, providing access to GitLab projects, issues, and merge requests.
An improved GitLab MCP server with bug fixes and enhancements for accessing GitLab resources.
A custom GitLab server for interacting with repositories, issues, and merge requests. Requires a GitLab Personal Access Token.
Interact with GitHub APIs for automation and repository management.
Integrates with GitHub APIs for advanced automation and interaction, supporting both remote and local deployments.
Integrate with GitHub APIs for automation and interaction.
Seamlessly integrate with GitHub APIs for development automation and interaction.
Seamlessly integrate with GitHub APIs for development automation and interaction.
Integrates with the GitLab REST API to manage repositories, issues, and merge requests.
A GitLab integration server providing access to GitLab's RESTful API tools, built on the fastmcp framework.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





