Secure GitHub access for AI agents

Code hosting, pull requests, and project management

Through GitHub, agents can search code, open pull requests, triage issues, and manage branches across your repositories — every call runs through your policies and is logged for audit.

Server URL: https://api.githubcopilot.com/mcp/x/all

Setup

  1. Navigate to Resources and click Add Resource
  2. Select GitHub from the catalog
  3. On Choose how to install GitHub, click a credential mode card (see below)

Clicking Use SecureAuth's app installs the resource immediately — there is no separate confirmation step. Bring your own app instead opens a form for your own Client ID and Client Secret, and Add at the bottom of that form completes the install. Either way GitHub then shows an Admin setup required dialog with a Setup guide button pointing back at the matching section below.

The resource is added with all tools and scopes pre-configured. Each user connects their own GitHub account via OAuth when they first use a GitHub tool. Navigate to Connections to manage linked accounts.

Credential modes

GitHub supports two modes:

  • Use SecureAuth's app — install instantly with SecureAuth's pre-registered GitHub OAuth app. No setup on your side. Recommended for most installs.
  • Bring your own app — use a GitHub OAuth app owned by your organization. Recommended when you need GitHub-side audit attribution, dedicated rate limits, or your own branding on the consent screen.

See Credential modes for the full comparison.

Use SecureAuth's app

No setup on your side — unless your GitHub org restricts third-party OAuth apps. With restrictions on, members can't grant a third-party app access to org data on their own: until an org owner approves SecureAuth AI Gateway (GitHub's name for the pre-registered app), the app can read only the org's public resources, not private org repos.

When a member first connects, GitHub prompts them to request approval (Request access → Request approval from owners), which surfaces the app for an org owner to approve once:

  1. Profile picture (top-right) → Your organizations → select the org → Settings
  2. Left sidebar, under Third-party AccessOAuth app policy
  3. Next to SecureAuth AI GatewayReviewGrant access

Members can then connect and reach private org repos.

Bring your own app

A GitHub org admin registers a GitHub OAuth App pointed at the gateway, then returns to SecureAuth with the Client ID and Client Secret.

In the Agent Authority console, go to Resources → Add Resource → GitHub → Bring your own app and copy the redirect URI shown on the page.

In GitHub, create a new OAuth App at your org's developer settings:

https://github.com/organizations/<your-org>/settings/applications/new

Configure:

  • Application name — your company's name (for example, <your-company> Agent Authority)
  • Homepage URL — your company's homepage
  • Authorization callback URL — the redirect URI you just copied from the Agent Authority console

After GitHub creates the app, copy the Client ID and generate a new Client Secret from the app's settings page. Paste both back into the GitHub resource page in the Agent Authority console, then click Add.

The scopes the gateway requests at runtime (repo, read:org, read:user, gist, project) are listed under Required scopes below.

Available tools

GitHub ships 86 tools. Tool names are matched exactly by policy rules unless you use a wildcard, so copy them from here verbatim — and check the Available Tools card on the resource's Overview tab in the Agent Authority console for the authoritative list of what your install actually exposes, since upstream catalogs change faster than these docs.

Repositories and files

ToolDescription
get_file_contentsGet the contents of a file or directory
create_or_update_fileCreate or update a single file
delete_fileDelete a file from a repository
push_filesPush multiple files in a single commit
get_repository_treeGet the file and directory tree at a ref or SHA
search_codeSearch code across GitHub repositories
search_repositoriesFind repositories by name, description, or topics
create_repositoryCreate a new repository
fork_repositoryFork a repository to your account or an org
create_branchCreate a new branch
list_branchesList branches
list_commitsList commits of a branch
get_commitGet details for a commit
get_tagGet details about a git tag
list_tagsList git tags
get_latest_releaseGet the latest release
get_release_by_tagGet a release by tag name
list_releasesList releases
list_repository_collaboratorsList collaborators of a repository
list_starred_repositoriesList starred repositories
star_repositoryStar a repository
unstar_repositoryUnstar a repository

Issues

ToolDescription
list_issuesList issues in a repository
search_issuesSearch issues across repositories
issue_readGet an issue, its comments, sub-issues, or labels
issue_writeCreate an issue (method=create) or update one (method=update)
sub_issue_writeAdd, remove, or reprioritize a sub-issue
add_issue_commentAdd a comment to an issue or pull request
list_issue_typesList supported issue types for an organization
triage_issueRecord a triage rationale and apply labels, type, and fields
semantic_issues_searchFind issues by natural-language query
semantic_issue_similarity_searchFind issues semantically similar to a given issue

