Add atlassian-mcp-setup skill - #2
Open
jiangyon-amd wants to merge 1 commit into
Open
Conversation
Gives an agent authenticated Jira/Confluence access through mcp-atlassian, with the token in ~/.atlassian.env (mode 600) rather than ~/.claude.json. A launcher script sources the env file and execs uvx, so the MCP config holds only a path and rotating a token touches no agent config. Encodes the failure modes that cost the most time in practice: - Cloud (*.atlassian.net, email + API token) and Server/DC (PAT) are not interchangeable, and mixing them yields a bare 401. - Scoped Cloud tokens are rejected by the site URL and fail identically to a wrong password; classic tokens are required. - The account email is not derivable from the Linux username. Guessing it costs a round trip per attempt and every miss returns the same 401. - "Connected" in `claude mcp list` does not imply working credentials; mcp-atlassian does not authenticate at startup. Only /myself proves it. - Unauthenticated serverInfo separates network faults from credential faults, so healthcheck.sh runs it first. - MCP tools load at session start, so setup looks broken until a restart. jira_issue.py covers that window over plain REST. - Cloud /rest/api/3 returns ADF trees, not strings; jira_issue.py flattens them, and uses /search/jql since GET /search was retired (CHANGE-2046). Tokens are refused in argv (visible via ps) and read from stdin, an echo-off prompt, or $ATLASSIAN_API_TOKEN. healthcheck.sh also fails if a token has leaked into ~/.claude.json. Verified end to end against amd.atlassian.net: setup for both deployment types, healthcheck, issue fetch, comments, and JQL search. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
.cursor/skills/atlassian-mcp-setup— connects an agent to AMD Jira/Confluence through themcp-atlassianMCP server.Design
The token lives in
~/.atlassian.env(mode 600).~/.claude.jsongets only a path to a launcher script that sources the env file andexecsuvx mcp-atlassian. Rotating a token is then a one-line edit to a 600 file with no agent config change, and the agent config stays safe to share or paste into a bug report.The alternative —
claude mcp add --env JIRA_API_TOKEN=...as the internal wiki suggests — writes the literal token into~/.claude.json.What the skill actually encodes
The setup itself is short; the value is the failure modes, all hit while wiring this up against
amd.atlassian.net:*.atlassian.nettakes email + API token;jira.xilinx.comtakes a PAT. Mixing them gives a bare 401 that names nothing. Onemcp-atlassianprocess also serves exactly oneJIRA_URL, so reaching both needs two registered servers.api.atlassian.com/ex/jira/<cloudId>. A scoped token used the classic way fails identically to a wrong password.Connectedinclaude mcp listis not evidence of working auth.mcp-atlassiandoesn't authenticate at startup, so the launcher connects fine with garbage credentials. Only/myselfproves it.serverInfoseparates network faults from credential faults, which is whyhealthcheck.shruns it before touching credentials.jira_issue.pyreads issues over plain REST to cover that window./rest/api/3returns ADF trees, not strings — descriptions print as unreadable JSON unless flattened. It also retiredGET /search(CHANGE-2046), so JQL goes through/search/jql.Secret handling
--tokenin argv is a hard error (visible inpsto every user on the box, and lands in shell history). Token comes from stdin, an echo-off prompt, or$ATLASSIAN_API_TOKEN.healthcheck.shfails if a token has leaked into~/.claude.json.--read-onlyregisters with all write tools disabled, enforced by the MCP server rather than by agent discretion.Files
SKILL.mdexamples.mdscripts/setup_atlassian_mcp.shscripts/mcp-atlassian-launch.shPATH(MCP servers inherit a minimal env, souvxfrom pipx is otherwise missing)scripts/healthcheck.shscripts/jira_issue.pyVerification
Run against
amd.atlassian.net:validate_skill.pypasses;bash -nclean on all shell scripts600perms; Server/DC inference from hostname workshealthcheck.shgreen on Jira and Confluence, resolving the real display namejira_issue.pyfetch,--comments, and--jqlall return correct data--tokenrefused, missing env file, 404 on a bad keyATATTtokens — clean🤖 Generated with Claude Code