📇 ☁️ 🏠 - GitLab and Jira: manage projects, merge requests, files, releases and tickets
MCP GitLab Jira Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A Model Context Protocol (MCP) server for GitLab and Jira integration. This server allows AI agents like gemini-cli to interact with your GitLab and Jira instances.
Features
GitLab
- **Projects**: List all accessible projects or filter them by name.
- **Merge Requests**: List merge requests for a project, get detailed information (including diffs), add comments, and assign reviewers.
- **Pipeline/CI/CD**: Get pipeline status, trigger/retry/cancel pipelines, get job details and logs.
- **Branch Management**: List, create, delete branches and get branch details.
- **Issue Management**: Create, list, update, close issues and manage comments.
- **Files**: Get the content of a specific file at a given SHA.
- **Releases**: List all releases for a project or filter them since a specific version.
- **Users**: List project members, get a user's ID by username, and get user activities.
Jira
- **Tickets**: Get detailed information about a ticket, get comments, add comments, search for tickets using JQL, create new tickets, get available transitions, update tickets, and transition tickets to a new status.
- **Project Management**: Get all projects, project details, components, and versions.
Setup
Prerequisites
- Node.js 18+
- GitLab Personal Access Token with API access
- Jira API Token
- Access to a GitLab instance (on-premise or GitLab.com)
- Access to a Jira instance
Installation
1. **Install the package globally:**
2. **Set up environment variables:**
3. **Test the server manually**:
The server should start and log "GitLab/Jira MCP server started" to stderr.
Using with MCP Clients
Configuration for gemini-cli or other MCP clients
Create or update your MCP configuration file (usually ~/.mcp/config.json or similar):
Running with Docker
You can also run this MCP server in a Docker container using the pre-built image from Docker Hub.
Available Docker Images
The Docker images are automatically built and published to Docker Hub for each release:
- **Latest release**: hainanzhao/mcp-gitlab-jira:latest
- **Specific versions**: hainanzhao/mcp-gitlab-jira:v0.1.2, hainanzhao/mcp-gitlab-jira:v0.1.1, etc.
- **View all available tags**: Docker Hub - mcp-gitlab-jira
The images are built for multiple architectures: linux/amd64 and linux/arm64 (Apple Silicon compatible).
Usage
1. **Pull and run the Docker container:**
2. **Alternative: Run without persistent container (one-time execution):**
Using with MCP Clients (Docker)
You have two options for using the Docker container with MCP clients:
Option 1: Using a persistent container (recommended)
First, start the container as shown above, then update your MCP configuration file. The env block is empty because the necessary environment variables are passed directly to the container using the -e flag in the docker run command.
Option 2: Using one-time execution
This runs a new container for each MCP session:
Available Tools
GitLab Tools
Core GitLab Tools
- gitlab_get_merge_request_details: Fetches detailed information about a GitLab Merge Request, including file diffs.
- gitlab_get_file_content: Fetches the content of a specific file at a given SHA in a GitLab project.
- gitlab_add_comment_to_merge_request: Adds a comment to a GitLab Merge Request. Can be a general comment, a reply to an existing discussion, or an inline comment on a specific line.
- gitlab_list_merge_requests: Lists merge requests for a given GitLab project.
- gitlab_assign_reviewers_to_merge_request: Assigns reviewers to a GitLab Merge Request.
- gitlab_list_project_members: Lists all members (contributors) of a given GitLab project.
- gitlab_list_project_members_by_project_name: Lists all members (contributors) of a given GitLab project by project name.