Pull requests and reviews

ToolDescription
list_pull_requestsList pull requests
search_pull_requestsSearch pull requests across repositories
create_pull_requestCreate a new pull request
update_pull_requestUpdate an existing pull request
update_pull_request_branchUpdate a PR branch with changes from its base
merge_pull_requestMerge a pull request
pull_request_readGet a PR's details, diff, status, files, reviews, or checks
pull_request_review_writeCreate, submit, or delete reviews and resolve threads
add_comment_to_pending_reviewAdd a comment to your pending review
add_reply_to_pull_request_commentReply to an existing pull request comment

Labels, gists, and discussions

ToolDescription
get_labelGet a label from a repository
list_labelList labels from a repository
label_writeCreate, update, or delete repository labels
list_gistsList gists for a user
get_gistGet the content of a gist
create_gistCreate a new gist
update_gistUpdate an existing gist
list_discussionsList discussions for a repository or organization
get_discussionGet a discussion by ID
get_discussion_commentsGet comments from a discussion
discussion_comment_writeAdd, reply, update, delete, or mark answer comments
list_discussion_categoriesList discussion categories

Actions and Projects

ToolDescription
actions_listList workflows, workflow runs, jobs, or run artifacts
actions_getGet a workflow, run, job, artifact, usage, or logs URL
actions_run_triggerRun, re-run, cancel workflow runs, or delete run logs
get_job_logsGet logs for workflow jobs
projects_listList projects, project fields, and project items
projects_getGet details about a project, field, or item
projects_writeAdd, update, or delete project items, or create status updates

Security

ToolDescription
run_secret_scanningScan supplied content or diffs for secrets
get_code_scanning_alertGet a code scanning alert
list_code_scanning_alertsList code scanning alerts
get_secret_scanning_alertGet a secret scanning alert
list_secret_scanning_alertsList secret scanning alerts
get_dependabot_alertGet a Dependabot alert
list_dependabot_alertsList Dependabot alerts
check_dependency_vulnerabilitiesCheck dependencies against the advisory database
get_global_security_advisoryGet a global security advisory
list_global_security_advisoriesList global security advisories
list_repository_security_advisoriesList a repository's security advisories
list_org_repository_security_advisoriesList an organization's repository security advisories
ToolDescription
get_meGet details of the authenticated GitHub user
search_usersFind GitHub users
search_orgsFind GitHub organizations
get_teamsGet the teams the user is a member of
get_team_membersGet member usernames of a team
request_copilot_reviewRequest a Copilot code review for a pull request
assign_copilot_to_issueAssign Copilot to an issue; it opens a PR with changes
create_pull_request_with_copilotDelegate a task to the Copilot coding agent
get_copilot_job_statusGet the status of a Copilot coding agent job
list_copilot_spacesList Copilot Spaces accessible to the user
get_copilot_spaceGet the contents of a Copilot Space
web_searchPerform an AI-powered web search with citations
github_support_docs_searchSearch GitHub product and support documentation

Required scopes

  • repo — full access to repositories including code, issues, and pull requests
  • read:org — read organization membership and teams
  • read:user — read user profile information
  • gist — list, create, and update gists
  • project — read and write GitHub Projects boards

Policy examples

Rules are evaluated top to bottom and the first match wins; a call that matches no rule is denied. New rules are created at the top of the list, so create the rule you want evaluated last first.

  • Read-only access: allow get_*, list_*, search_*, pull_request_read, then disable or delete your organization's seeded Allow all rule. On its own the allow rule restricts nothing — writes keep matching Allow all and succeed. Removing Allow all is org-wide, so add the allow rules for everything your agents still need before you remove it, or place an explicit deny rule for * below your allows instead.
  • Block repository creation and file writes: deny create_repository, create_or_update_file, push_files, delete_file above any allow rules. delete_file matters — it commits a deletion, so leaving it out still lets an agent rewrite repository contents.
  • Allow the PR workflow but block merges: allow *pull_request*, and add a deny for merge_pull_request above that allow rule. Below it the allow matches first and merges go through.

Next steps

On this page