Help us improve
Share bugs, ideas, or general feedback.
Retrieves, analyzes, and updates Jira issues from the coding workflow. Supports MCP-based and direct REST API access for searching, creating, transitioning, and commenting on tickets.
npx claudepluginhub aaione/everything-claude-code-zhHow this skill is triggered — by the user, by Claude, or both
Slash command
/everything-claude-code:jira-integrationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
直接从 AI 编码工作流中检索、分析和更新 Jira 工单。支持 **基于 MCP**(推荐)和 **直接 REST API** 两种方式。
Retrieves, analyzes, and updates Jira tickets via MCP or direct REST API. Useful for fetching requirements, transitioning status, adding comments, and linking work items.
Interacts with Jira issues via CLI scripts: search, create, update, transition, comment, log work, manage sprints/boards/attachments/links. Auto-triggers on Jira URLs and issue keys.
Manages Jira Cloud issues via jira CLI with JSON output: create, view, update, search issues, fetch hierarchies, manage sprints.
Share bugs, ideas, or general feedback.
直接从 AI 编码工作流中检索、分析和更新 Jira 工单。支持 基于 MCP(推荐)和 直接 REST API 两种方式。
安装 mcp-atlassian MCP 服务器。这会直接向 AI 智能体暴露 Jira 工具。
要求:
uvx(来自 uv),通过包管理器或官方 uv 安装文档安装添加到 MCP 配置(例如 ~/.claude.json → mcpServers):
{
"jira": {
"command": "uvx",
"args": ["mcp-atlassian==0.21.0"],
"env": {
"JIRA_URL": "https://YOUR_ORG.atlassian.net",
"JIRA_EMAIL": "your.email@example.com",
"JIRA_API_TOKEN": "your-api-token"
},
"description": "Jira issue tracking — search, create, update, comment, transition"
}
}
安全: 绝不硬编码密钥。优先在系统环境(或密钥管理器)中设置
JIRA_URL、JIRA_EMAIL和JIRA_API_TOKEN。仅在本地未提交的配置文件中使用 MCPenv块。
获取 Jira API 令牌:
如果 MCP 不可用,通过 curl 或辅助脚本直接使用 Jira REST API v3。
所需环境变量:
| 变量 | 说明 |
|---|---|
JIRA_URL | Jira 实例 URL(例如 https://yourorg.atlassian.net) |
JIRA_EMAIL | Atlassian 账户邮箱 |
JIRA_API_TOKEN | 来自 id.atlassian.com 的 API 令牌 |
将这些存储在 shell 环境、密钥管理器或未跟踪的本地环境文件中。不要将它们提交到仓库。
配置 mcp-atlassian MCP 服务器后,可以使用以下工具:
| 工具 | 用途 | 示例 |
|---|---|---|
jira_search | JQL 查询 | project = PROJ AND status = "In Progress" |
jira_get_issue | 按键获取完整问题详情 | PROJ-1234 |
jira_create_issue | 创建问题(任务、缺陷、故事、史诗) | 新缺陷报告 |
jira_update_issue | 更新字段(摘要、描述、指派人) | 更改指派人 |
jira_transition_issue | 更改状态 | 移至"审查中" |
jira_add_comment | 添加评论 | 进度更新 |
jira_get_sprint_issues | 列出 Sprint 中的问题 | 活跃 Sprint 审查 |
jira_create_issue_link | 链接问题(阻塞、相关) | 依赖跟踪 |
jira_get_issue_development_info | 查看关联的 PR、分支、提交 | 开发上下文 |
提示: 在转换状态前始终调用
jira_get_transitions— 转换 ID 因项目工作流而异。
curl -s -u "$JIRA_EMAIL:$JIRA_API_TOKEN" \
-H "Content-Type: application/json" \
"$JIRA_URL/rest/api/3/issue/PROJ-1234" | jq '{
key: .key,
summary: .fields.summary,
status: .fields.status.name,
priority: .fields.priority.name,
type: .fields.issuetype.name,
assignee: .fields.assignee.displayName,
labels: .fields.labels,
description: .fields.description
}'
curl -s -u "$JIRA_EMAIL:$JIRA_API_TOKEN" \
-H "Content-Type: application/json" \
"$JIRA_URL/rest/api/3/issue/PROJ-1234?fields=comment" | jq '.fields.comment.comments[] | {
author: .author.displayName,
created: .created[:10],
body: .body
}'
curl -s -X POST -u "$JIRA_EMAIL:$JIRA_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"body": {
"version": 1,
"type": "doc",
"content": [{
"type": "paragraph",
"content": [{"type": "text", "text": "Your comment here"}]
}]
}
}' \
"$JIRA_URL/rest/api/3/issue/PROJ-1234/comment"
# 1. 获取可用转换
curl -s -u "$JIRA_EMAIL:$JIRA_API_TOKEN" \
"$JIRA_URL/rest/api/3/issue/PROJ-1234/transitions" | jq '.transitions[] | {id, name: .name}'
# 2. 执行转换(替换 TRANSITION_ID)
curl -s -X POST -u "$JIRA_EMAIL:$JIRA_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"transition": {"id": "TRANSITION_ID"}}' \
"$JIRA_URL/rest/api/3/issue/PROJ-1234/transitions"
curl -s -G -u "$JIRA_EMAIL:$JIRA_API_TOKEN" \
--data-urlencode "jql=project = PROJ AND status = 'In Progress'" \
"$JIRA_URL/rest/api/3/search"
检索工单用于开发或测试自动化时,提取:
工单:PROJ-1234
摘要:[工单标题]
状态:[当前状态]
优先级:[高/中/低]
测试类型:单元、集成、端到端
需求:
1. [需求 1]
2. [需求 2]
验收标准:
- [ ] [标准 1]
- [ ] [标准 2]
测试场景:
- 正常路径:[描述]
- 错误情况:[描述]
- 边缘情况:[描述]
所需测试数据:
- [数据项 1]
- [数据项 2]
依赖:
- [依赖 1]
- [依赖 2]
| 工作流步骤 | Jira 更新 |
|---|---|
| 开始工作 | 转换为"进行中" |
| 测试已编写 | 评论包含测试覆盖摘要 |
| 分支已创建 | 评论包含分支名称 |
| PR/MR 已创建 | 评论包含链接,关联问题 |
| 测试通过 | 评论包含结果摘要 |
| PR/MR 已合并 | 转换为"已完成"或"审查中" |
开始工作:
开始实现此工单。
分支:feat/PROJ-1234-feature-name
测试已实现:
自动化测试已实现:
单元测试:
- [测试文件 1] — [覆盖内容]
- [测试文件 2] — [覆盖内容]
集成测试:
- [测试文件] — [覆盖的端点/流程]
所有测试本地通过。覆盖率:XX%
PR 已创建:
拉取请求已创建:
[PR 标题](https://github.com/org/repo/pull/XXX)
等待审查。
工作完成:
实现完成。
PR 已合并:[链接]
测试结果:全部通过 (X/Y)
覆盖率:XX%
.env 添加到 .gitignore| 错误 | 原因 | 修复 |
|---|---|---|
401 Unauthorized | API 令牌无效或已过期 | 在 id.atlassian.com 重新生成 |
403 Forbidden | 令牌缺少项目权限 | 检查令牌范围和项目访问权限 |
404 Not Found | 工单键或基础 URL 错误 | 验证 JIRA_URL 和工单键 |
spawn uvx ENOENT | IDE 在 PATH 中找不到 uvx | 使用完整路径(例如 ~/.local/bin/uvx)或在 ~/.zprofile 中设置 PATH |
| 连接超时 | 网络/VPN 问题 | 检查 VPN 连接和防火墙规则 |