DEV Community

Abdallah Deeb
Abdallah Deeb

Posted on

๐Ÿš€ Automating Daily Task Management with Claude + YouTrack MCP

If you spend half your day bouncing between Git, your project tracker, and chat tools just to keep tickets updated, youโ€™re not alone.

Manual updates eat time, cause inconsistencies, and are easy to forget โ€” especially when youโ€™re in the zone coding.

In this guide, Iโ€™ll show you how I integrated Claude with YouTrack using the Model Context Protocol (MCP) to build a fully automated daily task management system.

The result:

  • Git commits automatically update tickets
  • Time is logged without manual input
  • I finish the day with a ready-to-send daily report
  • All without leaving my terminal

๐Ÿ›  What Youโ€™ll Build

  1. todo Command โ€“ Quick CLI view of your assigned YouTrack tasks
  2. Automated Ticket Updates โ€“ Git hooks post progress, log time, and avoid duplicates
  3. Daily Report Generator โ€“ Structured, markdown-based work logs

๐Ÿ“‹ Prerequisites

  • Claude CLI installed & configured
  • YouTrack MCP server set up & authenticated
  • Bash shell environment
  • Git repositories with proper branch naming (PROJ-XXXX)
  • YouTrack API token with:
    • Read Issues
    • Update Issues
    • Create Issues

1๏ธโƒฃ Setup the todo Command

A tiny bash alias to check your assigned YouTrack tasks from anywhere:

alias todo="claude -p 'show my todo items from youtrack'"
Enter fullscreen mode Exit fullscreen mode

The MCP handles authentication and API calls, so this instantly lists your current tasks.


2๏ธโƒฃ Automate Ticket Updates from Git

The magic happens with git hooks + a YouTrack update script.

A. Update Script โ€“ youtrack-git-update

Location: ~/.local/bin/youtrack-git-update

Features:

  • Extracts ticket IDs from branch names (PROJ-1234, feature/PROJ-5678)
  • Posts progress comments with commit details
  • Logs estimated time based on changed lines
  • Avoids duplicate updates
#!/bin/bash
extract_ticket_id() {
    local branch_name="$1"
    if [[ $branch_name =~ (PROJ-[0-9]+) ]]; then
        echo "${BASH_REMATCH[1]}"
    fi
}

