Skip to content

feat(briefing): read Jira through the claude.ai v2 connector "Atlassian MCP"; allow list checked against its 28 real tool names - #93

Merged
LiminCode merged 2 commits into
mainfrom
atlassian-v2
Nov 20, 2026
Merged

LiminCode merged 2 commits into
mainfrom
atlassian-v2

Conversation

@LiminCode

Copy link
Copy Markdown
Owner

Summary

The work briefing / work notes read Jira through a claude.ai connector in headless claude -p (the plugin's HTTP OAuth server never loads there, see #86). That connector was the v1 one, "claude.ai Atlassian" (/v1/mcp): Atlassian retires it on 2027-03-01 and, on this machine, its login dropped again within a few hours of re-authenticating. This PR switches to the v2 connector "claude.ai Atlassian MCP" (/v2/mcp): its tool prefix mcp__claude_ai_Atlassian_MCP__ joins the allow / deny lists, the lists are checked against the 28 tool names the v2 server actually exposes (two read-only ones added), and the troubleshooting page explains why v2 is invisible to /mcp and claude mcp list while the Atlassian plugin is installed (same URL) and how to log in anyway.

What changed and why

  • pet/work_briefing.py: _ATLASSIAN_PREFIXES gains "mcp__claude_ai_Atlassian_MCP__" (plugin, v1 and v2 share one allow list and one deny list; names that do not exist on a server are inert). The Jira read list gains listJiraIssueComments (issue comments: the exact scenario that was denied on 2026-10-24) and getWorkActivity (my recent work activity). The other seven v2-only tools (atlassianHome, getCollaborators, getGraphContext, getLoomObjectsContent, getPeopleInfo, getWorkPortfolio, showConfluenceEditor) are neither allowed nor denied: headless mode denies them by default and the extra_allowed_tools setting is the place to opt in.
  • tests/test_work_briefing_sources.py: new test — every prefix is allowed/denied alike; every v2-prefixed name in the lists is one of the 28 names measured from the init event; the two new read tools are allowed and showConfluenceEditor is not.
  • docs/troubleshooting.md: new paragraph in 「无界面 claude -p 里的连接器」: v2 is hidden by the plugin in interactive sessions ("hidden — same URL as your server plugin:atlassian:atlassian"), so log in either from the claude.ai web connector settings or after claude plugin disable atlassian@claude-plugins-official; verify with a stream-json --verbose init event, not with claude mcp list.
  • docs/work-assistant.md: the three prefixes, the 28 / 12 / 9 / 7 split. CHANGELOG.md: one line.

Performance

No runtime path changes shape: allowed_tools() / denied_tools() build two tuples at generation time, once per briefing. Measured (timeit, main venv, 1000 calls each, main vs this branch): allowed_tools() 1.4 µs → 2.1 µs per call (38 → 54 names: the v2 read list plus the two new names on all three prefixes), denied_tools() 2.9 µs → 3.4 µs (84 → 93 names); the joined --allowedTools argument grows 1752 → 2513 bytes, on a command line built once per generation. No new syscalls, threads, files or network. Memory: two tuples, a few hundred bytes.

Real-machine run

Headless init probe in WSL (Claude Code 2.1.329, claude -p --output-format stream-json --verbose --max-turns 1, haiku, both with and without the briefing's --tools '' --allowedTools … flags), after the user logged the v2 connector in:

  • mcp_servers: claude.ai Atlassian MCP → connected; claude.ai Atlassian (v1) → needs-auth; no plugin:atlassian:atlassian entry at all (as before).
  • tools: 28 names under mcp__claude_ai_Atlassian_MCP__; all 10 (now 12) allowed and all 9 denied names exist among them; none of the list entries is a typo.

Real generation with this branch's code (work_briefing.generate, sonnet, medium, default sources, real WSL + connectors, output to a scratch folder):

  • Result: ok=True, 19 turns, 79.3 s, claude-sonnet-5-5, $0.60; denied: [].
  • Servers in the run record: claude.ai Atlassian MCP connected, 14 calls (getAccessibleAtlassianResources ×1, searchJiraIssuesUsingJql ×2, getJiraIssue ×8, listJiraIssueComments ×3 — the newly allowed comment reader was used on the first run); claude.ai Slack connected, 3 calls; claude.ai Google Calendar connected, 1 call; claude.ai Atlassian (v1) needs-auth, 0 calls — the model never had to touch it.
  • 22 of the 54 allowed tool names were present on the servers that loaded (the plugin and v1 prefixes are inert, as documented); hooks fired: SessionStart:startup only.
  • The generated text itself is company content and is not reproduced here (public repo). The pet is restarted from main after the merge.

Tests

Red first: on main the new test fails (mcp__claude_ai_Atlassian_MCP__searchJiraIssuesUsingJql not in allowed_tools()). Families run: tests/test_work_briefing_*.py, tests/test_work_notes*.py, tests/test_pr_report_discipline.py — 112 passed; ruff check pet tests and git diff --check clean. Full suite skipped: a tuple of names and docs; no config, lifecycle, threading or platform change.

Docs

  • CHANGELOG.md: one line (user-visible change)
  • Topic doc under docs/ updated (work-assistant.md, troubleshooting.md)
  • ADR: not needed

🤖 Generated with Claude Code

LiminCode and others added 2 commits November 20, 2026 01:48
…一个前缀,排障手册写登录方法

v1「claude.ai Atlassian」2027-03-01 下线,而且登录后几小时令牌就掉;v2 和插件同一个地址,交互式里被插件顶掉藏起来,
无界面 -p 里照常加载。工具名先沿用 v1 那套,v2 多出来的名字没放行就是被拒;用户登录后用 init 事件核对再校正。

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…getWorkActivity 两个只读工具

- work_briefing:jira 的放行名单加 listJiraIssueComments(工单评论,10-24 被拒的正是这个场景)和 getWorkActivity(我最近的工作动态);
  其余 v2 多出来的 7 个(Loom、同事信息、打开 Confluence 编辑器等)既不放行也不拒绝,想用走 extra_allowed_tools
- 测试:v2 前缀的测试多一段——名单里带 v2 前缀的名字都在实测的 28 个里,两个新放行的在、showConfluenceEditor 不在
- docs/work-assistant、CHANGELOG 跟着改

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@LiminCode
LiminCode merged commit d595463 into main Nov 20, 2026
0 of 3 checks passed
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.

1 participant