Skip to content

docs: clarify auth in Codex CLI instructions#2549

Open
RossTarrant wants to merge 2 commits into
mainfrom
rosstarrant/correct-codex-mcp-installation
Open

docs: clarify auth in Codex CLI instructions#2549
RossTarrant wants to merge 2 commits into
mainfrom
rosstarrant/correct-codex-mcp-installation

Conversation

@RossTarrant
Copy link
Copy Markdown
Contributor

@RossTarrant RossTarrant commented May 26, 2026

Summary

Updates the Codex installation guide so the CLI setup command configures the required bearer token environment variable for the hosted GitHub MCP server.

Why

Fixes #2421

The existing Codex CLI example only stored the remote MCP server URL, which produced an unauthenticated config and could leave users in a confusing 401 state.

What changed

  • Updated docs/installation-guides/install-codex.md to add --bearer-token-env-var GITHUB_PAT_TOKEN to the codex mcp add example.
  • Added a short note explaining that the bearer token environment variable is required for PAT-authenticated access to the hosted GitHub MCP server.

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

Prompts tested (tool changes only)

  • N/A

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

The docs now direct users to configure Codex to read the PAT from GITHUB_PAT_TOKEN instead of creating an unauthenticated remote server entry.

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
  • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/testipt/test`

Docs-only change. Validated the documented codex mcp add github --url https://api.githubcopilot.com/mcp/ --bearer-token-env-var GITHUB_PAT_TOKEN command writes bearer_token_env_var = "GITHUB_PAT_TOKEN" to ~/.codex/config.toml.

Docs

  • Not needed
  • Updated (README / docs / examples)

Copilot AI review requested due to automatic review settings May 26, 2026 08:12
@RossTarrant RossTarrant requested a review from a team as a code owner May 26, 2026 08:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Codex installation guide to ensure the Codex CLI example produces an authenticated remote MCP server configuration for the hosted GitHub MCP server, avoiding confusing 401 failures.

Changes:

  • Updated the codex mcp add example to include --bearer-token-env-var GITHUB_PAT_TOKEN.
  • Added a brief note explaining that the bearer token env var is required for PAT-authenticated access.
Show a summary per file
File Description
docs/installation-guides/install-codex.md Fixes the Codex CLI example to include bearer token env var configuration and clarifies the auth requirement.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread docs/installation-guides/install-codex.md
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread docs/installation-guides/install-codex.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex install guide CLI example creates an unauthenticated remote config

3 participants