--- id: github title: GitHub sidebar_label: GitHub description: Learn how to connect the GitHub MCP server to Sumo Logic so that DojoAI agents can use GitHub tools with your GitHub account. slug: /help/docs/integrations/outbound/integrations-via-mcp-server/github/ canonical: https://www.sumologic.com/help/docs/integrations/outbound/integrations-via-mcp-server/github/ --- import useBaseUrl from '@docusaurus/useBaseUrl'; This page covers how to connect the GitHub MCP server to Sumo Logic. For the general setup steps and the list of redirect URLs, see [Set up an integration via MCP](/docs/integrations/outbound/integrations-via-mcp-server/setup-integration-via-mcp/). :::info GitHub's hosted MCP server accepts an OAuth App or a personal access token. A GitHub App installation token is not supported, so register an OAuth App, not a GitHub App. ::: ## Prerequisites Before you start, make sure you have: - A GitHub account with access to the repositories you want to use. - The **Manage Integrations** permission, to add a server or connection. - The redirect URL for your Sumo Logic deployment, from the redirect URL table on the [parent page](/docs/integrations/outbound/integrations-via-mcp-server/setup-integration-via-mcp/#redirect-callback-urls), if you use your own OAuth App. - A GitHub organization owner, to approve the OAuth App for the organization and to register your own OAuth App. ## Authentication method Use the Sumo Logic managed app unless your security policy requires your own app or you need a shared identity. | Method | Who is signed in | What you set up on GitHub | |:--|:--|:--| | OAuth 2.0 (Authorization code) - Use the Sumo Logic managed app | Each user, with their own GitHub account. | Nothing to create. An owner of each GitHub organization may need to approve the app. | | OAuth 2.0 (Authorization code) - Use your own credentials | Each user, with their own GitHub account. | Register an OAuth App and enter its client ID and secret in Sumo Logic. | | Bearer token (personal access token) | One shared identity. | Create a personal access token and enter it in Sumo Logic. | ## Vendor configuration ### Approve the app for your organization GitHub organizations can restrict OAuth app access to their data. GitHub enables this restriction by default for new organizations. Until an organization owner approves the app, you can authorize it for your personal account, but you cannot use it to access the organization's **private** repositories. This restriction applies to both the Sumo Logic-managed app and your own OAuth app. To request: 1. Open the approval screen and ask your organization owner to approve the app. To grant access as an owner: 1. Open the organization settings and navigate to **Settings > Third-party Access > OAuth app policy**. 1. Once you find the app, click **Review**, and then click **Grant access**. Approval applies to the entire organization and cannot be restricted to specific repositories. ### Client ID and secret Create the OAuth app under a GitHub organization rather than a personal account. The app owner's name appears on the consent screen, and an organization-owned app remains available even when staff members leave the organization. You must be an owner of the GitHub organization to create the app. 1. Open your GitHub organization and navigate to **Settings > Developer settings > OAuth Apps**. 1. Click **New OAuth App**. 1. Enter the following details: | GitHub field | What to enter | |:--|:--| | Application name | A recognizable name, such as your company name. This name appears on the consent screen. | | Homepage URL | A public page for your organization or this integration. | | Application description | Optional. The description appears to users. | | Authorization callback URL | The redirect URL for your Sumo Logic deployment. Copy it exactly from the redirect URL table on the [parent page](/docs/integrations/outbound/integrations-via-mcp-server/setup-integration-via-mcp/#redirect-callback-urls). | | Enable Device Flow | Leave this disabled. | 1. Click **Register application**. 1. On the app page, copy the **Client ID**, then click **Generate a new client secret** and copy the secret. GitHub shows it only once. 1. Leave **Expire user access tokens** enabled. GitHub then issues a refresh token, which Sumo Logic uses to keep users connected. ### Personal access token 1. On GitHub, navigate to **Settings > Developer settings > Personal access tokens** and create a token. A fine-grained token lets you limit which repositories and permissions it has. 1. Choose only the permissions and repositories you are comfortable sharing with everyone who can use the connection. 1. Copy the token. GitHub shows it only once. ## Connection setup in Sumo Logic ### Option 1: OAuth 2.0 (Authorization code) - Use the Sumo Logic managed app Follow the steps below to configure the connection: 1. [**New UI**](/docs/get-started/sumo-logic-ui). To access the integrations, in the main Sumo Logic menu select **App Catalog > Integrations > Outbound Integrations**. 1. Click the **GitHub** card. 1. Click **Connect** to open the **Connect GitHub MCP** configuration panel. 1. Enter the connection name. 1. Under **Authentication configuration**, select **OAuth 2.0 (Authorization code)**. 1. Under **Authorization**, select **Use the Sumo Logic managed app**. No credentials needed. 1. Click **Connect**. 1. On GitHub, review and approve access. If your organization restricts OAuth Apps, an owner needs to [approve the app](#approve-the-app-for-your-organization). ### Option 2: OAuth 2.0 (Authorization code) - Use your own credentials 1. [**New UI**](/docs/get-started/sumo-logic-ui). To access the integrations, in the main Sumo Logic menu select **App Catalog > Integrations > Outbound Integrations**. 1. Click the **GitHub** card. 1. Click **Connect** to open the **Connect GitHub MCP** configuration panel. 1. Enter the connection name. 1. Under **Authentication configuration**, select **OAuth 2.0 (Authorization code)**. 1. Under **Authorization**, select **Use your own credentials**. 1. Add the Client ID and Client Secret collected from the [GitHub platform](#client-id-and-secret). 1. Leave **Public Client** unchecked. GitHub OAuth Apps have a secret. 1. (Optional) Add the scopes, separated by spaces, for example `repo read:org`. 1. Click **Connect**. 1. On GitHub, review and approve access. Each user connects with their own GitHub account. The [organization approval](#approve-the-app-for-your-organization) applies to your own app too. ### Option 3: Bearer token (personal access token) 1. [**New UI**](/docs/get-started/sumo-logic-ui). To access the integrations, in the main Sumo Logic menu select **App Catalog > Integrations > Outbound Integrations**. 1. Click the **GitHub** card. 1. Click **Connect** to open the **Connect GitHub MCP** configuration panel. 1. Enter the connection name. 1. Under **Authentication configuration**, select **Bearer Token**. 1. Enter the token collected from the [GitHub platform](#personal-access-token). 1. Click **Connect**. Saving checks the connection. #### Limitations - Everyone who is allowed to use the connection acts as the owner of the token on GitHub. Use an account with the smallest access that works. - Tokens expire. Replace the token before then by adding a new connection with the new token, and then deleting the old one. ## Troubleshoot | Symptom | What to check | |:--|:--| | GitHub shows a redirect URI error. | The callback URL on the OAuth App needs to match the URL for your deployment exactly, including the path. | | The user can connect but the repositories of the organization are missing. | An organization owner has not approved the app yet. | | The user is asked to connect again after some hours. | Check that **Expire user access tokens** is on, so a refresh token is issued. | | Tool calls fail with a permission error. | The token or the approved scopes do not cover that action. Add the permission or scope and connect again. |