Repository navigation
feat(briefing): read Jira through the claude.ai v2 connector "Atlassian MCP"; allow list checked against its 28 real tool names - #93
Merged
Conversation
…一个前缀,排障手册写登录方法 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>
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.
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 prefixmcp__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/mcpandclaude mcp listwhile the Atlassian plugin is installed (same URL) and how to log in anyway.What changed and why
pet/work_briefing.py:_ATLASSIAN_PREFIXESgains"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 gainslistJiraIssueComments(issue comments: the exact scenario that was denied on 2026-10-24) andgetWorkActivity(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 theextra_allowed_toolssetting 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 andshowConfluenceEditoris 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 afterclaude plugin disable atlassian@claude-plugins-official; verify with astream-json --verboseinit event, not withclaude 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--allowedToolsargument 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; noplugin:atlassian:atlassianentry at all (as before).tools: 28 names undermcp__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):ok=True, 19 turns, 79.3 s, claude-sonnet-5-5, $0.60;denied: [].claude.ai Atlassian MCPconnected, 14 calls (getAccessibleAtlassianResources×1,searchJiraIssuesUsingJql×2,getJiraIssue×8,listJiraIssueComments×3 — the newly allowed comment reader was used on the first run);claude.ai Slackconnected, 3 calls;claude.ai Google Calendarconnected, 1 call;claude.ai Atlassian(v1)needs-auth, 0 calls — the model never had to touch it.SessionStart:startuponly.mainafter the merge.Tests
Red first: on main the new test fails (
mcp__claude_ai_Atlassian_MCP__searchJiraIssuesUsingJqlnot inallowed_tools()). Families run:tests/test_work_briefing_*.py,tests/test_work_notes*.py,tests/test_pr_report_discipline.py— 112 passed;ruff check pet testsandgit diff --checkclean. Full suite skipped: a tuple of names and docs; no config, lifecycle, threading or platform change.Docs
work-assistant.md,troubleshooting.md)🤖 Generated with Claude Code