Grafana Cloud

Add a GitHub MCP server

Connect GitHub to Assistant to search repositories, issues, and pull requests during troubleshooting conversations. This helps you connect observability data from metrics, logs, traces, and profiles with related code changes, known issues, and ongoing work.

What you’ll achieve

Use this guide to configure GitHub integration with Assistant for investigating incidents and tracking related work.

  • Configure GitHub integration using preset tool collections for issues, repositories, or pull requests.
  • Authenticate using OAuth for personal use or custom headers for organization-wide access.
  • Filter tools to optimize performance and improve response accuracy.

Before you begin

Ensure you have the necessary requirements before configuring GitHub integration.

  • GitHub account: You need a GitHub account.
  • Organization installation: To access private repositories in an organization, install the GitHub App.
  • Permissions: Refer to Manage Assistant access with RBAC - Understand available roles for the roles and permissions required to add personal or tenant MCP servers.
  • Feature access: Your administrator must enable the integrations feature in the Assistant app configuration.

Understand GitHub presets

GitHub presets provide pre-configured tool sets optimized for specific workflows to reduce latency and improve accuracy.

Available presets:

  • Issues: Search issues, fetch issue details, list repository issues, and get issue comments. Use this preset when you investigate incidents and need to find related bug reports or feature requests.
  • Repositories: Search repositories, get repository details, list repository files, and read file contents. Use this preset when you need to understand code structure, find configuration files, or review implementation details.
  • Pull requests: Search pull requests, fetch PR details, list repository PRs, and get PR commits. Use this preset when you investigate recent changes, review deployments, or identify code modifications related to incidents.

Choose the preset that matches your primary workflow. You can add multiple GitHub MCP servers with different presets if you need tools from multiple categories.

Configure the server

Add a GitHub MCP server using one of the available presets to automatically configure the right tools.

To configure a GitHub MCP server:

  1. Open the Assistant Settings and click Integrations.
  2. Under MCP Servers, locate the Quick Setup options with the GitHub preset cards:
    • GitHub Issues: For searching and fetching issues.
    • GitHub Repositories: For searching repositories and fetching repository data.
    • GitHub Pull Requests: For searching and fetching pull requests.
  3. Click Add on the preset that matches your workflow.
  4. Enter a Name to identify the server.
  5. Choose a Scope:
    • Personal (user): Visible only to you; uses OAuth for authentication.
    • Tenant (everybody): Visible to your organization; requires a custom auth header.
  6. Confirm the MCP Server URL is pre-filled with the correct GitHub MCP endpoint.
  7. Click Save to validate connectivity and discover available tools.

Authenticate with GitHub

Connect to GitHub using OAuth for personal use or a custom auth header for organization-wide access.

For personal servers:

  1. Click Save after configuring the server.
  2. A popup window opens with the GitHub OAuth consent flow.
  3. Review the requested permissions.
  4. Click Authorize to grant Assistant access to your GitHub account.
  5. The popup closes and Assistant validates the connection.

For tenant-level servers:

  1. Create a GitHub Personal Access Token or use a GitHub App installation token.
  2. In the server configuration, select Custom auth header.
  3. Enter Bearer YOUR_GITHUB_TOKEN as the header value.
  4. Click Save to validate the connection.

Warning

Tenant-level MCP servers must use a custom auth header, not OAuth. Provide a service token through a header to make the integration available to all users.

Manage MCP server

After configuration, you can filter tools and manage the server lifecycle. For information on filtering tools to improve performance and confirming tool calls during conversations, refer to Improve accuracy with tool filtering and Confirm tool calls manually. To learn how to enable, disable, or remove servers, refer to Manage server lifecycle.

Next steps