Skip to content

Commit f6a5543

Browse files
Gkrumbach07claude
andauthored
fix(runner): use Jira Cloud auth for mcp-atlassian MCP server (#922)
## Summary - The `mcp-atlassian` MCP server config in `.mcp.json` was using `JIRA_PERSONAL_TOKEN`, which is the **Jira Server/Data Center** (on-prem PAT) auth method - For **Jira Cloud** (`redhat.atlassian.net`), the correct env vars are `JIRA_USERNAME` (email) + `JIRA_API_TOKEN` - The server connected successfully but returned `tools: []` because the wrong auth mode silently failed against the Cloud API - Also switched command from bare `mcp-atlassian` to `uvx mcp-atlassian` per upstream docs ## Test plan - [ ] Deploy to a test cluster and verify `GET /mcp/status` returns tools for the `mcp-atlassian` server - [ ] Verify Jira tools (search, get_issue, etc.) are functional in a session - [ ] Confirm `JIRA_EMAIL` env var is populated correctly from backend credentials 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f1314eb commit f6a5543

File tree

3 files changed

+34
-14
lines changed

3 files changed

+34
-14
lines changed

.claude/commands/jira.log.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,40 +113,55 @@ This description is structured for agent cold-start. Shall I create this issue?
113113

114114
### 5. Create the Jira Issue
115115

116-
Use the `mcp_mcp-atlassian_jira_create_issue` tool with:
116+
Use the `mcp__jira__jira_create_issue` tool with:
117117

118118
```json
119119
{
120120
"project_key": "RHOAIENG",
121121
"summary": "[user provided summary]",
122122
"issue_type": "Story",
123123
"description": "[structured description from template]",
124-
"components": "Agentic"
124+
"components": "Agentic",
125+
"additional_fields": "{\"labels\": [\"team:ambient\"]}"
125126
}
126127
```
127128

128-
Then **update the issue** to set the Team field (must be done as a separate update call):
129+
Then **update the issue** to set the Atlassian Team field (must be done as a separate update call — cannot be set on create):
129130

130131
```json
131132
{
132133
"issue_key": "[CREATED_ISSUE_KEY]",
133-
"fields": {
134-
"customfield_12313240": "6290"
135-
}
134+
"fields": "{}",
135+
"additional_fields": "{\"customfield_10001\": \"ec74d716-af36-4b3c-950f-f79213d08f71-1917\"}"
136136
}
137137
```
138138

139+
Then **add to sprint** (sprint field `customfield_10020` is screen-restricted, use the sprint API instead):
140+
141+
```json
142+
mcp__jira__jira_add_issues_to_sprint({
143+
"sprint_id": "[ACTIVE_SPRINT_ID]",
144+
"issue_keys": "[CREATED_ISSUE_KEY]"
145+
})
146+
```
147+
148+
To find the active sprint ID, use:
149+
```json
150+
mcp__jira__jira_get_sprints_from_board({ "board_id": "1115", "state": "active" })
151+
```
152+
139153
### 6. Report Success
140154

141155
After creation, report:
142156

143157
```
144158
✅ Created: [ISSUE_KEY]
145-
🔗 Link: https://issues.redhat.com/browse/[ISSUE_KEY]
159+
🔗 Link: https://redhat.atlassian.net/browse/[ISSUE_KEY]
146160
147161
Summary: [summary]
148162
Component: Agentic
149163
Team: Ambient team
164+
Sprint: [sprint name]
150165
151166
📋 Agent Cold-Start Ready: Yes
152167
```
@@ -228,15 +243,19 @@ Tests:
228243
- Add test for cache invalidation edge case
229244
```
230245

231-
## Field Reference
246+
## Field Reference (Jira Cloud — redhat.atlassian.net)
232247

233248
| Field | Value | Notes |
234249
|-------|-------|-------|
235250
| Project | RHOAIENG | Red Hat OpenShift AI Engineering |
236251
| Component | Agentic | Pre-filled |
237-
| Team | Ambient team | Custom field `customfield_12313240` = `6290` |
252+
| Team | Ambient team | `customfield_10001` = `ec74d716-af36-4b3c-950f-f79213d08f71-1917` (Atlassian Team type, set via update) |
253+
| Sprint | Active sprint | Use `jira_add_issues_to_sprint` with board `1115` |
254+
| Label | `team:ambient` | Set on create via `additional_fields` |
238255
| Issue Type | Story | Default, can override with [Bug], [Task] |
239256
| Priority | Normal | Default |
257+
| Browse URL | `https://redhat.atlassian.net/browse/` | NOT `issues.redhat.com` (that was on-prem) |
258+
| Board | `1115` (scrum) / `1109` (kanban) | "AI Driven Development" |
240259

241260
## Agent Cold-Start Checklist
242261

components/frontend/src/components/jira-connection-card.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { useConnectJira, useDisconnectJira } from '@/services/queries/use-jira'
1111
import { useCurrentUser } from '@/services/queries/use-auth'
1212

1313
// Default Jira URL for Red Hat (can be changed by user)
14-
const DEFAULT_JIRA_URL = 'https://issues.redhat.com'
14+
const DEFAULT_JIRA_URL = 'https://redhat.atlassian.net'
1515

1616
type Props = {
1717
status?: {
@@ -144,7 +144,7 @@ export function JiraConnectionCard({ status, onRefresh }: Props) {
144144
<Input
145145
id="jira-url"
146146
type="url"
147-
placeholder="https://issues.redhat.com"
147+
placeholder="https://redhat.atlassian.net"
148148
value={url}
149149
onChange={(e) => setUrl(e.target.value)}
150150
disabled={connectMutation.isPending}

components/runners/ambient-runner/.mcp.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
"args": ["mcp-server-fetch"]
1414
},
1515
"mcp-atlassian": {
16-
"command": "mcp-atlassian",
17-
"args": [],
16+
"command": "uvx",
17+
"args": ["mcp-atlassian"],
1818
"env": {
1919
"JIRA_URL": "${JIRA_URL}",
20-
"JIRA_PERSONAL_TOKEN": "${JIRA_API_TOKEN}",
20+
"JIRA_USERNAME": "${JIRA_EMAIL}",
21+
"JIRA_API_TOKEN": "${JIRA_API_TOKEN}",
2122
"JIRA_SSL_VERIFY": "true",
2223
"READ_ONLY_MODE": "true"
2324
}

0 commit comments

Comments
 (0)