Skip to content

Conversation

@gpeal
Copy link
Collaborator

@gpeal gpeal commented Oct 20, 2025

Because the GitHub MCP is one of the most popular MCPs and it confusingly doesn't support OAuth, we should make it more clear how to make it work so people don't think Codex is broken.

github/github-mcp-server#921 (comment)

@gpeal gpeal requested review from bolinfest and joshka-oai October 20, 2025 21:43
Copy link
Collaborator

@joshka-oai joshka-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to test this logic at all / easily, or is the effort to do so higher than makes sense for now?

Comment on lines 2313 to 2315
format!(
"GitHub MCP does not support OAuth. Log in by adding `bearer_token_env_var = GITHUB_PERSONAL_ACCESS_TOKEN` in the `mcp_servers.{server_name}` section of your config.toml"
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This message might be interpreted as suggesting to replace GITHUB_PERSONAL_ACCESS_TOKEN with the PAT rather than being an environment variable. Perhaps add a part of the message that says to set the variable or link to some info about why we don't support directly setting the PAT in the file and only allow it via an environment variable.

Probably this variable name should be CODEX_GITHUB_PAT or something similar as it's unlikely that a properly scoped PAT for codex should have full GITHUB access.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I tried to word smith this a bit to keep it short but can incorporate some of that.

@gpeal
Copy link
Collaborator Author

gpeal commented Oct 20, 2025

Is it possible to test this logic at all / easily, or is the effort to do so higher than makes sense for now?

I extracted this to a function to make it more testable, might as well write some 😄 Updated!

@gpeal gpeal merged commit ef80645 into main Oct 20, 2025
20 checks passed
@gpeal gpeal deleted the gpeal/github-error branch October 20, 2025 23:23
@github-actions github-actions bot locked and limited conversation to collaborators Oct 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants