Skip to main content

How to Connect GitHub

🔧 Tools · MCP

The Remote GitHub MCP Server at https://api.githubcopilot.com/mcp/ exposes repositories, issues, pull requests, Actions, code scanning, and more. The X-MCP-Readonly: true header keeps the agent read-only (see step 2).

1. Create a GitHub OAuth App​

  1. Go to OAuth Apps → New OAuth App under your account's Developer settings, or your org's (e.g. https://github.com/organizations/<your-org>/settings/applications) to own the app at the org level.
  2. Fill in:
    • Application name: Zeta Alpha MCP.
    • Homepage URL: https://zeta-alpha.com.
    • Authorization callback URL: https://api.zeta-alpha.com/v0/service/mcp/oauth/callback.
  3. Register, then Generate a new client secret and copy it immediately: GitHub shows it only once.

GitHub OAuth app registration form with name, homepage URL, and authorization callback URL filled in

2. Add the Server to the Tenant​

Add a server under the tenant's MCP Servers (see Adding a Server to the Tenant):

FieldValue
Namegithub
URLhttps://api.githubcopilot.com/mcp/
OAuth client IDThe app's Client ID
OAuth client secretNew secret… with the app's client secret

To narrow the toolset, use a URL path variant from GitHub's remote-server docs as URL, e.g. https://api.githubcopilot.com/mcp/x/repos.

To keep the agent read-only, add the header in Edit Tenant JSON, in the server's streamable_http block:

"headers": { "X-MCP-Readonly": "true" }

3. Mount It and Connect​

Mount github on the agent (Mounting a Server on an Agent). Each user then connects GitHub from Connected apps in the chat, or through the Authorize github button the agent shows when a request needs GitHub (e.g. "Show me the README of the platform repo"). See Connecting from the Navigator.

If the organization enforces OAuth App access restrictions, an owner must approve the app under Organization settings → Third-party access → OAuth app policy before private-repo tools work.

Troubleshooting​

SymptomCause
Redirect URI mismatchThe authorization callback URL on the GitHub app differs from the server's Redirect URI (empty: the platform callback URL).
Tools work for public repos but fail on private onesThe user's grant is not approved for the org. An owner must approve the app, or the user must request access from the consent screen.
Writes return 403Either X-MCP-Readonly: true is set, or the user did not grant write scopes.