Skip to main content

Jira Integration for Release Notes

This document explains how to access Jira from Cursor to create release notes from Jira issues with fix version filters.

Current Status

You have an MCP Atlassian server configured at ~/.cursor/mcp.json, but it’s currently experiencing dependency issues with Pydantic:
TypeError: cannot specify both default and default_factory

Available Solutions

Two scripts are provided in the /scripts directory:

1. List Available Fix Versions

# List all projects and their versions
node scripts/jira-list-versions.js

# List versions for a specific project
node scripts/jira-list-versions.js FLOWX

2. Generate Release Notes from Fix Version

# Generate release notes for a specific fix version
node scripts/jira-release-notes.js "5.2.1"
This script will:
  • Fetch all issues with the specified fix version
  • Group them by type (Features, Improvements, Bug Fixes)
  • Display them in an organized format
  • Generate an MDX template for your release notes
Output includes:
  • Issue summaries and descriptions
  • Status, priority, and components
  • Links to Jira issues
  • Ready-to-use MDX template

Option 2: Fix the MCP Atlassian Server

The MCP server integration would allow you to query Jira directly from Cursor’s chat interface.

Current Configuration

Your MCP configuration (~/.cursor/mcp.json):
{
  "mcpServers": {
    "mcp-atlassian": {
      "command": "uvx",
      "args": [
        "mcp-atlassian",
        "--jira-url=https://flowxai.atlassian.net",
        "--jira-username=dragos@flowx.ai",
        "--jira-token=ATATT3xFfGF0l0wJbnogb-XT_Tiggm8x_I-sWdeizG-CTxQ4p3b_-Nb8i6_7t5AXeaJeFkXPT2RwxiW1iTeAXX0g5bzhfBZ8YhOq4H7Qa_cNDP9AIxiDoB_K1BHLGaUqztbN6SUE2kqw_G1EYS1iRCBmVdHaE11gOd3Po8oeY1o0nLN8PsmcDhs=D55AB1B7"
      ]
    }
  }
}

Steps to Fix

  1. Update the mcp-atlassian package:
# Clear uvx cache
rm -rf ~/.cache/uv/

# Update the package
uvx --reinstall mcp-atlassian --version
  1. Alternative: Use a specific version:
Update your ~/.cursor/mcp.json to pin a working version:
{
  "mcpServers": {
    "mcp-atlassian": {
      "command": "uvx",
      "args": [
        "mcp-atlassian@latest",
        "--jira-url=https://flowxai.atlassian.net",
        "--jira-username=dragos@flowx.ai",
        "--jira-token=YOUR_TOKEN_HERE"
      ]
    }
  }
}
  1. Restart Cursor after making changes
  2. Check the logs:
tail -f ~/.cursor/MCP:\ user-mcp-atlassian.log

Option 3: Manual Jira API Queries

You can also use curl or any HTTP client to query Jira directly:
# List projects
curl -u "dragos@flowx.ai:YOUR_TOKEN" \
  -H "Accept: application/json" \
  "https://flowxai.atlassian.net/rest/api/3/project"

# Search for issues by fix version
curl -u "dragos@flowx.ai:YOUR_TOKEN" \
  -H "Accept: application/json" \
  "https://flowxai.atlassian.net/rest/api/3/search?jql=fixVersion='5.2.1'"

Troubleshooting

Error: “Site temporarily unavailable”

This could mean:
  1. Jira is temporarily down
  2. Authentication credentials need to be refreshed
  3. API endpoint URL needs adjustment
Solution:

MCP Server Won’t Start

Solution:
  1. Check the logs: tail -50 ~/.cursor/MCP:\ user-mcp-atlassian.log
  2. Clear the UV cache: rm -rf ~/.cache/uv/
  3. Restart Cursor

API Token Expired

Solution:
  1. Go to: https://id.atlassian.com/manage-profile/security/api-tokens
  2. Create a new API token
  3. Update the token in:
    • ~/.cursor/mcp.json (for MCP server)
    • /scripts/jira-release-notes.js (for Node.js scripts)

Usage Examples

Example 1: Generate Release Notes for Version 5.2.1

node scripts/jira-release-notes.js "5.2.1" > release-notes-5.2.1.txt

Example 2: Find All Unreleased Versions

node scripts/jira-list-versions.js FLOWX | grep "🚧 Unreleased"

Example 3: Copy Output to Clipboard (macOS)

node scripts/jira-release-notes.js "5.2.1" | pbcopy

Next Steps

  1. Test the scripts: Try running node scripts/jira-list-versions.js to verify connectivity
  2. Generate sample release notes: Run node scripts/jira-release-notes.js "<version>" with a known version
  3. Fix MCP server (optional): If you want Cursor integration, follow the MCP server fix steps above

Security Note

⚠️ Important: The scripts contain your Jira API token. Do not commit these files to version control if you’ve added your token. Consider using environment variables instead:
const JIRA_TOKEN = process.env.JIRA_API_TOKEN || 'YOUR_TOKEN_HERE';
Then export the token in your shell:
export JIRA_API_TOKEN="your-token-here"

Support

If you continue experiencing issues:
  1. Check the Jira REST API documentation
  2. Verify your Jira Cloud instance is accessible
  3. Test authentication with a simple curl command
  4. Check if your API token has the required permissions