Enables interaction with GitLab instances, allowing users to manage projects, merge requests (view details, add comments, assign reviewers), access file content, list releases, and view user information.
Provides comprehensive Jira ticket management capabilities, including retrieving ticket details, adding comments, searching with JQL, creating new tickets, transitioning tickets between statuses, and updating ticket fields.
MCP GitLab Jira Server
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.
- 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.
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
- Install the package globally:
- Set up environment variables:
- 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
- Pull and run the Docker container:
- 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
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.gitlab_list_projects_by_name
: Filters GitLab projects by name using a fuzzy, case-insensitive match.gitlab_list_all_projects
: Lists all accessible GitLab projects.gitlab_list_all_releases
: Fetches releases for a given GitLab project.gitlab_list_releases_since_version
: Filters releases for a given GitLab project since a specific version.gitlab_get_user_id_by_username
: Retrieves the GitLab user ID for a given username.gitlab_get_user_activities
: Fetches activities for a given GitLab user by their username, optionally filtered by date.
Jira Tools
jira_get_jira_ticket_details
: Fetches detailed information about a Jira ticket.jira_get_jira_ticket_comments
: Fetches comments for a Jira ticket.jira_add_comment_to_ticket
: Adds a comment to a Jira ticket.jira_search_tickets_by_jql
: Searches for Jira tickets using a JQL (Jira Query Language) string.jira_create_ticket
: Creates a new Jira ticket with given fields.jira_get_available_transitions
: Fetches available transitions for a Jira ticket.jira_update_ticket
: Updates a Jira ticket summary, description, labels.jira_update_custom_fields
: Updates custom fields on a Jira ticket.jira_transition_ticket
: Transitions a Jira ticket to a new status.
Troubleshooting
Common Issues
- "Cannot find module" errors: If you are developing locally, make sure you've run
npm install
andnpm run build
. - Authentication errors: Verify your
GITLAB_ACCESS_TOKEN
,ATLASSIAN_USER_EMAIL
, andATLASSIAN_API_TOKEN
have the necessary permissions. - Connection errors: Ensure your
GITLAB_URL
andATLASSIAN_SITE_NAME
are correct and accessible. - Server not responding: Check that the MCP server process is running and the path in your config is correct.
Debug Mode
To see detailed logs, you can run the server directly:
Development
For development, clone the repository and install the dependencies.
Local Docker Development
To test the Docker build locally before pushing:
This script will build the Docker image and run basic tests to ensure it works correctly.
For maintainers: See Docker Setup Guide for information about setting up automated Docker Hub publishing.
Project Structure
src/index.ts
: Main MCP server implementationsrc/gitlab.service.ts
: GitLab API clientsrc/gitlab.ts
: GitLab type definitionssrc/jira.service.ts
: Jira API clientsrc/jira.ts
: Jira type definitionsdist/
: Compiled JavaScript output
Adding New Features
- Add new methods to the
GitLabService
orJiraService
class. - Define new tools in the
allTools
array inindex.ts
. - Add a corresponding case in the tool handler in
index.ts
. - Rebuild with
npm run build
.
License
ISC
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
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.
Related MCP Servers
- AsecurityAlicenseAqualityModel Context Protocol (MCP) server for Atlassian Cloud products (Confluence and Jira). This integration is designed specifically for Atlassian Cloud instances and does not support Atlassian Server or Data Center deployments.Last updated -272,628PythonMIT License
- -securityFlicense-qualityA specialized Model Context Protocol (MCP) server that integrates Google services (Gmail, Calendar, etc.) into your AI workflows. This server enables seamless access to Google services through MCP, allowing AI agents to interact with Gmail, Google Calendar, and other Google services.Last updated -103TypeScript
- AsecurityAlicenseAqualityGitLabとの連携機能を提供するModel Context Protocol (MCP) サーバーです。GitLabの特定のプロジェクトからパイプラインの失敗情報やマージリクエストへの指摘事項を取得し、AIアシスタントに提供します。Last updated -32PythonMIT License
- -securityFlicense-qualityA Model Context Protocol (MCP) server that enables interaction with JIRA APIs through Claude Desktop, allowing users to search, create, update, and manage JIRA issues using natural language commands.Last updated -Python