# GitHub (OAuth)

**Type:** Official

**Source Type:** Remote URL

**Description:** GitHub MCP server provides AI assistants with comprehensive access to GitHub's platform for repository management, code review, and collaboration. It enables operations on repositories, issues, pull requests, and other GitHub resources through a remote API endpoint with OAuth authentication.

**Prerequisites:**

* Admin access to GitHub
* Admin access to your Natoma org

***

## Setup

### Step 1: Configure a GitHub App in GitHub

1. In GitHub, navigate to **Settings > Developer Settings > GitHub Apps**.
2. Click **New GitHub App** in the top right corner.
3. Fill in the following:
   * **App name:** Natoma OAuth (or any descriptive label)
   * **Homepage URL:** `https://natoma.ai`
   * **Authorization Callback URL:**

{% hint style="warning" %}
Use exactly this callback URL — the OAuth flow will fail if it doesn't match.
{% endhint %}

```
https://api.natoma.app/mcp/server/callback
```

4. Click **Register Application**.
5. Copy the **Client ID** and generate a **Client Secret** — you'll need both in the next step.

### Step 2: Configure the OAuth Client in Natoma

1. In the Natoma portal, navigate to **Apps** and find **GitHub (OAuth)**.
2. Click **+** > **Enable Personal Connections**.
3. Enter the **Client ID** and **Client Secret** from Step 1.
4. Click **Save**.

### Step 3: Connect Your GitHub Account

1. In Natoma, navigate to **My Connections**.
2. Select **GitHub (OAuth)** > **Add Personal Connection**.
3. Click **Authorize Connection**.
4. Accept the OAuth consent flow in GitHub.
5. You will be redirected back to Natoma upon successful authorization.
6. Click **Test Connection** to verify everything is working.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.natoma.ai/apps/github-oauth.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
