Title: Notification and search tools ignore owner when repo is missing and act on all repositories · Issue #3915 · github/github-mcp-server · GitHub
Open Graph Title: Notification and search tools ignore owner when repo is missing and act on all repositories · Issue #3915 · github/github-mcp-server
X Title: Notification and search tools ignore owner when repo is missing and act on all repositories · Issue #3915 · github/github-mcp-server
Description: Describe the bug mark_all_notifications_read, list_notifications, search_issues and search_pull_requests take optional owner and repo parameters, but only use them when both are set. If a caller passes owner without repo, the parameter i...
Open Graph Description: Describe the bug mark_all_notifications_read, list_notifications, search_issues and search_pull_requests take optional owner and repo parameters, but only use them when both are set. If a caller pa...
X Description: Describe the bug mark_all_notifications_read, list_notifications, search_issues and search_pull_requests take optional owner and repo parameters, but only use them when both are set. If a caller pa...
Opengraph URL: https://github.com/github/github-mcp-server/issues/3915
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Notification and search tools ignore owner when repo is missing and act on all repositories","articleBody":"### Describe the bug\n\n`mark_all_notifications_read`, `list_notifications`, `search_issues` and `search_pull_requests` take optional `owner` and `repo` parameters, but only use them when both are set. If a caller passes `owner` without `repo`, the parameter is dropped and the tool acts on everything the user can see. For `mark_all_notifications_read` that means every notification is marked as read, which cannot be undone.\n\nThe checks are `owner != \"\" && repo != \"\"` in `pkg/github/notifications.go` (list and mark-all handlers) and `input.Owner != \"\" && input.Repo != \"\"` in `prepareSearchArgs` in `pkg/github/search_utils.go`.\n\n### Affected version\n\nBuilt from `main` at 9a72d8d3.\n\n### Steps to reproduce the behavior\n\nI ran the stdio server with `--toolsets all --gh-host http://127.0.0.1:8080` against a local server that logs requests, and called the tools with `owner` only:\n\n| Call | Request sent |\n| --- | --- |\n| `mark_all_notifications_read {\"owner\":\"o\"}` | `PUT /api/v3/notifications` |\n| `list_notifications {\"owner\":\"o\"}` | `GET /api/v3/notifications` |\n| `search_issues {\"query\":\"bug\",\"owner\":\"o\"}` | `GET /api/v3/search/issues?q=is:issue bug` |\n| `search_pull_requests {\"query\":\"fix\",\"owner\":\"o\"}` | `GET /api/v3/search/issues?q=is:pr fix` |\n\nWith both `owner` and `repo`, the requests go to `/repos/o/r/notifications` and use `repo:o/r`, as expected.\n\n### Expected vs actual behavior\n\nExpected: an error such as \"owner and repo must be provided together\", so the caller can correct the call. Notifications have no owner-level endpoint, so an error is the only option there. For the search tools, `owner` alone could instead add `user:o`, but an error keeps the four tools consistent and matches the current descriptions (\"If provided with repo...\").\n\nActual: the call succeeds with a wider scope than requested.\n\nI'd like to send a PR that returns an error when only one of `owner` and `repo` is set, with tests for each tool.\n","author":{"url":"https://github.com/mohitmishra786","@type":"Person","name":"mohitmishra786"},"datePublished":"2026-11-21T15:39:04Z","url":"https://github.com/github/github-mcp-server/issues/3915"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9e4f83f3-4e13-6259-4fcd-af03ab1df0d3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B31C:8AD7D:6D0706:91B175:6B062D43 |
| html-safe-nonce | 38334bc339298d4e5c273d804db2b78b5bd40ec27a5d869408f1b9a477e72c21 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzFDOjhBRDdEOjZEMDcwNjo5MUIxNzU6NkIwNjJENDMiLCJ2aXNpdG9yX2lkIjoiMjYxOTM2MjU1ODMyNjc0NjQzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8eb5330fbb0f7854b7e8b7450dd3c57ac0141f8f0a3e2f706d83d2779d3c8b9a |
| hovercard-subject-tag | issue:6530869738 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/github-mcp-server/3915/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4450081c9652fb03b2d6f8f0d16abb4a92779f3286b235c6b9f36836bf9a6339/github/github-mcp-server/issues/3915 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4450081c9652fb03b2d6f8f0d16abb4a92779f3286b235c6b9f36836bf9a6339/github/github-mcp-server/issues/3915 |
| og:image:alt | Describe the bug mark_all_notifications_read, list_notifications, search_issues and search_pull_requests take optional owner and repo parameters, but only use them when both are set. If a caller pa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mohitmishra786 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| turbo-cache-control | no-preview |
| go-import | github.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 942771284 |
| octolytics-dimension-repository_nwo | github/github-mcp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 942771284 |
| octolytics-dimension-repository_network_root_nwo | github/github-mcp-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 494ea0bb1e0feef734a83e2628697647755e8864 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width