Skip to main content
Connect GitHub when your code lives in GitHub. After a FastMCP Gateway organization links a GitHub installation, FastMCP Gateway can list the repositories that installation grants, create hosted servers from those repositories, and start builds when relevant Git events arrive. The boundary is simple: GitHub owns repository access and source history. FastMCP Gateway owns the server record, build record, deployment URL, environment selection, access policy, and observability once a repository revision is used for a hosted server.

Link repositories

Connect one or more GitHub accounts or organizations to a FastMCP Gateway organization.

Build from commits

Resolve a selected repository branch to an exact commit before creating a build.

Preview pull requests

Use pull request events to create preview builds and preview deployment URLs.

Keep source access separate

Use GitHub access only for repository discovery and builds. MCP clients do not receive GitHub credentials.

When to use GitHub

Use the GitHub integration when the server source lives in GitHub and FastMCP Gateway should build, deploy, and update a hosted Python MCP or FastMCP server from that source. GitHub works well when:
  • A repository should become a hosted FastMCP Gateway server.
  • Default branch pushes should create new production-ready builds.
  • Pull requests should create preview builds before changes merge into the tracked production branch.
  • Operators need the build list to show branch, commit, pull request, and repository context.
  • Repository permissions should stay in GitHub while FastMCP Gateway manages the deployed MCP endpoint.
If the server already runs outside FastMCP Gateway and should stay there, register it as an external server. If clients should use a composed endpoint made from multiple servers, create a remix server.

Integration contract

A GitHub connection does not make a server public. Hosted server authentication, server access, capability policy, and deployment behavior still follow the hosted-server contract.

Connect GitHub

You can connect GitHub from onboarding or from organization settings.
1

Open the GitHub connection flow

During onboarding, FastMCP Gateway sends users without a linked installation to the GitHub connection step. In an existing organization, open Settings and then Integrations.
2

Authorize or choose an existing installation

FastMCP Gateway opens a GitHub authorization window. If the signed-in GitHub user already has unlinked FastMCP Gateway installations available, FastMCP Gateway asks which account to link. Otherwise, GitHub asks the user to install or configure the GitHub App.
3

Choose repository access

In GitHub, select the repositories FastMCP Gateway should be able to see. You can grant access to all repositories in the account or only selected repositories.
4

Return to FastMCP Gateway

After GitHub redirects back, FastMCP Gateway verifies the request, links the installation to the organization, and returns to the repository picker or the integrations page that started the flow.
Members and admins can start the GitHub connection flow for an organization. The GitHub user completing the popup must administer the selected GitHub account: the owner for a personal account, or an organization admin for a GitHub organization. Accounts you can see but do not administer appear disabled in the picker. If a GitHub organization installed the app before it requested organization member read access, a GitHub organization admin must accept the updated permissions on GitHub before that organization can be linked to another FastMCP Gateway organization.

Repository picker

The repository picker shows repositories from every GitHub installation linked to the active FastMCP Gateway organization. Repositories are sorted by recent update time, include public or private visibility, and show the repository default branch. When you select a repository, FastMCP Gateway carries this information into the hosted server setup form:
  • repository full name
  • repository visibility
  • GitHub installation ID
  • default branch
  • suggested server name
A suspended or deleted installation contributes no repositories to the picker. Repositories from other linked installations still appear. If no available GitHub installation is linked, FastMCP Gateway redirects the repository picker to the GitHub connection flow. If a repository is missing, edit repository permissions from Settings > Integrations, then refresh the picker.

Create a hosted server

After selecting a repository, FastMCP Gateway asks for the server configuration that turns the repository into a hosted MCP endpoint. When you submit the form, FastMCP Gateway runs through these steps:
1

Fetch repository metadata and default branch

2

Resolve the default branch to a commit

3

Create the server record

4

Create a default branch record

5

Queue the first build

6

Create the first deployment record

7

Run the build in the background

The first build uses the repository default branch at the time FastMCP Gateway creates the server. Later changes to the default branch create later builds; they do not rewrite the first build.

What GitHub events do

FastMCP Gateway processes GitHub events only when they match a linked installation and a repository already tracked by a hosted server. A repository can back more than one hosted server. On a matching push or pull request event, FastMCP Gateway queues a build for every hosted server that tracks that repository and branch. In a monorepo, changing files for one server does not currently skip builds for the other matching servers. If a pull request existed before the hosted server was created, FastMCP Gateway may not create an automatic preview for that older pull request. Create a new pull request after the server exists, or use the dashboard workflow for the revision you want to test.

Production and preview behavior

Default branch builds and pull request builds use different deployment contexts. Preview deployments do not change production traffic. Build success alone does not change any target. Confirm that the related deployment succeeded and became current on the Deployments page. When automatic deployment is disabled, use the API reference to list ready versions and create a deployment for the intended target.

Repository access and missing source

Repository access can change outside FastMCP Gateway. The most common symptoms are a missing repository in the picker, a build that cannot read source, or a private repository build that cannot start.
Open Settings > Integrations, choose the GitHub installation, and edit repository permissions in GitHub. After the repository is granted to the installation, refresh the picker.
Confirm the file path is relative to the repository root, does not include parent-directory references, and exists on the selected branch. For an entrypoint with an object name, use server.py:object_name or server.ts:object_name.
Confirm the server was already tracking the repository when the pull request was opened, the pull request branch is still open, and the branch has not been removed from FastMCP Gateway.
Builds are tied to the commit SHA resolved when the build was queued. Open the build details and compare the recorded commit with the current branch tip.
The installation may have no selected repositories, access may have been removed, or GitHub may not be returning repositories for that installation. Edit permissions from the integrations page and try again.
The GitHub installation may be suspended. If your GitHub account owner or organization admin suspended it, they can unsuspend the FastMCP Gateway app from the account’s GitHub App settings. If the suspension does not appear there, contact FastMCP Gateway support. After the installation is active again, refresh the picker.

Security boundary

GitHub source access is separate from FastMCP Gateway endpoint access.
  • GitHub permissions decide which repositories FastMCP Gateway can discover and build.
  • GitHub installation administration decides who can link an installation: the account owner for a personal account, or an organization admin for a GitHub organization.
  • FastMCP Gateway organization membership decides who can start the integration flow in FastMCP Gateway.
  • Server access and capability policies decide who can use the deployed MCP endpoint.
  • Build-time repository access is not returned to MCP clients.
  • Environment variables and secrets are scoped through FastMCP Gateway deployment settings, not through GitHub repository visibility.
This separation means a user can have access to a deployed FastMCP Gateway endpoint without having access to the underlying GitHub repository, and a GitHub collaborator does not automatically receive access to the FastMCP Gateway server.

Hosted servers

Understand the hosted-server contract across source, builds, deployments, gateway access, runtime, and observability.

Build system

See how FastMCP Gateway packages Python MCP and FastMCP source into build artifacts.

Builds

Review build states, inputs, outputs, and troubleshooting boundaries.

Deployments

Learn how successful deployments update production or preview URLs.

Environment variables

Configure production and preview environment variables.

Authentication

Choose how MCP clients authenticate to hosted endpoints.