Skip to content

fix: hide write UI resources in read-only mode#2581

Open
he-yufeng wants to merge 1 commit into
github:mainfrom
he-yufeng:fix/read-only-ui-resources-v3
Open

fix: hide write UI resources in read-only mode#2581
he-yufeng wants to merge 1 commit into
github:mainfrom
he-yufeng:fix/read-only-ui-resources-v3

Conversation

@he-yufeng
Copy link
Copy Markdown
Contributor

Summary

  • pass the server read-only setting into MCP App UI resource registration
  • keep the read-only get_me_ui resource available
  • skip issue_write_ui and pr_write_ui when write tools are filtered by --read-only

Fixes #2519.

To verify

  • go test ./pkg/github -run "TestRegisterUIResources_ReadOnlySkipsWriteResources|TestRegisterUIResources_ReadableViaClient|TestNewMCPServer_RegistersUIResources" -count=1
  • go test ./pkg/github -count=1
  • git diff --check

@he-yufeng
Copy link
Copy Markdown
Contributor Author

Validated the current branch locally after closing the superseded #2574:

go test ./pkg/github -run UIResources
git diff --check origin/main...HEAD

@he-yufeng he-yufeng force-pushed the fix/read-only-ui-resources-v3 branch from 09ccbeb to b8743ed Compare May 31, 2026 19:37
@he-yufeng
Copy link
Copy Markdown
Contributor Author

Rebased on current main in b8743ed.

Validation:

  • go test ./pkg/github -run UIResources
  • git diff --check origin/main...HEAD

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.

MCP App UI resources for write tools are registered in --read-only mode

1 participant