Skip to main content

sonar-jira-sync

PyPI version License: MIT

Pull SonarQube issues, review them in a local web UI, and create JIRA tickets distributed equally among your team.

Features

  • Fetch issues from SonarQube, grouped by severity
  • Equal distribution of tickets among teammates (round-robin within each severity)
  • Local web UI for reviewing issues and approving ticket creation
  • CLI with summary and interactive mode
  • MCP server for AI assistant integration (Cursor, Claude, etc.)

Installation

pip install sonar-jira-sync

For MCP server support:

pip install sonar-jira-sync[mcp]

Note: If you get command not found: sonar-jira-sync after install, your Python scripts directory may not be on PATH. Add it:

# Find where pip installed the script
pip show -f sonar-jira-sync | grep "Location"

# Add to ~/.zshrc (macOS) or ~/.bashrc (Linux) — example for macOS:
echo 'export PATH="/Library/Frameworks/Python.framework/Versions/3.12/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Alternatively, use pipx install sonar-jira-sync which handles PATH automatically.

Quick Start

  1. Copy and customize the config:
cp config.example.yaml config.yaml
  1. Create a .env file with your credentials:
SONAR_TOKEN=your-sonarqube-token
JIRA_EMAIL=your-email@company.com
JIRA_TOKEN="your-jira-api-token"

Note: If your token contains special characters like =, wrap it in double quotes.

  1. Source the .env and run:
set -a && source .env && set +a
sonar-jira-sync run

Or get a CLI summary:

sonar-jira-sync summary

Tip: You must source .env in each new terminal session, or add set -a && source /path/to/.env && set +a to your ~/.zshrc for persistence.

Usage

CLI Commands

Command Description
sonar-jira-sync run Launch web UI for interactive review
sonar-jira-sync summary Show issues and distribution preview
sonar-jira-sync summary -s CRITICAL,MAJOR Filter by severity
sonar-jira-sync mcp Start MCP server

MCP Integration

Add to your Cursor MCP config (~/.cursor/mcp.json):

{
  "sonar-jira-sync": {
    "command": "sonar-jira-sync",
    "args": ["mcp", "-c", "/path/to/config.yaml"],
    "env": {
      "SONAR_TOKEN": "your-sonarqube-token",
      "JIRA_EMAIL": "your-email@company.com",
      "JIRA_TOKEN": "your-jira-api-token"
    }
  }
}

Note: If sonar-jira-sync is not on your PATH, use the full path to the binary:

"command": "/Library/Frameworks/Python.framework/Versions/3.12/bin/sonar-jira-sync"

Find it with: which sonar-jira-sync or pip show -f sonar-jira-sync

Available MCP tools:

  • fetch_issues - Get SonarQube issues grouped by severity
  • preview_distribution - Preview ticket distribution among teammates
  • create_jiras - Create JIRA tickets (requires explicit confirmation)
  • get_config_info - Show current configuration

Configuration

See config.example.yaml for all options. Sensitive values (tokens) are loaded from environment variables:

Variable Purpose
SONAR_TOKEN SonarQube authentication token
JIRA_EMAIL JIRA account email
JIRA_TOKEN JIRA API token

Publishing to PyPI

Build and upload:

pip install build twine
python -m build
twine upload dist/*

Contributing

  1. Clone the repo:
git clone https://github.com/arpanroy41/sonar-jira-sync.git
cd sonar-jira-sync
  1. Install in development mode:
pip install -e ".[dev]"
  1. Run tests:
pytest

License

MIT

Author

arpanroy41

Metadata

Release files for sonar-jira-sync 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sonar-jira-sync 0.1.0
File Size Uploaded Provenance Actions
sonar_jira_sync-0.1.0.tar.gz 14.9 kB Without provenance Details for sonar_jira_sync-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sonar-jira-sync 0.1.0
File Interpreter ABI Platform Actions
sonar_jira_sync-0.1.0-py3-none-any.whl Python 3 none any Details for sonar_jira_sync-0.1.0-py3-none-any.whl

Total release size: 34.2 kB

Release files / sonar_jira_sync-0.1.0.tar.gz

Download URL sonar_jira_sync-0.1.0.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
de0d393e84c8978b9690478b243c057596c43f3d0cb0db9a3c3306918e6db77e
BLAKE2b-256 checksum
How to use checksums
5678cfbda2208db5aa67bb7d73f52e0c050c172a953cf12fd9e0fc36c38ea13a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / sonar_jira_sync-0.1.0-py3-none-any.whl

Download URL sonar_jira_sync-0.1.0-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a828c9a2a548f475369a36388f0c7c9320bba76307150124036e349b85e60d2c
BLAKE2b-256 checksum
How to use checksums
192e3c5e1649b3fd006b4927d02a1a7761813d5b22da84c0c02fb3a97b6fc3fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for sonar-jira-sync 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page