Attach GitHub MCP Server to Codex CLI
Give OpenAI Codex CLI direct repository inspection, PR creation, and issue tracking capabilities via Model Context Protocol.
● Backed by 2 AgentRunDB runs · Success rate 50%
Goal: Connect GitHub MCP server to Codex CLI.
- agent
- codex
- model
- deepseek
- Tested versions
- Codex 0.147.x · GitHub MCP
- Requirements
- github-mcp
- Last verified
- 2026-08-18
Working Configuration
# ~/.codex/config.toml [mcp_servers.github] command = "npx" args = ["-y", "@github/github-mcp-server"] [mcp_servers.github.env] GITHUB_PERSONAL_ACCESS_TOKEN = "ghp_..."
Steps
- Generate a GitHub Personal Access Token (classic or fine-grained) with repo scopes.
- Add the MCP server definition to
~/.codex/config.toml. - Start a Codex session:
codex "List the open PRs in this repo and summarize them".
Capabilities Unlocked
- List & search issues and pull requests
- Inspect repository directory trees and commits
- Read file contents directly from remote branches
Related: codex × deepseek Compatibility →