github-mcp-server icon indicating copy to clipboard operation
github-mcp-server copied to clipboard

GITHUB_PERSONAL_ACCESS_TOKEN env var name assumes a PAT will be used

Open AArnott opened this issue 8 months ago • 1 comments

The GitHub MCP server must be spawned with GITHUB_PERSONAL_ACCESS_TOKEN as an environment variable set with a value to use in GitHub API calls. But the very name of this environment variable specifies too much. A personal access token is an access token that is provisioned manually by the user (through https://github.com/settings/tokens). This is tedious and a 'last resort' for authorizing apps.

A far preferable way to get an access token (which presumably works for this MCP server) is to use OAuth 2.0. For example, the Visual Studio keychain can produce such a token automatically for the user. But this is not a personal access token, but rather merely an access token.

The environment variable name suggests it must be a PAT, but in fact it's just an access token that's required.

Please consider adding support for GITHUB_ACCESS_TOKEN as an environment variable, document that, and deprecate use of the old environment variable name.

AArnott avatar Apr 28 '25 21:04 AArnott

This issue is stale because it has been open for 30 days with no activity. Leave a comment to avoid closing this issue in 60 days.

github-actions[bot] avatar Nov 01 '25 08:11 github-actions[bot]