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
-
todo
Command β Quick CLI view of your assigned YouTrack tasks - Automated Ticket Updates β Git hooks post progress, log time, and avoid duplicates
- 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'"
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*"
}
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
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
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
π Daily Workflow
Morning
todo # See todayβs assigned tasks
daily-report # Start the daily log
During Development
git checkout -b PROJ-1234
git commit -m "Fix authentication bug"
# Hook auto-updates YouTrack & logs time
Anytime
create_ticket -s "Fix OAuth2 bug" -d "Users unable to log in"
π₯ 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
π Troubleshooting
Git Hooks Not Running
ls -la .git/hooks/post-commit # Check executable perms
youtrack-git-update # Test manually
API Issues
curl -H "Authorization: Bearer $YOUTRACK_TOKEN" "$YOUTRACK_URL/api/issues/PROJ-1234"
π‘ 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
π 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)
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!