Skip to content

Broken OAuth flow with Codex CLI #1351

@mhemmings

Description

@mhemmings

The OAuth flow when using the Github remote MCP with Codex CLI gives a Github 404 page (Also seen in #1177 (comment), but opening as separate issue)

To replicate, add the following to your Codex config.toml

[features]
rmcp_client = true

[mcp_servers.github]
url = "https://api.githubcopilot.com/mcp/"

and run

codex mcp login github

The OAuth flow is started and a 404 page is opened in the browser.

Note: When launching Codex CLI the following error is shown:

GitHub MCP does not support OAuth. Log in by adding a personal access
token (https://github.com/settings/personal-access-tokens) to your
environment and config.toml:
[mcp_servers.github]
bearer_token_env_var = CODEX_GITHUB_PERSONAL_ACCESS_TOKEN

Adding this config changes the error message to

The github MCP server is not logged in. Run `codex mcp login github`.

Affected version

v0.53.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions