Skip to content

feat: add GitHub notifications tools for managing user notifications #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,39 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
- `secret_type`: The secret types to be filtered for in a comma-separated list (string, optional)
- `resolution`: The resolution status (string, optional)

### Notifications

- **list_notifications** – List notifications for a GitHub user
- `filter`: Filter to apply to the response (`default`, `include_read_notifications`, `only_participating`)
- `since`: Only show notifications updated after the given time (ISO 8601 format)
- `before`: Only show notifications updated before the given time (ISO 8601 format)
- `owner`: Optional repository owner (string)
- `repo`: Optional repository name (string)
- `page`: Page number (number, optional)
- `perPage`: Results per page (number, optional)


- **get_notification_details** – Get detailed information for a specific GitHub notification
- `notificationID`: The ID of the notification (string, required)

- **dismiss_notification** – Dismiss a notification by marking it as read or done
- `threadID`: The ID of the notification thread (string, required)
- `state`: The new state of the notification (`read` or `done`)

- **mark_all_notifications_read** – Mark all notifications as read
- `lastReadAt`: Describes the last point that notifications were checked (optional, RFC3339/ISO8601 string, default: now)
- `owner`: Optional repository owner (string)
- `repo`: Optional repository name (string)

- **manage_notification_subscription** – Manage a notification subscription (ignore, watch, or delete) for a notification thread
- `notificationID`: The ID of the notification thread (string, required)
- `action`: Action to perform: `ignore`, `watch`, or `delete` (string, required)

- **manage_repository_notification_subscription** – Manage a repository notification subscription (ignore, watch, or delete)
- `owner`: The account owner of the repository (string, required)
- `repo`: The name of the repository (string, required)
- `action`: Action to perform: `ignore`, `watch`, or `delete` (string, required)

## Resources

### Repository Content
Expand Down
4 changes: 4 additions & 0 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,7 @@ The current test suite is intentionally very limited in scope. This is because t
The tests are quite repetitive and verbose. This is intentional as we want to see them develop more before committing to abstractions.

Currently, visibility into failures is not particularly good. We're hoping that we can pull apart the mcp-go client and have it hook into streams representing stdio without requiring an exec. This way we can get breakpoints in the debugger easily.

### Global State Mutation Tests

Some tools (such as those that mark all notifications as read) would change the global state for the tester, and are also not idempotent, so they offer little value for end to end tests and instead should rely on unit testing and manual verifications.
3 changes: 2 additions & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ func getRESTClient(t *testing.T) *gogithub.Client {

// Create a new GitHub client with the token
ghClient := gogithub.NewClient(nil).WithAuthToken(token)
if host := getE2EHost(); host != "https://github.com" {

if host := getE2EHost(); host != "" && host != "https://github.com" {
var err error
// Currently this works for GHEC because the API is exposed at the api subdomain and the path prefix
// but it would be preferable to extract the host parsing from the main server logic, and use it here.
Expand Down
Loading