Repository navigation
Conversation
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
Agents can manage an authenticated user's notification subscription for an issue, pull request, or discussion directly from its repository and number, without an existing notification thread or watching the entire repository.
This is a Draft while confirming GitHub's
IGNOREDbehavior. Subscribe and unsubscribe are verified live; the API returnsUNSUBSCRIBEDfor the tested ignore requests. See the standalone reproduction and questions below.Why
Related to #3452. Existing subscription tools target a notification thread ID or an entire repository, leaving no direct way to follow one specific upstream issue, pull request, or discussion. Subscribe and unsubscribe are verified live; the ignored state has an observed upstream API limitation described below.
What changed
get_subject_subscriptionandmanage_subject_subscriptionto the notifications toolset using typed inputs and outputs.updateSubscription.MCP impact
Both tools take
owner,repo,subjectType(issue,pull_request,discussion), andnumber. The write tool additionally requiresstate(subscribed,unsubscribed,ignored). Responses include the subject ID, URL, type, number, current state, and whether the authenticated user can subscribe. Keeping the read tool separate allows subscription inspection in read-only mode.Prompts tested (tool changes only)
Representative workflows:
Validation uses equivalent direct MCP requests rather than LLM prompt runs. Live reads and writes cover one issue, one pull request, and one discussion, and compare results with independent GitHub GraphQL queries. Subscribe, unsubscribe, repeated operations, error reporting for inconsistent ignored results, and restoration of the original states were checked. Mutation behavior is also covered through the real handler and a simulated GitHub HTTP boundary.
Security / limits
updateSubscriptionrequires thenotificationsOAuth scope. The write policy declares bothrepoandnotifications, so OAuth can request repository access for the preliminary lookup of private subjects, while notifications-only PATs remain eligible for public targets. Challenges request only missing scopes. Reads follow the existing repository-read scope policy. Subscription state belongs to the authenticated user, so results carry private/trusted IFC labels even for public subjects. The tools return subscription metadata without issue bodies or comments. A state change may require one lookup and one mutation; an already-matching state requires only the lookup. The write tool follows the existing notification tools' destructive annotation and is marked idempotent.Tool renaming
Lint & tests
./script/lint— 0 issues../script/test(go test -race ./...) after the final scope-policy change; full race suite passed. Earlier development validation also passed with-count=1.Also ran CI-mode schema/feature checks without test cache, built the binary, and ran live read-only MCP checks under legacy and modern protocol versions. Enabling
csv_outputleaves these non-list tools in JSON as designed. With notifications authorization granted, live subscribe/unsubscribe and repeated operations succeeded for issue #3452, PR #3454, and discussion #1257 in github/github-mcp-server. Original subscription states were restored and checked independently.Observed upstream limit: GitHub accepted
updateSubscription(state: IGNORED)but returnedUNSUBSCRIBEDfor each of those three subjects. Independent direct GraphQL calls reproduced the same result; Issue'sviewerThreadSubscriptionStatuswasNONE, notIGNORING_THREAD. The tool reports the actual versus requested state as an error rather than claiming a successful ignore operation. The GraphQL enum remains accepted so a subject for which GitHub does returnIGNOREDcan succeed. Maintainer confirmation of this GitHub API behavior is still needed.API behavior to confirm
The following calls reproduce the behavior directly against GitHub GraphQL, without this MCP server or the Go bindings. Rechecked on October 14, 2026 (Asia/Shanghai), using an OAuth token with
repoandnotifications; original subscription states were restored afterward.IGNOREDusing that node ID:Variables:
{"id": "<node ID from the first query>", "state": "IGNORED"}viewerSubscription: IGNOREDbased on the documented enum; the mutation and independent read both returnedUNSUBSCRIBED, and the issue's thread state wasNONE. Restore the captured original state using the same mutation before finishing the reproduction. The operation can alter the account's subscription even when the requested state is not returned.The same mutation and independent read yielded
UNSUBSCRIBEDfor PR #3454 and discussion #1257. This is an observation for these subjects and credentials, not a claim thatIGNOREDnever works across GitHub.Could maintainers confirm whether
IGNOREDis supported throughupdateSubscriptionfor these subject types, or whether another API/readback is needed? If this behavior is expected, would you prefer an initial implementation limited to subscribe/unsubscribe, with ignore support in a follow-up?Docs
Generated README tool documentation; input and output schema snapshots included.