Skip to content

GITHUB_PERSONAL_ACCESS_TOKEN env var name assumes a PAT will be used #357

Description

@AArnott

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.

Activity

  1. github-actions commented on Nov 1, 2025

    @github-actions
    Contributor

    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.

  2. SamMorrowDrums commented on Dec 23, 2025

    @SamMorrowDrums
    Collaborator

    I've assigned copilot, I understand the semantic issue but I also believe it's pretty well understood at this stage that it's just a valid token rather than a PAT, that's just how it started and preserving the name has been broadly about not affected backwards compatibility and not shadowing the same env vars as other github CLI tools because we do worry a user could accidentally end up providing a custom token for one tool and it gets picked up by another etc. So I might consider GITHUB_MCP_TOKEN or something.

  3. github-actions commented on Feb 5, 2026

    @github-actions
    Contributor

    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.

  4. github-actions commented on May 20, 2026

    @github-actions
    Contributor

    This issue was closed because it has been inactive for 60 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingstale

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions