npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ticket-automation-mcp

v1.2.3

Published

MCP server for automated ticket fixing workflow with Jira and Bitbucket integration

Readme

Ticket Automation MCP Server

An MCP (Model Context Protocol) server that automates the complete ticket-fixing workflow by orchestrating Jira, Bitbucket, and Git operations.

Overview

This MCP server provides a "fix it" workflow that:

  1. Analyzes Jira tickets - Extracts version, type, components, and root cause
  2. Creates version-aware branches - Automatic branch naming based on ticket version
  3. Automates Git operations - Branch creation, commits, and pushes
  4. Generates PR plans - Properly formatted PRs for Bitbucket
  5. Creates RCA blocks - For Jira ticket updates

Features

  • ✅ Version parsing from tickets (1.4.x, 2.0.1, hotfix-1.3.2, next)
  • ✅ Automatic branch naming (bugfix/PROJ-123-v1.4.2-short-desc)
  • ✅ Conventional commit format
  • ✅ PR description templates
  • ✅ RCA block generation
  • ✅ Dry-run mode for testing
  • ✅ Full workflow automation
  • 🆕 Self-Driven Library Detection - Automatically detects if issue originates from node_modules library
  • 🆕 Smart Routing - Routes fixes to library repo or consumer repo automatically
  • 🆕 Multi-Repo Awareness - Identifies all consumer repos affected by library changes

Prerequisites

  • Node.js 16+
  • Git repository configured with Bitbucket remote
  • Jira and Bitbucket API tokens

📦 Installation

Option 1: Install from npm (Recommended)

npm install -g ticket-automation-mcp

Option 2: Clone and install

cd ticket-automation-mcp
npm install
npm run build

Configuration

Add to your Windsurf MCP configuration (~/.codeium/windsurf/mcp_config.json):

Using npm package (Recommended)

{
  "mcpServers": {
    "ticket-automation": {
      "command": "npx",
      "args": ["ticket-automation-mcp"],
      "disabled": false,
      "env": {
        "JIRA_BASE_URL": "https://jira.company.com",
        "JIRA_API_TOKEN": "your-jira-personal-access-token",
        "BITBUCKET_URL": "https://bitbucket.company.com",
        "BITBUCKET_API_TOKEN": "your-bitbucket-personal-access-token",
        "BITBUCKET_USER_EMAIL": "[email protected]",
        "REPO_SEARCH_PATHS": "/Users/you/Desktop:/Users/you/projects"
      }
    }
  }
}

Required Environment Variables

| Variable | Description | Example | Required | |----------|-------------|---------|----------| | JIRA_BASE_URL | Jira server URL | https://jira.company.com | ✅ | | JIRA_API_TOKEN | Jira Personal Access Token | From your Jira profile settings | ✅ | | BITBUCKET_URL | Bitbucket server URL | https://bitbucket.company.com | ✅ | | BITBUCKET_API_TOKEN | Bitbucket Personal Access Token | From your Bitbucket account settings | ✅ | | BITBUCKET_USER_EMAIL | Your email address | [email protected] | ✅ | | REPO_SEARCH_PATHS | Colon-separated repo search paths | /Users/you/Desktop:/Users/you/projects | ⚠️ (for auto-discovery) |

Available Tools

1. analyze_ticket

Analyze a Jira ticket to extract version, type, and details.

{
  "ticketId": "PROJ-123"
}

2. create_branch_plan

Create version-aware branch plan based on ticket analysis.

{
  "ticketId": "PROJ-123"
}

3. setup_git_branch

Setup git branch - checkout base, pull latest, create working branch.

{
  "ticketId": "PROJ-123",
  "repoPath": "/path/to/repo",
  "remoteUrl": "[email protected]:PROJECT/repo.git",
  "dryRun": false
}

4. format_commit_message

Generate conventional commit message format.

{
  "ticketId": "PROJ-123",
  "summary": "prevent null pointer on login",
  "scope": "auth",
  "type": "fix"
}

5. create_pr_plan

Create pull request plan with title and description.

{
  "ticketId": "PROJ-123",
  "fixSummary": "Fix login null pointer",
  "sourceBranch": "bugfix/PROJ-123-v1.4.2-prevent-null-pointer",
  "destinationBranch": "release/1.4"
}

6. create_pr

Create Pull Request directly in Bitbucket via API.

{
  "projectKey": "PROJECT",
  "repositorySlug": "my-service",
  "sourceBranch": "bugfix/PROJ-123-v1.4.2-prevent-null-pointer",
  "destinationBranch": "release/1.4",
  "title": "[v1.4.2] PROJ-123 Fix login null pointer",
  "description": "## Jira Ticket Reference\nPROJ-123: Fix login null pointer..."
}

7. add_rca_comment

Add RCA (Root Cause Analysis) comment to Jira ticket.

{
  "ticketId": "PROJ-123",
  "fixSummary": "Added null check before accessing user object"
}

8. move_to_code_review

Move Jira ticket to Code Review status.

{
  "ticketId": "PROJ-123",
  "comment": "Pull Request created: https://bitbucket.company.com/..."
}

9. fix_ticket (Complete Workflow)

Full automation: Analyze, branch, commit, create PR, and update Jira.

{
  "ticketId": "PROJ-123",
  "repoPath": "/path/to/repo",
  "remoteUrl": "[email protected]:PROJECT/repo.git",
  "dryRun": false
}

10. detect_library_issue (🆕 Smart Detection)

Analyzes if a ticket issue originates from a library dependency.

{
  "ticketId": "PROJ-123",
  "consumerRepoPath": "/path/to/consumer/repo",
  "searchPaths": ["/Users/you/Desktop"]
}

11. smart_ticket_workflow (🆕 Self-Driven)

Automatically detects library issues and routes fixes to correct repo.

{
  "ticketId": "PROJ-123",
  "consumerRepoPath": "/path/to/consumer/repo",
  "fixSummary": "Fixed DataTable button click handler",
  "dryRun": false
}

Version-Aware Branching Strategy

| Ticket Version | Source Branch | Working Branch Pattern | |----------------|---------------|----------------------| | 1.4.x | release/1.4 | bugfix/PROJ-123-v1.4.x-short-desc | | 2.0.1 | release/2.0 | feature/PROJ-123-v2.0.1-short-desc | | hotfix-1.3.2 | hotfix/1.3.2 | bugfix/PROJ-123-v1.3.2-short-desc | | next | develop | feature/PROJ-123-vnext-short-desc |

Commit Message Format

<type>(<scope>): <ticket-id> [<version>] <summary>

Examples:
fix(auth): PROJ-456 [v1.4.2] prevent null pointer on login
feat(ui): PROJ-789 [v2.0.0] add theme selector

Workflow Steps

When you say "fix it" with a ticket:

  1. Analyze Ticket - Parse version, type, components via Jira API
  2. Branch Strategy - Determine source and working branches
  3. Git Setup - Create branch, checkout, pull latest
  4. Implement Fix - (Manual or automated)
  5. Commit - Format: <type>: <ticket> [<version>] <summary>
  6. Push - Push to origin
  7. Create PR - Create PR in Bitbucket via API
  8. Move to Code Review - Transition Jira ticket via API
  9. Add RCA - Add RCA comment to Jira ticket via API

Usage Examples

Basic Single-Repo Workflow

  1. Start with: "Fix ticket PROJ-123"
  2. MCP will:
    • Analyze PROJ-123 via Jira REST API
    • Create branch plan (e.g., bugfix/PROJ-123-v1.4.2-null-pointer)
    • Setup git branch
    • Generate commit message format
    • Create PR directly via Bitbucket API
    • Move ticket to Code Review via Jira API
    • Add RCA comment via Jira API
  3. All done automatically - no manual MCP calls needed!

Smart Library-Aware Workflow (🆕)

  1. Start with: "Fix ticket PROJ-123"
  2. MCP will:
    • Analyze PROJ-123 via Jira REST API
    • Detect if issue originates from library dependency (e.g., @qualys/react-ui-library)
    • Route fix to correct repo:
      • If library issue: Fix in library repo, list affected consumer repos
      • If consumer issue: Fix in consumer repo directly
    • Create appropriate branch and PR
    • Move ticket to Code Review
    • Add RCA with library/consumer context
  3. Fully automated with intelligent routing!

Error Handling

  • Missing version: Explicitly pauses and asks for version
  • Unclean working directory: Requires stash or commit first
  • Branch conflicts: Fetches latest before creating branch
  • Invalid ticket ID: Reports via MCP error

📚 Documentation

Development

# Build
npm run build

# Development mode
npm run dev

# Test
npm test

# Publish to npm
npm publish

📦 Package Information

  • Package name: ticket-automation-mcp
  • Version: 1.0.0
  • Registry: https://www.npmjs.com/package/ticket-automation-mcp
  • Size: 66.5 kB (334.1 kB unpacked)
  • Files: 30 (includes TypeScript source, compiled JS, and documentation)

🚀 Quick Start

  1. Install: npm install -g ticket-automation-mcp
  2. Configure: Add MCP configuration with your Jira/Bitbucket tokens
  3. Set environment: Add REPO_SEARCH_PATHS for repo auto-discovery
  4. Test: Run detect_library_issue on a real ticket
  5. Use: Say "Fix ticket PROJ-123" for complete automation

License

MIT