The GitLab MCP Server is a Model Context Protocol (MCP) server designed for seamless integration with GitLab. It provides a comprehensive set of tools to interact with GitLab repositories, issues, merge requests, wikis, and more. This server enhances GitLab functionality by offering features like group projects listing and activity tracking.
npm install @yoda.digital/gitlab-mcp-server
# Clone the repository
git clone https://github.com/yourusername/mcp-gitlab-server.git
cd mcp-gitlab-server
# Install dependencies
npm install
# Build the project
npm run build
The server requires the following environment variables when running directly:
- GITLAB_PERSONAL_ACCESS_TOKEN
(required): Your GitLab personal access token
- GITLAB_API_URL
(optional): The GitLab API URL (defaults to 'https://gitlab.com/api/v4')
- PORT
(optional): The port to use for SSE transport (defaults to 3000)
- USE_SSE
(optional): Set to 'true' to use SSE transport instead of stdio (defaults to 'false')
You can add the GitLab MCP server to your MCP settings file (e.g., cline_mcp_settings.json
or claude_desktop_config.json
):
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": ["-y", "@yoda.digital/gitlab-mcp-server"],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "your_token_here",
"GITLAB_API_URL": "https://gitlab.com/api/v4"
},
"alwaysAllow": [],
"disabled": false
}
}
}
# Set your GitLab personal access token
export GITLAB_PERSONAL_ACCESS_TOKEN=your_token_here
# Run the server
npm start
# Set your GitLab personal access token and enable SSE
export GITLAB_PERSONAL_ACCESS_TOKEN=your_token_here
export USE_SSE=true
export PORT=3000 # Optional, defaults to 3000
# Run the server
npm start
# Run directly with npx
GITLAB_PERSONAL_ACCESS_TOKEN=your_token_here npx @yoda.digital/gitlab-mcp-server
search_repositories
: Search for GitLab projectscreate_repository
: Create a new GitLab projectfork_repository
: Fork a GitLab projectlist_group_projects
: List all projects within a specific GitLab groupget_file_contents
: Get the contents of a file from a GitLab projectcreate_or_update_file
: Create or update a single file in a GitLab projectpush_files
: Push multiple files to a GitLab project in a single commitcreate_branch
: Create a new branch in a GitLab projectcreate_issue
: Create a new issue in a GitLab projectlist_issues
: Get issues for a GitLab project with filteringcreate_merge_request
: Create a new merge request in a GitLab projectlist_merge_requests
: Get merge requests for a GitLab project with filteringget_project_events
: Get recent events/activities for a GitLab projectlist_commits
: Get commit history for a GitLab projectlist_project_wiki_pages
: List all wiki pages for a GitLab projectget_project_wiki_page
: Get a specific wiki page for a GitLab projectcreate_project_wiki_page
: Create a new wiki page for a GitLab projectedit_project_wiki_page
: Edit an existing wiki page for a GitLab projectdelete_project_wiki_page
: Delete a wiki page from a GitLab projectupload_project_wiki_attachment
: Upload an attachment to a GitLab project wikilist_group_wiki_pages
: List all wiki pages for a GitLab groupget_group_wiki_page
: Get a specific wiki page for a GitLab groupcreate_group_wiki_page
: Create a new wiki page for a GitLab groupedit_group_wiki_page
: Edit an existing wiki page for a GitLab groupdelete_group_wiki_page
: Delete a wiki page from a GitLab groupupload_group_wiki_attachment
: Upload an attachment to a GitLab group wikinpm run build
npm test
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
This package is available on npm: https://www.npmjs.com/package/@yoda.digital/gitlab-mcp-server
Enhanced MCP server for GitLab: group projects listing and activity tracking
git gitlab ai mcp llm anthropic modelcontextprotocol
No releases published
No packages published