Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds utilities for inspecting and comparing OAuth scopes for GitHub Personal Access Tokens (PATs). It introduces two bash scripts and a new Go command to help users understand what scopes are required for MCP server tools and what scopes their tokens have.
Key changes:
- Added
script/get-token-scopesto extract OAuth scopes from a PAT via GitHub API - Added
script/list-scopeswrapper for the newlist-scopesGo command - Added
list-scopessubcommand to list required scopes for enabled tools with text/json/summary output formats - Refactored
formatToolsetNamefunction to sharedhelpers.gofile for reuse
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| script/list-scopes | Bash wrapper that builds and executes the list-scopes Go command |
| script/get-token-scopes | Bash script to fetch OAuth scopes from a PAT using the GitHub API |
| cmd/github-mcp-server/list_scopes.go | Implementation of the list-scopes command with multiple output formats |
| cmd/github-mcp-server/helpers.go | Extracted shared helper function formatToolsetName for reuse |
| cmd/github-mcp-server/generate_docs.go | Removed duplicate formatToolsetName function (now in helpers.go) |
e077a47 to
e08006d
Compare
cf4d046 to
29f6acd
Compare
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
Just add a script to extract scopes from a token.
Why
Fixes #
What changed
MCP impact
Prompts tested (tool changes only)
Security / limits
Tool renaming
deprecated_tool_aliases.goNote: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.
Lint & tests
./script/lint./script/testDocs