diff --git a/docs/installation-guides/install-codex.md b/docs/installation-guides/install-codex.md index 5f92996bc2..184e150f0d 100644 --- a/docs/installation-guides/install-codex.md +++ b/docs/installation-guides/install-codex.md @@ -21,9 +21,11 @@ bearer_token_env_var = "GITHUB_PAT_TOKEN" You can also add it via the Codex CLI: ```cli -codex mcp add github --url https://api.githubcopilot.com/mcp/ +codex mcp add github --url https://api.githubcopilot.com/mcp/ --bearer-token-env-var GITHUB_PAT_TOKEN ``` +Using `codex mcp add ... --url ...` without `--bearer-token-env-var` only stores the remote server URL. For the hosted GitHub MCP server, you also need to bind a PAT environment variable so Codex can send the `Authorization` header. +
Storing Your PAT Securely