Prerequisites
- A TrueFoundry account with permission to add MCP servers.
- A GitHub organization or user account where you can create GitHub Apps.
- Your TrueFoundry control plane base URL.
Create a GitHub App
1
Open the GitHub App creation page
For an organization app, open
https://github.com/organizations/<your-org>/settings/apps/new.For a personal account app, open github.com/settings/apps/new.2
Fill in the app details
Use values your users can recognize:
3
Create the app
Click Create GitHub App.
4
Copy OAuth credentials
On the app settings page, copy the Client ID. Then click Generate a new client secret and copy the secret immediately because GitHub only shows it once.
Register GitHub in TrueFoundry
1
Add a remote MCP server
In TrueFoundry, open MCP Gateway, click Add MCP Server, and select Connect any Remote MCP Server.
2
Configure the server
Use the default GitHub MCP URL unless you want a specific toolset mode.
3
Add collaborators
Add users and teams that should be able to use GitHub tools. Give administrators MCP Server Manager and normal consumers MCP Server User.
4
Save and authorize
Create the server. Each user should open the server’s Tools section and click Connect Now to authorize GitHub before using the tools.
Choose GitHub Toolsets
GitHub’s MCP URL can restrict or expand the available tools. Pick the narrowest URL that supports your agent workflow.
Additional toolsets include
actions, code_security, discussions, gists, notifications, projects, and secret_protection.
GitHub Enterprise
For GitHub Enterprise Cloud with data residency, use:<subdomain> with the subdomain from your ghe.com organization.
GitHub Enterprise Server does not support GitHub’s hosted remote MCP endpoint. For that environment, deploy ghcr.io/github/github-mcp-server as a hosted service or register it as a Hosted Stdio-based MCP Server, and authenticate with a fine-grained service account PAT using the minimum scopes required for your tools.
Verify the Connection
For OAuth-based MCP servers, users must first open the server’s Tools section and click Connect Now. After OAuth succeeds, the GitHub tools appear in the tools list. Users can then try those tools from the Agent Playground. If you enabled write-capable toolsets, test them only in a sandbox repository first.Security Notes
- Prefer per-user OAuth so GitHub permissions follow each user’s account and organization membership.
- Use
https://api.githubcopilot.com/mcp/readonlywhen agents should never create or update GitHub resources. - Keep the GitHub client secret in TrueFoundry and rotate it if it is exposed.
- Use Auth Overrides only when you intentionally switch to API key or PAT-based authentication.