- Home
- MCP servers
- Jira GitLab
Jira GitLab
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"gabbar910-mcpjiragitlab": {
"command": "python",
"args": [
"mcp_server.py"
],
"env": {
"JIRA_EMAIL": "your-email@example.com",
"JIRA_BASE_URL": "https://yourcompany.atlassian.net",
"JIRA_API_TOKEN": "your-jira-api-token",
"GITLAB_BASE_URL": "https://gitlab.com",
"GITLAB_ACCESS_TOKEN": "your-gitlab-personal-access-token"
}
}
}
}You run a Python MCP server that links Jira and GitLab to automate issue tracking, branch creation, and code fixes with AI assistance. It helps you manage Jira issues and GitLab repositories in one end-to-end workflow, speeding up development and improving reliability.
How to use
You interact with the MCP server through your MCP client or automation pipelines. Start by ensuring your Jira and GitLab credentials are configured, then trigger actions that fetch Jira issues, create GitLab branches for those issues, analyze issues with AI, commit fixes, and open draft merge requests. The system supports asynchronous operations, robust error handling, and retry logic, so workflows can continue even if temporary network or API hiccups occur. Use the available tools to fetch issues, create branches, comment on issues, run AI-driven analyses, commit fixes, and manage merge requests, all while keeping Jira issue statuses in sync.
Typical end-to-end usage patterns include: obtaining a list of Jira issues by project or tag, generating and validating AI-derived fixes, creating GitLab branches named after the issue key, committing changes with a descriptive message, and generating a draft merge request. After changes pass validation, you can update the Jira issue status to reflect progress and optionally auto-merge approved fixes.
How to install
Prerequisites you need before installing the MCP server: Python 3.8 or newer, a Jira account with API access, and a GitLab account with a Personal Access Token.
# Prerequisites
python3 --version
pip --version
# Optional: create a virtual environment
python -m venv venv
source venv/bin/activate # on Unix or macOS
venv\Scripts\activate # on Windows
Install the MCP server dependencies and start the server with the following steps.
git clone <repository-url>
cd mcp-jira-gitlab
pip install -r requirements.txt
# Run the MCP server
python mcp_server.py
Configure credentials using either environment variables or a configuration file.
# Option A: Environment Variables (Recommended)
export JIRA_BASE_URL="https://yourcompany.atlassian.net"
export JIRA_EMAIL="your-email@example.com"
export JIRA_API_TOKEN="your-jira-api-token"
export GITLAB_BASE_URL="https://gitlab.com"
export GITLAB_ACCESS_TOKEN="your-gitlab-personal-access-token"
# Option B: Configuration File
cp config.json.sample config.json
# Edit config.json with your credentials
Additional configuration and usage notes
Environment variables listed above are required for proper operation. The Jira base URL, Jira user email, and Jira API token must be provided, and the GitLab access token is required unless you rely on a different authentication method described in your setup.
If you prefer a local start command, you will run the MCP server as a standard Python script. The runtime exposes an asynchronous API to handle MCP tool calls from your client.
Security considerations include rotating API tokens regularly, using HTTPS for all communications, and limiting token permissions to the minimum required scope.
Troubleshooting tips include checking that base URLs are correct, ensuring network connectivity, and confirming that the Jira user and GitLab token have the necessary permissions for the intended operations.
Available tools
create_branch_for_issue
Creates a GitLab branch for a Jira issue and links them.
get_jira_issues
Fetch Jira issues using a JQL query.
comment_on_issue
Add a comment to a Jira issue.
get_issues_by_tags
Fetch Jira issues by project and tags (labels).
analyze_and_fix_issue
Use AI to analyze a Jira issue and generate code fixes.
commit_ai_fix
Commit AI-generated fixes to a GitLab branch with validation.
create_merge_request
Create a GitLab merge request.
update_issue_status
Update Jira issue status and add comments.
sre_ai_workflow
Complete SRE AI workflow: fetch tagged issues, create fixes, and update status.