> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub AI connector

> Connect the Omni Agent to GitHub's MCP server with a personal access token.

The GitHub connector gives the [Omni Agent](https://docs.omni.co/ai/chat.md) access to GitHub's MCP server. It uses one personal access token for everyone in your organization, so the agent can do what the token allows, and no more.

## Requirements

* **Organization Admin** permissions in Omni
* **Access to the GitHub repositories** you want the Omni Agent to use

## Setup

### 1. Create a personal access token in GitHub

1. In GitHub, [create a fine-grained personal access token](https://github.com/settings/personal-access-tokens/new).
2. Under **Repository access**, select only the repositories that the agent needs.
3. Under **Permissions**, give only the access that the agent needs. For example, to let the agent create issues, set **Issues** to **Read and write**.

   > [!WARNING]
   >
   > A connector with one shared API key is available to everyone in your organization, including users in [embedded sessions](https://docs.omni.co/ai/connectors.md#embed). Give the token access only to what you want all users to access.
4. Generate the token, and copy it.

### 2. Add the GitHub connector in Omni

1. Navigate to **AI Hub > Connectors**.
2. In the catalog, click **GitHub**.
3. Paste the token in the **API key** field.
4. Click **Add**.

## Rotating API keys

1. Navigate to **AI Hub > Connectors**.
2. In the connector's row, click the  icon, then **Edit**.
3. Paste the new key in the **Replace API key** field.
4. Click **Save**.

Tokens expire, so replace the token before its expiration date.

## Next steps

* [AI connector catalog](https://docs.omni.co/ai/connectors/catalog) - Add other connectors
* [AI connectors](https://docs.omni.co/ai/connectors.md) - Edit or remove connectors
