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
- Sign in to GitHub as an organization owner, or as a user with the View Organization Copilot Metrics permission.
- Open Settings, then Developer settings, then Personal access tokens.
- Create a fine-grained token for the organization with read access to organization Copilot metrics. Or create a classic
token with the
read:organdread:audit_logscopes. - 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
- Sign in to GitHub as an enterprise owner.
- Create a classic personal access token with the
read:enterpriseandread:audit_logscopes, at github.com/settings/tokens. - 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
- Open Connectors, then GitHub Copilot.
- Choose Organization or Enterprise.
- Paste the token and enter the organization or enterprise name.
- 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
Policies
Metrics
Audit logs
Was this helpful?
More in Connector guides
Connect 3CXConnect AbleSignConnect Acronis Cyber Protect CloudConnect Action1Still need help? Ask the team