Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GitLab MCP Serverlist all open merge requests for the frontend-app project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GitLab MCP Server
A comprehensive Model Context Protocol (MCP) server that provides seamless GitLab API integration for Claude Desktop and other MCP clients. Manage your entire GitLab workflow through natural language commands - from project creation to repository operations, CI/CD management, and team collaboration.
🚀 Quick Start
🔌 Transport Options
GitLab MCP Server supports three transport types:
See TRANSPORT_OPTIONS.md for detailed configuration.
✨ Key Features
Complete GitLab Integration: 46+ tools covering all major GitLab operations
Natural Language Interface: Control GitLab through conversational commands
Zero Configuration: Works out-of-the-box with your GitLab Personal Access Token
Comprehensive Coverage: Projects, repositories, issues, merge requests, CI/CD, and more
Local Repository Cloning: Clone repositories directly to your local machine
Batch Operations: Perform bulk operations across multiple projects
🛠️ Available Tools (46 Total)
📁 Project Management (12 tools)
Tool | Description |
| Create new GitLab projects with custom settings |
| Permanently delete GitLab projects |
| Modify project name, description, visibility |
| Fork projects to different namespaces |
| Archive projects for long-term storage |
| Restore archived projects |
| List all accessible projects with filters |
| Search projects by name or keywords |
| View project milestones and deadlines |
| List all project labels and colors |
| View configured webhooks |
| Get current user information and permissions |
📝 Issue Management (4 tools)
Tool | Description |
| List issues with state filtering |
| Create new issues with descriptions |
| Modify issue title, description, state |
| Close specific issues |
🔀 Merge Request Management (2 tools)
Tool | Description |
| List merge requests by state |
| Create new merge requests |
| Merge approved merge requests |
📄 File Operations (5 tools)
Tool | Description |
| Create new files with content |
| Modify existing file content |
| Remove files from repository |
| Read file contents |
| Browse directory structures |
🌿 Repository & Git Operations (15 tools)
Tool | Description |
| List all repository branches |
| Create new branches from any reference |
| Remove branches safely |
| View commit history |
| Create commits with multiple file changes |
| Compare differences between branches |
| Revert specific commits |
| Cherry-pick commits between branches |
| List all repository tags |
| Create release tags |
| Remove tags |
| Clone single repository locally |
| Batch clone all group repositories |
🚀 CI/CD Operations (3 tools)
Tool | Description |
| Monitor pipeline status |
| View individual job details |
| Start new pipeline runs |
👥 Groups & Collaboration (3 tools)
Tool | Description |
| List accessible GitLab groups |
| View group membership |
| Get user profile information |
Installation
Using uvx (Recommended)
Using uv
From source
Setup
Get GitLab Personal Access Token:
Go to GitLab → Settings → Access Tokens
Create token with
apiscopeCopy the token
Set environment variables:
export GITLAB_TOKEN="your_token_here" export GITLAB_URL="https://gitlab.com" # optionalTest the server:
gitlab-mcp
Configuration
Claude Desktop Configuration
Add to your Claude Desktop config (%APPDATA%\Claude\claude_desktop_config.json):
Using stdio transport (recommended)
Using HTTP transport
If you're running the server with Streamable HTTP transport:
Headers Integration
For applications using MCPToolset, connect with headers:
💬 Usage Examples
Control GitLab through natural language commands:
Project Management:
"Create a new private project called 'microservice-api'"
"Fork the kubernetes/dashboard project to my namespace"
"Archive the old legacy-system project"
Issue & Code Review:
"Show all open issues in the backend-service project"
"Create merge request from feature/auth-system to main branch"
"Merge the approved MR #23 in mobile-app project"
Repository Operations:
"Create a new config.yaml file with database configuration"
"Show all branches in the web-application project"
"Clone the microservices-platform project to ./local-dev"
CI/CD & Teams:
"Show running pipelines for the deployment project"
"List all my GitLab groups and their members"
🔧 Authentication Setup
GitLab Personal Access Token
Go to GitLab → Settings → Access Tokens
Create token with these scopes:
✅
api- Full API access✅
read_repository- Read repository data✅
write_repository- Write repository data✅
read_user- Read user information
Copy the generated token
Environment Variables
Variable | Description | Default |
| Personal Access Token | Required |
| GitLab instance URL |
|
🔒 Security Best Practices
Never commit tokens to version control
Use environment variables for token storage
Set token expiration dates when possible
Rotate tokens regularly for enhanced security
Use minimal required scopes for your use case
🐛 Troubleshooting
Token Issues:
❌
GITLAB_TOKEN not set→ Set environment variable or provide in headers❌
401 Unauthorized→ Check token permissions and validity❌
403 Forbidden→ Verify project access permissions
Git Operations:
❌
Git command not found→ Install Git and add to PATH
Test Connection:
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Related Projects
Made with ❤️ for the GitLab and MCP community