Running GitHub Enterprise Server instead of github.com? Point Context7 at your server first. See GitHub Enterprise Server.
GitHub App
The GitHub App is the recommended option. It gives Context7 fine-grained access to only the repositories you select, rotates short-lived access tokens automatically, and delivers webhooks for push-triggered GitOps syncs. Connecting the App is two steps: first create the App, then install it on your repositories.1
Create the App
Go to Workspace Settings › GitHub and choose Create GitHub App in the GitHub App row. Context7 generates a pre-filled App manifest and sends you to GitHub to create the App in one click. You are redirected back and Context7 stores everything it needs automatically: the App ID, private key, client ID and secret, and the webhook secret.
2
Install the App
After it is created, install the App on the account or organization that owns your repositories, and grant it access to the repositories you want to index (including your GitOps manifest repository, if you use GitOps).

Verify the App configuration
The setup flow configures everything below automatically, so a newly created App is ready to use. The exception is an instance onlocalhost or 127.0.0.1: GitHub cannot reach a local address, so the manifest has no webhook and no push event. Add them by hand when the instance has a reachable URL. Use this section to confirm the App, or to fix an App you connected before GitOps existed (it will be missing the push event; see Webhooks). Open the App at github.com/settings/apps.
Under Permissions & events, the repository permissions are granted and the Push event is subscribed:


Personal access token
As a simpler alternative, add a GitHub personal access token in the GitHub token row under Workspace Settings › GitHub. Use a token with therepo scope for private repository access.

GitHub Enterprise Server
Context7 works with GitHub Enterprise Server, not only github.com. Set your server host before you create the GitHub App or add a token, so the App is created on your own server instead of github.com.1
Set your GitHub Enterprise host
Open Workspace Settings › GitHub, open the GitHub token row, and select Enterprise Server. Enter your server host in Server URL, for example 
github.your-company.com (no https://), then choose Save and apply.
2
Create the App or add a token
Now follow GitHub App or Personal access token above. The App manifest, installation, sign-in, and all API calls target your server. Before you create the App, the GitHub App card shows the server it will use, so you can confirm it is not github.com.
https://<your-host>/api/v3, and your server must reach Context7 at its webhook URL for push delivery.
Webhooks
When the GitHub App is connected, GitHub deliverspush events to https://<your-host>/api/github/webhook. Context7 verifies each delivery’s signature against the App’s webhook secret and uses pushes to drive GitOps reconciliation: a push to a GitOps manifest repository triggers an immediate sync.
For delivery to work:
- Context7 must hold the App’s webhook secret. Create GitHub App stores it for you; with no secret, Context7 cannot verify the sender and refuses every delivery. An App created while the instance ran on
localhosthas no webhook secret; once the instance has a reachable URL, recreate the App from Workspace Settings › GitHub instead of adding the webhook by hand. - Your instance must be reachable from GitHub at the webhook URL. An instance behind a firewall that GitHub cannot reach will not receive webhooks.
- The App must be subscribed to push events (new App setups are configured this way automatically).