Connect GitHub MCP (remote) to Codex
GitHub's hosted MCP server. Agents read code, issues and pull requests and open PRs with nothing to run on your machine, connecting with a personal access token.
MCP serverOfficialChecked 2026-11-16
Before you start
- Codex installed (see its MCP documentation (opens in a new tab)).
- GitHub MCP (remote) is available on macOS, Windows, Linux and the web.
- Create a fine-grained personal access token with only the repositories and permissions you need, and set it as
GITHUB_PERSONAL_ACCESS_TOKENin your environment. For read-only tools, end the URL with/readonly. GitHub Enterprise Server doesn't support the hosted server.
Step 1: Add GitHub MCP (remote) to Codex
Add it from the terminal
Saves the server to
~/.codex/config.toml, so it works in every project.Terminal codex mcp add github-remote --url https://api.githubcopilot.com/mcp/ --bearer-token-env-var GITHUB_PERSONAL_ACCESS_TOKENOr edit the config file
Add this to
~/.codex/config.toml.~/.codex/config.toml [mcp_servers.github-remote] url = "https://api.githubcopilot.com/mcp/" bearer_token_env_var = "GITHUB_PERSONAL_ACCESS_TOKEN"Good to know- Codex reads
GITHUB_PERSONAL_ACCESS_TOKENfrom your environment each time it connects, so the token stays out of the file.
- Codex reads
Step 2: Check it's connected
Terminal codex mcp listIn a Codex session, run
/mcpto see connected servers and their tools.Step 3: Try a first request
Ask Codex something that only works with GitHub MCP (remote) connected:
Say to Codex List the open issues in this repository that mention design and group them by label.
If it doesn't work
- Codex reads
~/.codex/config.toml. A project.codex/config.tomlis only read in projects you have trusted. - Codex doesn't expand
~or environment variables incommand. Use a full path in the config file. - Servers that need a sign-in: run
codex mcp login <name>.





