Skip to main content
Connector guides

Connect GitHub Copilot

GitHub Copilot lets your AI assistant read how Copilot is set up and used in one GitHub organization or one GitHub Enterprise account: who holds a seat, what the Copilot policies say, how much Copilot…

Written By Christopher Scaminaci

Last updated 21 days ago

GitHub Copilot lets your AI assistant read how Copilot is set up and used in one GitHub organization or one GitHub Enterprise account: who holds a seat, what the Copilot policies say, how much Copilot is used, and what the audit log recorded. StackJack's tools only read. AI Governance can make changes in this account when you turn that on for the connection. You turn it on under AI Governance, then AI tools, then Vendor changes, with Turn changes on. Making changes in your AI vendor accounts lists what can be changed and the permission each key needs. StackJack connects to the GitHub API at one fixed address, so there is no address to enter.

Connecting GitHub Copilot to StackJack gives your AI assistant a family of github_copilot_ MCP tools. MCP (Model Context Protocol) tools are the standardized commands an AI assistant can call through StackJack. With them, your AI can:

  • Review seats and billing - the Copilot seats of an organization, one member's seat, and the organization's Copilot billing settings
  • Check policies - the content exclusion setting, the coding agent permissions and the repositories they cover, and the cloud agent configuration of a repository
  • Read usage (on Pro plans) - the Copilot usage metrics reports for an organization or an enterprise: one day or the latest 28 days, and by repository, by user team and by user
  • Read the audit log (on Pro plans) - the organization or enterprise audit log

Every tool only reads. Nothing in your GitHub organization or enterprise is created, changed or deleted by these tools, so no tool is marked destructive. No tool returns prompt or answer text. A usage metrics tool answers with GitHub's own report pointer: signed download links and the days covered.

One connection reads one GitHub account

Choose Organization for a GitHub organization, or Enterprise for a GitHub Enterprise account. An organization with several GitHub organizations adds one connection for each.

  • Organization: enter the organization's name, as it appears in github.com/your-organization.
  • Enterprise: enter the enterprise's name in lower case, as it appears in github.com/enterprises/your-enterprise.

Create a token

For an organization

  1. Sign in to GitHub as an organization owner, or as a user with the View Organization Copilot Metrics permission.
  2. Open Settings, then Developer settings, then Personal access tokens.
  3. Create a fine-grained token for the organization with read access to organization Copilot metrics. Or create a classic token with the read:org and read:audit_log scopes.
  4. Copy the token. GitHub shows it once.

The seat and policy tools need an organization owner, and read:org or admin:org on a classic token. The audit log needs read:audit_log.

For an enterprise

  1. Sign in to GitHub as an enterprise owner.
  2. Create a classic personal access token with the read:enterprise and read:audit_log scopes, at github.com/settings/tokens.
  3. Copy the token. GitHub shows it once.

The usage metrics reports and the audit log need no more than that. The Copilot session records (read by AI Governance only, see below) are available only to owners of an Enterprise Managed Users enterprise.

Connect it in StackJack

  1. Open Connectors, then GitHub Copilot.
  2. Choose Organization or Enterprise.
  3. Paste the token and enter the organization or enterprise name.
  4. Click Test connection.

There is nothing else to enter. When you edit the connection later, the token box starts empty: leaving it empty keeps the stored token.

What is worth knowing before you start

Turn Copilot usage metrics on

Copilot usage metrics must be enabled for the account. The enterprise reports also need the Copilot usage metrics policy set to Enabled everywhere in the enterprise. Until it is, the metrics reports are not available.

What Test connection checks

For an organization, StackJack tries the Copilot billing settings and then the latest 28-day metrics report. For an enterprise it tries the metrics report and then the audit log. If the token has none of the permissions StackJack reads, the test says so and does not count it against the connection. A token that GitHub rejects does count against the connection: after three failed checks in a row it is switched off until you fix the token.

AI Governance uses the same connection

AI Governance reads GitHub through this same connection, so there is no second token to paste. In AI Governance, add a source of the kind you want and choose this connection:

  • GitHub Copilot usage metrics and the GitHub audit log work with an organization token or an enterprise token
  • GitHub Copilot sessions need an enterprise token from an Enterprise Managed Users enterprise owner

The session records reach StackJack only through AI Governance, behind its notice gate and the capture level you choose. They never come back through a github_copilot_ tool.

Included with an AI Governance plan

If your organization has a paid AI Governance plan (Pro, Business or Enterprise) or is in the AI Governance beta, GitHub Copilot is included at no extra charge. It runs at the Business level: the same github_copilot_ tools, with the Business monthly call quota, and no GitHub Copilot subscription to buy. On the Connectors page the connector shows Included with AI Governance in place of the upgrade buttons, and the Billing page offers no upgrade for it.

Your connection and your key stay as they are. The plan decides only the tool level and the call quota. Nothing is written to your GitHub Copilot subscription, so when the AI Governance plan ends the connector returns to whatever your own subscription says, with nothing to clean up.

If you already pay for GitHub Copilot when a paid plan starts, StackJack emails the account owner once. Under AI Governance, then Billing, Admin connectors included lists each connector you still pay for, with Stop paying for it. That button opens the normal removal on the Billing page, which shows what changes before anything is removed, including any change to the discount on your other connectors. StackJack never removes a subscription for you.

