Skip to content

Commit 2b4d5e6

Browse files
docs(oauth): clarify SupportedScopes is the stdio default and tool filter
Document that stdio OAuth login requests these scopes by default and then filters the exposed tools to the scopes actually granted, so a tool whose required scope is absent from this list is hidden under default OAuth even though a PAT carrying that scope would expose it. Keep the list in sync with tool scope requirements when scopes change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 622d429 commit 2b4d5e6

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

pkg/http/oauth/oauth.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ const (
1919
OAuthProtectedResourcePrefix = "/.well-known/oauth-protected-resource"
2020
)
2121

22-
// SupportedScopes lists all OAuth scopes that may be required by MCP tools.
22+
// SupportedScopes lists every OAuth scope that an MCP tool may require. It is the
23+
// source of truth in two places: HTTP mode advertises it as scopes_supported in
24+
// the protected-resource metadata, and stdio OAuth login requests it by default
25+
// and then filters the exposed tools to the granted scopes. A tool whose required
26+
// scope is absent here is therefore hidden under default OAuth even though a PAT
27+
// carrying that scope would expose it, so keep this list in sync with tool scope
28+
// requirements when scopes change.
2329
var SupportedScopes = []string{
2430
"repo",
2531
"read:org",

0 commit comments

Comments
 (0)