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!