Tokens expire

A GitHub token can expire or be revoked. Test connection then reports the token as rejected: create a new token and paste it in. GitHub also limits how fast a token can call its API, so StackJack paces its calls and backs off when GitHub asks it to.

Several GitHub organizations

Each tool takes the organization or enterprise as an argument. A call for an account the token does not cover is answered by GitHub, not by StackJack, so a token made for one organization cannot read another. Add one connection per GitHub organization.

Plans and limits

Reads of seats, billing settings and policies are available on the Free tier. Reads of the usage metrics reports and the audit logs are Pro. Business reaches the same tools as Pro and differs by monthly call quota. The Pro tools still need the token to hold the matching GitHub permission.

See the generated GitHub Copilot tool reference for the current inventory, plan assignment, input schemas, and destructive-action labels.

GitHub Copilot tools

github_copilot_ · 21 tools · Free 7 · Pro 14

Seats

ToolWhat it does
github_copilot_get_member_seat
Free · Read-only
Gets the Copilot seat of one member of a GitHub organization: when it was created, when the member last used Copilot (last_activity_at) and in which editor (last_activity_editor), whether it is pending cancellation, and the team through which it was assigned.
github_copilot_get_org_billing
Free · Read-only
Gets the Copilot subscription of one GitHub organization: the plan type (business or enterprise), the seat totals (total, added this cycle, pending cancellation, pending invitation, active this cycle, inactive this cycle), the seat management setting and the policies for public code suggestions, the IDE chat, the platform chat and the CLI.
github_copilot_list_org_seats
Free · Read-only
Lists the Copilot seat assignments of one GitHub organization, a page at a time: for each seat the assignee (login and id), when it was created, when the assignee last used Copilot (last_activity_at) and in which editor (last_activity_editor), and the team through which it was assigned.

Policies

ToolWhat it does
github_copilot_get_org_coding_agent_permissions
Free · Read-only
Gets where the Copilot coding agent is enabled in one GitHub organization: for all repositories, for selected ones or for none.
github_copilot_get_org_content_exclusion
Free · Read-only
Gets the content exclusion rules of one GitHub organization: the repositories and the paths in them that Copilot is told to ignore.
github_copilot_get_repo_cloud_agent_configuration
Free · Read-only
Gets the Copilot cloud agent configuration of one repository.
github_copilot_list_org_coding_agent_repositories
Free · Read-only
Lists the repositories of one GitHub organization for which the Copilot coding agent is enabled, a page at a time.

Metrics

ToolWhat it does
github_copilot_get_enterprise_metrics_1_day
Pro · Read-only
Gets the Copilot usage metrics report of one GitHub enterprise for one UTC day: the enterprise's totals.
github_copilot_get_enterprise_metrics_28_day
Pro · Read-only
Gets the latest Copilot usage metrics report of one GitHub enterprise for the 28 days GitHub most recently closed: the enterprise's totals.
github_copilot_get_enterprise_repo_metrics_1_day
Pro · Read-only
Gets the Copilot usage metrics report of one GitHub enterprise for one UTC day, per repository.
github_copilot_get_enterprise_user_metrics_1_day
Pro · Read-only
Gets the Copilot usage metrics report of one GitHub enterprise for one UTC day, per user (GitHub logins appear in it).
github_copilot_get_enterprise_user_metrics_28_day
Pro · Read-only
Gets the latest Copilot usage metrics report of one GitHub enterprise for the 28 days GitHub most recently closed, per user (GitHub logins appear in it).
github_copilot_get_enterprise_user_team_metrics_1_day
Pro · Read-only
Gets the Copilot usage metrics report of one GitHub enterprise for one UTC day, per user and team (GitHub logins appear in it).
github_copilot_get_org_metrics_1_day
Pro · Read-only
Gets the Copilot usage metrics report of one GitHub organization for one UTC day: the organization's totals.
github_copilot_get_org_metrics_28_day
Pro · Read-only
Gets the latest Copilot usage metrics report of one GitHub organization for the 28 days GitHub most recently closed: the organization's totals.
github_copilot_get_org_repo_metrics_1_day
Pro · Read-only
Gets the Copilot usage metrics report of one GitHub organization for one UTC day, per repository.
github_copilot_get_org_user_metrics_1_day
Pro · Read-only
Gets the Copilot usage metrics report of one GitHub organization for one UTC day, per user (GitHub logins appear in it).
github_copilot_get_org_user_metrics_28_day
Pro · Read-only
Gets the latest Copilot usage metrics report of one GitHub organization for the 28 days GitHub most recently closed, per user (GitHub logins appear in it).
github_copilot_get_org_user_team_metrics_1_day
Pro · Read-only
Gets the Copilot usage metrics report of one GitHub organization for one UTC day, per user and team (GitHub logins appear in it).

Audit logs

ToolWhat it does
github_copilot_list_enterprise_audit_log
Pro · Read-only
Lists the audit log of one GitHub enterprise, a page at a time.
github_copilot_list_org_audit_log
Pro · Read-only
Lists the audit log of one GitHub organization, a page at a time.