Link repositories
Connect one or more GitHub accounts or organizations to a Horizon
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 Horizon 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 Horizon server.
- Default branch pushes should create new production-ready builds.
- Pull requests should create preview builds before production promotion.
- Operators need the build list to show branch, commit, pull request, and repository context.
- Repository permissions should stay in GitHub while Horizon manages the deployed MCP endpoint.
Integration contract
| Area | What users can expect |
|---|---|
| Connection | A Horizon organization can link one or more GitHub installations. Each installation belongs to a GitHub user or organization account. |
| Repository list | Horizon lists repositories that the linked installation grants. Repositories outside the installation permission set do not appear in the picker. |
| Source selection | Creating a hosted server stores the selected repository, its GitHub repository ID, full name, default branch, entrypoint, and dependency file setting. |
| Build revision | Horizon resolves a branch or pull request to a commit SHA before build work begins. Moving the branch later does not change that build. |
| Credentials | Horizon uses repository access for discovery and build checkout. GitHub credentials are not exposed to MCP clients. |
| Events | Push, pull request, branch deletion, installation, and repository-permission events update Horizon records when they match a linked installation and tracked repository. |
| Removal | Removing repository access or deleting the installation can make repositories unavailable to Horizon. Builds that need unavailable source access cannot proceed until access is restored. |
A GitHub connection does not make a server public. Hosted server
authentication, server access, capability policy, and deployment promotion
still follow the hosted-server contract.
Connect GitHub
You can connect GitHub from onboarding or from organization settings.Open the GitHub connection flow
During onboarding, Horizon sends users without a linked installation to the
GitHub connection step. In an existing organization, open
Settings and then Integrations.
Authorize or choose an existing installation
Horizon opens a GitHub authorization window. If the signed-in GitHub user
already has unlinked Horizon installations available, Horizon asks which
account to link. Otherwise, GitHub asks the user to install or configure
the Horizon GitHub App.
Choose repository access
In GitHub, select the repositories Horizon should be able to see. You can
grant access to all repositories in the account or only selected
repositories.
Repository picker
The repository picker shows repositories from every GitHub installation linked to the active Horizon organization. Repositories are sorted by recent update time, include public or private visibility, and show the repository default branch. When you select a repository, Horizon carries this information into the hosted server setup form:- repository full name
- repository visibility
- GitHub installation ID
- default branch
- suggested server name
Create a hosted server
After selecting a repository, Horizon asks for the server configuration that turns the repository into a hosted MCP endpoint.| Field | Behavior |
|---|---|
| Server name | Determines the Horizon server name and the deployment slug preview. |
| Entrypoint | Points to the Python file, and optional object name, that defines the MCP server. Horizon validates the path format and can check that the file exists in the selected branch. |
| Authentication | Horizon authentication is enabled by default. Disabling it is available only when the organization plan allows it. |
| Dependency file | Optional. Use it when dependencies are not in the file Horizon would otherwise discover. |
| Environment variables | Optional KEY=value lines. Names must use uppercase letters, numbers, and underscores, and must start with a letter or underscore. |
The first build uses the repository default branch at the time Horizon creates
the server. Later changes to the default branch create later builds; they do
not rewrite the first build.
What GitHub events do
Horizon processes GitHub events only when they match a linked installation and a repository already tracked by a hosted server.| Event | Horizon behavior |
|---|---|
| Default branch push | Creates a queued build and deployment record for the tracked default branch, unless the same commit already has a build for that server and branch. |
| Non-default branch push | Creates a preview build only when Horizon is already tracking that branch for an open pull request. |
| Pull request opened or reopened | Creates a branch record, queued build, and preview deployment for each matching hosted server. |
| Pull request synchronized | Creates a new queued build and preview deployment for the updated pull request head commit. |
| Pull request closed without merge | Removes the preview branch record for the matching server and repository. |
| Branch deleted | Removes the matching branch record from Horizon. |
| Repository access added | Makes the repository available to linked Horizon organizations after repository data refreshes. |
| Repository access removed | Removes the repository from Horizon’s authorized source records and starts cleanup for related deployment resources. |
| Installation deleted | Removes the linked installation record from Horizon. |
Production and preview behavior
Default branch builds and pull request builds use different deployment contexts.| Context | Source | Environment scope | Deployment behavior |
|---|---|---|---|
| Production candidate | The tracked default branch commit. | Production variables. | The build can become the live deployment through the production deployment workflow. |
| Pull request preview | The pull request head commit. | Preview variables plus branch-specific overrides. | Horizon creates or updates a preview deployment URL for that branch. |
Repository access and missing source
Repository access can change outside Horizon. 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.The repository is missing from the picker
The repository is missing from the picker
Open Settings > Integrations, choose
the GitHub installation, and edit repository permissions in GitHub. After
the repository is granted to the installation, refresh the picker.
The entrypoint or dependency file cannot be verified
The entrypoint or dependency file cannot be verified
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.A pull request did not create a preview
A pull request did not create a preview
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 Horizon.
A build uses an older commit than the branch tip
A build uses an older commit than the branch tip
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.
A connected installation shows no repositories
A connected installation shows no repositories
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.
Security boundary
GitHub source access is separate from Horizon endpoint access.- GitHub permissions decide which repositories Horizon can discover and build.
- Horizon organization membership decides who can start the integration flow in Horizon.
- 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 Horizon deployment settings, not through GitHub repository visibility.
Related docs
Hosted servers
Understand the hosted-server contract across source, builds, deployments,
gateway access, runtime, and observability.
Build system
See how Horizon packages Python MCP and FastMCP source into build
artifacts.
Builds
Review build states, inputs, outputs, and troubleshooting boundaries.
Deployments
Learn how successful builds become live or preview deployment URLs.
Environment variables
Configure production, preview, and branch-scoped values.
Authentication
Choose how MCP clients authenticate to hosted endpoints.