The GitLab MCP Server enables AI assistants to interact with GitLab resources via the Model Context Protocol (MCP). Key capabilities include:
Repository Management: Search, create, fork repositories and list group projects
File Operations: Read, create, update, and push multiple files in a single commit
Branch Operations: Create and manage branches
Issue Tracking: Create, list, and filter issues; access comments, notes, and discussions
Merge Request Handling: Create, list, and filter merge requests
Wiki Management: Manage project and group wikis including creating, editing, deleting pages and uploading attachments
Member Management: List and manage project and group members
Project Activity Tracking: Retrieve project events and commit history
Provides tools for interacting with GitLab repositories, including searching, creating, and forking repositories; reading, creating, and updating files; managing branches; handling issues and merge requests; accessing project events and commit history.
GitLab MCP Server
✨ Features
Comprehensive GitLab API Integration - Access repositories, issues, merge requests, wikis, and more
Both Transports Supported - Use with stdio or Server-Sent Events (SSE)
Consistent Response Formatting - Standardized pagination and response structures
Strong TypeScript Typing - Built with the MCP SDK for type safety
Complete Documentation - Examples for all available tools
🔍 Supported Operations
Repository Management - Search, create, fork repositories
File Handling - Read, create, update files
Branch Operations - Create and manage branches
Issue Tracking - Create, list, filter issues
Merge Requests - Create, list, review merge requests
Group Management - List group projects and members
Project Activity - Track events and commit history
Wiki Management - Full support for project and group wikis with attachments
Member Management - List and manage project/group members
🚀 Getting Started
Installation
From npm (Recommended)
From Source
Configuration
Environment Variables
The server requires the following environment variables:
Variable | Required | Default | Description |
| Yes | - | Your GitLab personal access token |
| No |
| GitLab API URL |
| No |
| Port for SSE transport |
| No |
| Set to 'true' to use SSE transport |
| No |
| Set to 'true' to enable read-only mode (see below) |
Read-Only Mode
When GITLAB_READ_ONLY_MODE is set to true, the server will only expose read operations. This is useful for client applications that shouldn't have write access to your GitLab resources. In read-only mode, the following tools will be available:
search_repositoriesget_file_contentslist_group_projectsget_project_eventslist_commitslist_issueslist_merge_requestslist_project_wiki_pagesget_project_wiki_pagelist_group_wiki_pagesget_group_wiki_pagelist_project_memberslist_group_members
Any attempt to use write operations (create, update, delete) will result in an error when in read-only mode.
MCP Settings Configuration
Add the GitLab MCP server to your MCP settings file:
For read-only mode, add the GITLAB_READ_ONLY_MODE environment variable:
Usage
With stdio transport (default)
With SSE transport
With npx
🛠️ Available Tools
Repository Operations
File Operations
Branch Operations
Issue Operations
Response Format:
Response Format:
Merge Request Operations
Project Activity
Member Operations
Response Format:
Response Format:
Project Wiki Operations
Group Wiki Operations
🔧 Development
Requirements
Node.js 16+
npm 7+
A GitLab account with a personal access token
Building the Project
Running Tests
Code Style and Linting
Release Process
Update version in
package.jsonUpdate CHANGELOG.md
Create a new release on GitHub
Publish to npm with
npm publish
📖 Documentation
For more detailed documentation, please visit our documentation site or check the TypeScript definitions in the source code.
💼 Use Cases
AI-powered Development Workflows - Enable AI assistants to interact with your GitLab repositories
Automated Issue and PR Management - Streamline development processes with AI support
Wiki Management - Automate documentation updates and knowledge base management
Team Collaboration - Integrate AI assistants into your team's GitLab workflow
📊 Roadmap
GitLab CI/CD Integration
Advanced Project Analytics
Comprehensive Test Suite
Support for GitLab GraphQL API
Extended Webhook Support
🤝 Contributing
Contributions are welcome and appreciated! Here's how you can contribute:
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Please make sure to update tests as appropriate and follow the code style of the project.
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
👥 Contributors
Thanks to all the contributors who have helped improve this project:
Special thanks to:
thomasleveil - Implemented GitLab member listing functionality for projects and groups with consistent response formatting
📦 NPM Package
This package is available on npm:
https://www.npmjs.com/package/@yoda.digital/gitlab-mcp-server
Related Resources
Related MCP Servers
- Asecurity-licenseAqualityMCP Server for the GitLab API, enabling project management, file operations, and more.Last updated -1,67372,811MIT License
- MIT License
- AsecurityAlicenseAqualityAn MCP server that enables communication with GitLab repositories, allowing interaction with GitLab's API to manage projects, issues, and repositories through natural language.Last updated -4516,1101MIT License