Skip to content

fix(runner): use Jira Cloud auth for mcp-atlassian MCP server#922

Merged
Gkrumbach07 merged 3 commits intomainfrom
bug/jira-cloud
Mar 16, 2026
Merged

fix(runner): use Jira Cloud auth for mcp-atlassian MCP server#922
Gkrumbach07 merged 3 commits intomainfrom
bug/jira-cloud

Conversation

@Gkrumbach07
Copy link
Contributor

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

The mcp-atlassian config was using JIRA_PERSONAL_TOKEN which is the
Server/Data Center auth method. For Jira Cloud (atlassian.net) the
correct env vars are JIRA_USERNAME + JIRA_API_TOKEN. Also switch the
command to uvx per upstream docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

Walkthrough

Switches MCP Atlassian runner to invoke via uvx with args ["mcp-atlassian"], adjusts Atlassian env var mappings (replace JIRA_PERSONAL_TOKEN with JIRA_USERNAME mapped from JIRA_EMAIL), updates Jira automation workflow (create -> add to sprint) and changes default Jira URL to https://redhat.atlassian.net.

Changes

Cohort / File(s) Summary
MCP Atlassian config
components/runners/ambient-runner/.mcp.json
Changed mcp-atlassian entry to "command": "uvx", "args": ["mcp-atlassian"]. Env mapping: removed JIRA_PERSONAL_TOKEN, added JIRA_USERNAME: "${JIRA_EMAIL}", kept JIRA_API_TOKEN.
Jira automation / docs
.claude/commands/jira.log.md
Updated Jira issue creation flow: tool invocation name changed, add additional_fields with labels: ["team:ambient"], use customfield_10001 for Atlassian Team, add step to add created issue to active sprint (fetch sprints, add issues), and update domain/field references to Jira Cloud.
Frontend Jira defaults
components/frontend/src/components/jira-connection-card.tsx
Changed default and placeholder Jira URL from https://issues.redhat.com to https://redhat.atlassian.net.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: fixing Jira Cloud authentication for the mcp-atlassian MCP server.
Description check ✅ Passed The description directly explains the changes: switching from Jira Server authentication (JIRA_PERSONAL_TOKEN) to Jira Cloud authentication (JIRA_USERNAME and JIRA_API_TOKEN), and the rationale for the uvx command change.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bug/jira-cloud
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@components/runners/ambient-runner/.mcp.json`:
- Around line 16-17: Update the runner invocation to pin the uvx package
version: change the args entry currently set as ["mcp-atlassian"] to
["mcp-atlassian@0.21.0"] so the "command": "uvx" invocation consistently runs
the pinned mcp-atlassian@0.21.0 release and avoids upstream breakage.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c516bc67-124c-4d25-9fbc-844996eec7d8

📥 Commits

Reviewing files that changed from the base of the PR and between f1314eb and 1c4118f.

📒 Files selected for processing (1)
  • components/runners/ambient-runner/.mcp.json

Gkrumbach07 and others added 2 commits March 16, 2026 08:17
- Tool name: mcp_mcp-atlassian → mcp__jira__
- Team field: customfield_12313240 (Server) → customfield_10001 (Cloud Atlassian Team)
- Sprint: use jira_add_issues_to_sprint API with board 1115
- Browse URL: issues.redhat.com → redhat.atlassian.net
- Add team:ambient label on create
- Add sprint assignment step

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Change the default and placeholder Jira URL from issues.redhat.com
(on-prem Server) to redhat.atlassian.net (Jira Cloud).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Contributor Author

@Gkrumbach07 Gkrumbach07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good. tested this mcp config locvally

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/frontend/src/components/jira-connection-card.tsx (1)

190-200: ⚠️ Potential issue | 🟠 Major

API token link points to Jira Server path instead of Jira Cloud.

The link constructs ${url}/secure/ViewProfile.jspa?... when a URL is entered, but this path is for Jira Server/Data Center PATs. For Jira Cloud (the target of this PR), API tokens are managed at id.atlassian.com, not at the instance URL. Users clicking this link will land on a non-existent page.

Since the PR switches to Jira Cloud, the link should always use the Atlassian account URL for Cloud instances.

Proposed fix
              <p className="text-xs text-muted-foreground mt-1">
                Create an API token at{' '}
                <a
-                 href={url ? `${url}/secure/ViewProfile.jspa?selectedTab=com.atlassian.pats.pats-plugin:jira-user-personal-access-tokens` : 'https://id.atlassian.com/manage-profile/security/api-tokens'}
+                 href="https://id.atlassian.com/manage-profile/security/api-tokens"
                  target="_blank"
                  rel="noopener noreferrer"
                  className="underline"
                >
-                 Jira Settings
+                 Atlassian Account Settings
                </a>
              </p>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/frontend/src/components/jira-connection-card.tsx` around lines 190
- 200, In the Jira connection card JSX (jira-connection-card.tsx) the API token
anchor currently builds a server/Data Center path using the `url` variable;
change the anchor's href to always point to the Atlassian account Cloud token
page (`https://id.atlassian.com/manage-profile/security/api-tokens`) instead of
`${url}/secure/ViewProfile.jspa?...`. Update the anchor in the <p> block (the
anchor using `href={url ? ... :
'https://id.atlassian.com/manage-profile/security/api-tokens'}`) to use the
constant Cloud URL while keeping the existing `target`, `rel`, and `className`
attributes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@components/frontend/src/components/jira-connection-card.tsx`:
- Around line 190-200: In the Jira connection card JSX
(jira-connection-card.tsx) the API token anchor currently builds a server/Data
Center path using the `url` variable; change the anchor's href to always point
to the Atlassian account Cloud token page
(`https://id.atlassian.com/manage-profile/security/api-tokens`) instead of
`${url}/secure/ViewProfile.jspa?...`. Update the anchor in the <p> block (the
anchor using `href={url ? ... :
'https://id.atlassian.com/manage-profile/security/api-tokens'}`) to use the
constant Cloud URL while keeping the existing `target`, `rel`, and `className`
attributes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c41f0f5e-0ddc-4509-bb63-52942c7b15ac

📥 Commits

Reviewing files that changed from the base of the PR and between 1c4118f and e62b7e0.

📒 Files selected for processing (2)
  • .claude/commands/jira.log.md
  • components/frontend/src/components/jira-connection-card.tsx

@Gkrumbach07 Gkrumbach07 merged commit f6a5543 into main Mar 16, 2026
30 checks passed
@Gkrumbach07 Gkrumbach07 deleted the bug/jira-cloud branch March 16, 2026 13:24
@Gkrumbach07 Gkrumbach07 added this to the Review Queue milestone Mar 16, 2026
Copy link
Contributor

@ktdreyer ktdreyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ambient-code ambient-code bot removed this from the Review Queue milestone Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants