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

# Connect the GitHub MCP server

> Give Conversion AI chats and agents access to a GitHub repository by adding GitHub's remote MCP server with a fine-grained personal access token.

Connect GitHub's MCP server to let Conversion AI chats and [agents](/product-docs/conversion-ai/agents/overview) read a repository, create branches, push commits, and open pull requests.

This guide uses GitHub's **remote** MCP server, hosted at `api.githubcopilot.com`. There is nothing to install, run, or keep updated.

## Before you begin

Make sure you have:

* A Conversion Administrator account to add MCP servers
* A GitHub account with access to the repositories you want to connect
* Approval from a GitHub organization owner, if the repositories belong to an organization that requires approval for fine-grained tokens

## Create a fine-grained personal access token

The GitHub MCP server has no setting to limit which repositories it can reach. The token you give it is the only boundary, so scope it to exactly the repositories and permissions your agents need.

<Steps>
  <Step title="Open the token settings">
    In GitHub, go to **Settings → Developer settings → Personal access tokens → Fine-grained tokens** and click **Generate new token**.
  </Step>

  <Step title="Choose the owner and repositories">
    | Setting | Value |
    | - | - |
    | **Resource owner** | The user or organization that owns the repositories. Organization tokens may require owner approval. |
    | **Repository access** | **Only select repositories**, then pick each repository Conversion should reach. |
    | **Expiration** | Any period that fits your security policy. When the token expires, create a new one and update the server in Conversion. |
  </Step>

  <Step title="Set the repository permissions">
    | Permission | Access | Why |
    | - | - | - |
    | **Metadata** | Read-only | Required. GitHub selects it automatically. |
    | **Contents** | Read and write | Create branches and push commits. Use **Read-only** if agents only need to read files. |
    | **Pull requests** | Read and write | Open and comment on pull requests. |
    | **Workflows** | Read and write | Only needed if agents change files in `.github/workflows/`. Without it, GitHub rejects those pushes, even with **Contents** write access. |

    Add any of these if your agents need them:

    | Permission | Access | Why |
    | - | - | - |
    | **Issues** | Read-only, or Read and write | Read issues, or also create, update, and comment on them. |
    | **Commit statuses** | Read-only | See the CI status of commits and pull requests. |
    | **Actions** | Read-only, or Read and write | Read workflow runs, jobs, and logs, or also rerun and cancel them. |
    | **Discussions** | Read-only, or Read and write | Read discussions, or also post in them. |
    | **Code scanning alerts** | Read-only | Read code scanning alerts. |
    | **Dependabot alerts** | Read-only | Read Dependabot alerts. |
    | **Secret scanning alerts** | Read-only | Read secret scanning alerts. |

    <Note>
      The server URL in the next section enables GitHub's default tools: repositories, issues, pull requests, and users. Actions, Discussions, and security alert tools are off by default. To turn on every tool group, use `https://api.githubcopilot.com/mcp/x/all` as the server URL. See [GitHub's remote server documentation](https://github.com/github/github-mcp-server/blob/main/docs/remote-server.md) for other options.
    </Note>
  </Step>

  <Step title="Copy the token">
    Click **Generate token** and copy it. GitHub does not show it again.
  </Step>
</Steps>

<Warning>
  Treat the token like a password. Don't save it in a file that gets committed to a repository.
</Warning>

## Add the server in Conversion

<Steps>
  <Step title="Open the MCP server settings">
    In Conversion, go to **Settings → AI** and open the **Connections** tab. In the **MCP servers** section, click **Add MCP server**.
  </Step>

  <Step title="Fill in the server details">
    | Field | Value |
    | - | - |
    | **Name** | `GitHub` |
    | **Server URL** | `https://api.githubcopilot.com/mcp/` |
    | **Transport** | **Streamable HTTP** |
    | **Authentication** | **API key / header (shared)** |
    | **Header name** | `Authorization` |
    | **Header value** | `Bearer ` followed by your token, such as `Bearer github_pat_...` |

    <Note>
      Include the word `Bearer` and a space before the token. Keep the trailing slash on the server URL: use `.../mcp/`, not `.../mcp`.
    </Note>
  </Step>

  <Step title="Save the server">
    Click **Add server**. Conversion inspects the server and lists its tools on the server page.
  </Step>
</Steps>

<Warning>
  The header value is shared with the whole workspace. Every member who can use Conversion AI chats or agents with this server gets the token's access to the selected repositories.
</Warning>

## Choose which tools can run

Open the **GitHub** server page and review the **Tools** tab. Set each tool to **Auto-approve**, **Require approval**, or **Disabled**. For example, you can auto-approve read tools and require approval for tools that push code or open pull requests.

See [AI Connections](/product-docs/workspace-settings/ai/connections#server-page-and-tools) for what each mode does.

## Test the connection

1. Start a Conversion AI chat.
2. Ask it to list the open pull requests in one of the repositories you selected.
3. Confirm that it returns results from that repository.

If the server shows **Unreachable** or the tools list says *Unable to connect*, check the server URL, the `Bearer ` prefix, and whether the token has expired or is still waiting for organization approval. Then click **Try again** or **Refresh tools**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.