generate_commit_summary() {
    local commit_hash="$1"
    local commit_msg=$(git log -1 --pretty=format:"%s" "$commit_hash")
    local files_changed=$(git diff-tree --no-commit-id --name-only -r "$commit_hash" | wc -l)

    echo "**Branch Progress Update**
Commit: \`${commit_hash:0:7}\`
Message: $commit_msg
Changes: $files_changed files modified
*Auto-generated from git commit*"
}
Enter fullscreen mode Exit fullscreen mode

Time Estimation Rules:

  • >200 lines โ†’ 2h
  • >100 lines โ†’ 1h
  • >50 lines โ†’ 30m
  • <50 lines โ†’ 15m

B. Hook Installer โ€“ install-youtrack-hooks

Location: ~/.local/bin/install-youtrack-hooks

#!/bin/bash
# Install hooks in the current repo
install-youtrack-hooks

# Install globally for new repos
install-youtrack-hooks --global

# Install in a specific repo
install-youtrack-hooks /path/to/repo
Enter fullscreen mode Exit fullscreen mode

Creates:

  • post-commit hook โ€“ Runs on local commits
  • post-receive hook โ€“ Runs on pushes
  • .youtrack-config โ€“ Per-repo settings

C. Ticket Creation Utility โ€“ create_ticket

Location: ~/.local/bin/create_ticket

#!/usr/bin/python3
# Usage: create_ticket -s "Summary" -d "Description"

def create_youtrack_ticket(summary, description):
    url = f"{YOUTRACK_URL}/api/issues"
    payload = {
        "project": {"id": PROJECT_ID},
        "summary": summary,
        "description": description
    }
    # POST to YouTrack API
Enter fullscreen mode Exit fullscreen mode

3๏ธโƒฃ Generate Daily Reports

The daily-report script keeps a structured log of your work.

Location: ~/.local/bin/daily-report

#!/bin/bash
DATE=${1:-$(date +%Y-%m-%d)}
CLAUDE_DIR="$HOME/.claude"
REPORT_FILE="$CLAUDE_DIR/daily-reports/report-$DATE.md"

mkdir -p "$CLAUDE_DIR/daily-reports"

if [[ -f "$REPORT_FILE" ]]; then
    cat "$REPORT_FILE"
else
    cat > "$REPORT_FILE" << EOF
# Daily Work Report - $DATE

## Tickets Worked On
- **PROJ-XXXX** [Ticket Title] (status/notes)

## Other Activities
- Activity description

## Notes
- Additional context
EOF
    ${EDITOR:-nano} "$REPORT_FILE"
fi
Enter fullscreen mode Exit fullscreen mode

๐Ÿ“† Daily Workflow

Morning

todo          # See todayโ€™s assigned tasks
daily-report  # Start the daily log
Enter fullscreen mode Exit fullscreen mode

During Development

git checkout -b PROJ-1234
git commit -m "Fix authentication bug"
# Hook auto-updates YouTrack & logs time
Enter fullscreen mode Exit fullscreen mode

Anytime

create_ticket -s "Fix OAuth2 bug" -d "Users unable to log in"
Enter fullscreen mode Exit fullscreen mode

๐Ÿ–ฅ Example Daily Report

# Daily Work Report - 2025-08-07

## Tickets Worked On
- **PROJ-9814** Upgrade Aurora MySQL clusters (completed)
- **PROJ-9881** Account API VPC config troubleshooting

## Other Activities
- Infrastructure debugging for Account API
- DRP documentation suite creation

## Notes
- Aurora upgrade smooth
- VPC config still needs resolution
Enter fullscreen mode Exit fullscreen mode

๐Ÿ” Troubleshooting

Git Hooks Not Running

ls -la .git/hooks/post-commit  # Check executable perms
youtrack-git-update            # Test manually
Enter fullscreen mode Exit fullscreen mode

API Issues

curl -H "Authorization: Bearer $YOUTRACK_TOKEN"      "$YOUTRACK_URL/api/issues/PROJ-1234"
Enter fullscreen mode Exit fullscreen mode

๐Ÿ’ก Why This Works

  • Automation-first โ€“ No more manual ticket updates
  • Accurate logs โ€“ Time estimated from actual changes
  • One source of truth โ€“ Git commits โ†’ YouTrack โ†’ Daily reports
  • Zero context switching โ€“ All in terminal

๐Ÿ”— Get the Complete Implementation

The code shown in this article is simplified for clarity. The full, production-ready implementation is available on GitHub with enhanced features:

๐Ÿ“ฆ Repository: claude-youtrack-integration

Additional features in the repo:

  • Enhanced error handling and validation
  • Flexible branch pattern matching
  • Per-repository configuration files
  • Duplicate commit prevention
  • Direct API integration with MCP fallback
  • Comprehensive installation script

Quick setup:

git clone https://github.com/abdallah/claude-youtrack-integration.git
cd claude-youtrack-integration
./install.sh
Enter fullscreen mode Exit fullscreen mode

๐Ÿ“Ž Final Thoughts

This Claude + YouTrack MCP setup has saved me hours every week and completely removed the โ€œOh, I forgot to update that ticketโ€ problem.

If you work in a ticket-driven workflow and live in your terminal, this integration will feel like a superpower.

Top comments (1)

Collapse
 
channaly profile image
channa ly

I can definitely relate โ€“ juggling between Git, project trackers, and chat tools all day is a real challenge. Thanks so much for writing and sharing this article, itโ€™s exactly what I needed!