GitHub's own MCP server gives an agent the parts of GitHub that aren't in your local checkout: issues, pull requests and reviews, Actions runs, security alerts and code in other repositories. In practice it's most useful for questions like "why did CI fail on main?", "which PRs are waiting on my review?" or "open a PR for this branch with a summary", and for agents that work across several repositories at once.
It suits developers who work in Codex, the OpenAI API or another MCP client. In ChatGPT, OpenAI's GitHub app is usually easier.
From the publisher
GitHub's official MCP server connects AI tools to repositories, issues, pull requests, Actions, code security alerts and more. It is available as a hosted remote server with OAuth or as a local Docker/binary server using a personal access token. Toolsets can be enabled selectively to limit the exposed tools.
What you need
- A GitHub account. The server can only reach what your credential can; GitHub enforces its normal permissions.
- Remote or local. GitHub hosts the server at
https://api.githubcopilot.com/mcp/(Streamable HTTP). There is also a local server as a Docker image or binary, which is the only option for GitHub Enterprise Server. - A token or OAuth. The hosted server accepts a personal access token as a bearer token, which is what GitHub's Codex guide uses. OAuth only works in clients that have registered a GitHub or OAuth app; OpenAI's GitHub plugin includes one for Codex. The local server can sign you in through the browser or use
GITHUB_PERSONAL_ACCESS_TOKEN. - Org approval, sometimes. Organization policies on MCP in Copilot, OAuth apps, tokens and SSO can block access.
Good to know
- Write tools are on by default. The default toolsets (context, repos, issues, pull requests, users) include tools that create branches, open and merge pull requests and edit issues. Keep tool approvals on.
- Load only what you need. Each toolset has its own URL, such as
/mcp/x/actions, and more toolsets (Actions, code security, Dependabot, projects) are opt-in. - Issues and comments are untrusted input. Anyone can write text in a public issue that tries to redirect the agent. Lockdown mode hides content from users without push access, but GitHub calls it a best-effort filter, not an authorization boundary.
- Scope tokens tightly. Grant only the scopes your tasks need, use separate tokens per project and rotate them.
- Rate limits apply. Calls count against GitHub's normal API limits.
Also available as
Connect
- 1Connect it in ChatGPT
Turn on Developer mode in ChatGPT (Settings → Security and login), open Plugins, select + and paste https://api.githubcopilot.com/mcp/ as the MCP server URL, then sign in with OAuth. Add it to a chat from the composer's tools menu.
- 2Or add it to Codex or the API
codex mcp add github --url https://api.githubcopilot.com/mcp/ codex mcp login githubThe login command opens a browser to finish OAuth.
Configs are generated from the publisher's documented endpoint. Check their docs for plan requirements and scopes. New to this? Read the step-by-step tutorial.
Tools 12
get_meget_file_contentslist_issuessearch_issuesissue_writecreate_pull_requestpull_request_readmerge_pull_requestcreate_branchactions_listlist_code_scanning_alertsprojects_writeThings to ask
- “List the open issues assigned to me in my-org/api”
- “Open a pull request from feature/login into main with a summary of the changes”
- “Why did the latest GitHub Actions run on main fail?”
- “Show code scanning alerts for this repository”
Remove it
- 1In ChatGPT
Open the connection's details page in your plugin settings (chatgpt.com/plugins) and disconnect or delete it.
- 2In Codex
codex mcp remove githubOr delete the [mcp_servers.github] block from ~/.codex/config.toml.
GitHub: common questions
- Can I use the GitHub MCP server in ChatGPT?
In ChatGPT, the straightforward route is OpenAI's GitHub app or GitHub plugin. Developer mode can add MCP servers by URL with OAuth or no auth, but GitHub says each client must register its own app for OAuth, and ChatGPT isn't in its list of documented hosts, so we can't confirm the sign-in works there. See Add an MCP server to ChatGPT.
- What's the difference between the GitHub MCP server, app and plugin?
The GitHub app is OpenAI's first-party connector for ChatGPT, and some features such as Codex require it. The GitHub plugin, also by OpenAI, combines a GitHub app connection with a config for this hosted MCP server using OAuth, so in Codex you can skip creating a token. The MCP server itself is GitHub's, works in any MCP client and offers toolsets and read-only mode.
- How do I make the GitHub MCP server read-only?
On the hosted server, add
/readonlyto the URL (for examplehttps://api.githubcopilot.com/mcp/readonly) or send theX-MCP-Readonly: trueheader. For the local server, pass--read-onlyor setGITHUB_READ_ONLY=1. Only read tools are offered then. A token with read-only permissions adds a second layer.- Can I use it with the OpenAI API?
Yes. The Responses API's
mcptool can call the hosted server: setserver_urltohttps://api.githubcopilot.com/mcp/and pass a personal access token inauthorization. Useallowed_toolsto limit what the model can call and keep approvals for write tools. See Use remote MCP servers in the OpenAI API.
Learn more
Guide updated Oct 24, 2026. Sources: github.com, github.com, github.com, github.com, github.com, learn.chatgpt.com, developers.openai.com.