yoda_digital_mcp_gitlab_server

yoda_digital_mcp_gitlab_server

by yoda-digital
An MCP server for GitLab integration, enabling repository operations, issue management, and activity tracking.

GitLab MCP Server for Repository and Activity Management

Overview

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.

Features

  • Support for both stdio and SSE transports
  • Strict TypeScript typing with the MCP SDK
  • Comprehensive GitLab API integration
  • Repository operations (search, create, fork)
  • File operations (read, create, update)
  • Branch operations (create)
  • Issue management (create, list, filter)
  • Merge request handling (create, list, filter)
  • Group projects listing
  • Project events retrieval
  • Commit history access
  • Complete wiki management:
  • Project wiki support (list, get, create, edit, delete pages)
  • Group wiki support (list, get, create, edit, delete pages)
  • Wiki attachment handling
  • Multiple wiki formats (markdown, rdoc, asciidoc, org)

Installation

From npm (Recommended)

npm install @yoda.digital/gitlab-mcp-server

From Source

# 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

Configuration

Environment Variables

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')

MCP Settings Configuration

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
    }
  }
}

Usage

Running with stdio transport (default)

# Set your GitLab personal access token
export GITLAB_PERSONAL_ACCESS_TOKEN=your_token_here

# Run the server
npm start

Running with SSE transport

# 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

Running with npx

# Run directly with npx
GITLAB_PERSONAL_ACCESS_TOKEN=your_token_here npx @yoda.digital/gitlab-mcp-server

Available Tools

Repository Operations

  • search_repositories: Search for GitLab projects
  • create_repository: Create a new GitLab project
  • fork_repository: Fork a GitLab project
  • list_group_projects: List all projects within a specific GitLab group

File Operations

  • get_file_contents: Get the contents of a file from a GitLab project
  • create_or_update_file: Create or update a single file in a GitLab project
  • push_files: Push multiple files to a GitLab project in a single commit

Branch Operations

  • create_branch: Create a new branch in a GitLab project

Issue Operations

  • create_issue: Create a new issue in a GitLab project
  • list_issues: Get issues for a GitLab project with filtering

Merge Request Operations

  • create_merge_request: Create a new merge request in a GitLab project
  • list_merge_requests: Get merge requests for a GitLab project with filtering

Project Activity

  • get_project_events: Get recent events/activities for a GitLab project
  • list_commits: Get commit history for a GitLab project

Project Wiki Operations

  • list_project_wiki_pages: List all wiki pages for a GitLab project
  • get_project_wiki_page: Get a specific wiki page for a GitLab project
  • create_project_wiki_page: Create a new wiki page for a GitLab project
  • edit_project_wiki_page: Edit an existing wiki page for a GitLab project
  • delete_project_wiki_page: Delete a wiki page from a GitLab project
  • upload_project_wiki_attachment: Upload an attachment to a GitLab project wiki

Group Wiki Operations

  • list_group_wiki_pages: List all wiki pages for a GitLab group
  • get_group_wiki_page: Get a specific wiki page for a GitLab group
  • create_group_wiki_page: Create a new wiki page for a GitLab group
  • edit_group_wiki_page: Edit an existing wiki page for a GitLab group
  • delete_group_wiki_page: Delete a wiki page from a GitLab group
  • upload_group_wiki_attachment: Upload an attachment to a GitLab group wiki

Development

Building the Project

npm run build

Running Tests

npm test

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

NPM Package

This package is available on npm: https://www.npmjs.com/package/@yoda.digital/gitlab-mcp-server

About

Enhanced MCP server for GitLab: group projects listing and activity tracking

yoda.digital

Topics

git gitlab ai mcp llm anthropic modelcontextprotocol

Resources

Readme

License

MIT license

Activity

Custom properties

Stars

3 stars

Watchers

1 watching

Forks

1 fork

Report repository

Releases


No releases published

Packages 0


No packages published

Languages

Features & Capabilities

Categories
mcp_server model_context_protocol gitlab typescript javascript api_integration repository_management issue_tracking wiki_management

Implementation Details

Stats

0 Views
0 Likes
3 GitHub Stars

Repository Info

yoda-digital Organization

Similar Servers

continuedev_continue by continuedev
0
0
0

Recently Viewed