wootech-jira-mcp
README.md
# wootech-jira-mcp
MCP Server để log time và thống kê Jira trực tiếp từ Cursor IDE.
## Cài đặt
```bash
git clone <repo>
cd wootech-jira-mcp
npm install
cp .env.example .env
# Điền JIRA_EMAIL và JIRA_API_TOKEN vào .env
```
Tạo API token tại: https://id.atlassian.com/manage-profile/security/api-tokens
## Kết nối Cursor
Thêm vào `~/.cursor/mcp.json` (global — dùng cho mọi project):
```json
{
"mcpServers": {
"wootech-jira": {
"command": "node",
"args": ["/absolute/path/to/wootech-jira-mcp/src/index.js"]
}
}
}
```
Sau đó restart Cursor. Server sẽ tự load khi mở bất kỳ project nào.
## Cách dùng trong Cursor
### Log time từ commit mới nhất
```
log 2h cho commit vừa rồi
log time cho AR-66, 1h 30m, fix login bug
```
### Xem commits gần đây có issue key
```
xem commits gần đây cần log
show recent commits
```
### Thống kê thời gian
```
thống kê tuần này
bao nhiêu giờ tháng này
time sheet hôm nay
stats for project AR this week
```
### Xem thông tin issue
```
AR-66 là issue gì?
info về TRIN-23
```
## Commit message convention
Server tự extract issue key theo pattern:
| Commit message | Key được parse |
|---|---|
| `AR-66: fix login bug` | `AR-66` |
| `feat(AR-66): add OAuth` | `AR-66` |
| `[TRIN-23] update header` | `TRIN-23` |
| `fix typo` | ❌ không có key — cần nhập tay |
## Tools exposed
| Tool | Mô tả |
|---|---|
| `log_time` | Log work lên Jira issue |
| `log_time_from_commits` | Liệt kê commits có issue key |
| `get_stats` | Thống kê theo day/week/month/all |
| `get_issue_info` | Xem chi tiết issue |