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
- Navigate to Resources and click Add Resource
- Select GitHub from the catalog
- 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:
- Profile picture (top-right) → Your organizations → select the org → Settings
- Left sidebar, under Third-party Access → OAuth app policy
- Next to SecureAuth AI Gateway → Review → Grant 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/newConfigure:
- 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
| Tool | Description |
|---|---|
get_file_contents | Get the contents of a file or directory |
create_or_update_file | Create or update a single file |
delete_file | Delete a file from a repository |
push_files | Push multiple files in a single commit |
get_repository_tree | Get the file and directory tree at a ref or SHA |
search_code | Search code across GitHub repositories |
search_repositories | Find repositories by name, description, or topics |
create_repository | Create a new repository |
fork_repository | Fork a repository to your account or an org |
create_branch | Create a new branch |
list_branches | List branches |
list_commits | List commits of a branch |
get_commit | Get details for a commit |
get_tag | Get details about a git tag |
list_tags | List git tags |
get_latest_release | Get the latest release |
get_release_by_tag | Get a release by tag name |
list_releases | List releases |
list_repository_collaborators | List collaborators of a repository |
list_starred_repositories | List starred repositories |
star_repository | Star a repository |
unstar_repository | Unstar a repository |
Issues
| Tool | Description |
|---|---|
list_issues | List issues in a repository |
search_issues | Search issues across repositories |
issue_read | Get an issue, its comments, sub-issues, or labels |
issue_write | Create an issue (method=create) or update one (method=update) |
sub_issue_write | Add, remove, or reprioritize a sub-issue |
add_issue_comment | Add a comment to an issue or pull request |
list_issue_types | List supported issue types for an organization |
triage_issue | Record a triage rationale and apply labels, type, and fields |
semantic_issues_search | Find issues by natural-language query |
semantic_issue_similarity_search | Find issues semantically similar to a given issue |
Pull requests and reviews
| Tool | Description |
|---|---|
list_pull_requests | List pull requests |
search_pull_requests | Search pull requests across repositories |
create_pull_request | Create a new pull request |
update_pull_request | Update an existing pull request |
update_pull_request_branch | Update a PR branch with changes from its base |
merge_pull_request | Merge a pull request |
pull_request_read | Get a PR's details, diff, status, files, reviews, or checks |
pull_request_review_write | Create, submit, or delete reviews and resolve threads |
add_comment_to_pending_review | Add a comment to your pending review |
add_reply_to_pull_request_comment | Reply to an existing pull request comment |
Labels, gists, and discussions
| Tool | Description |
|---|---|
get_label | Get a label from a repository |
list_label | List labels from a repository |
label_write | Create, update, or delete repository labels |
list_gists | List gists for a user |
get_gist | Get the content of a gist |
create_gist | Create a new gist |
update_gist | Update an existing gist |
list_discussions | List discussions for a repository or organization |
get_discussion | Get a discussion by ID |
get_discussion_comments | Get comments from a discussion |
discussion_comment_write | Add, reply, update, delete, or mark answer comments |
list_discussion_categories | List discussion categories |
Actions and Projects
| Tool | Description |
|---|---|
actions_list | List workflows, workflow runs, jobs, or run artifacts |
actions_get | Get a workflow, run, job, artifact, usage, or logs URL |
actions_run_trigger | Run, re-run, cancel workflow runs, or delete run logs |
get_job_logs | Get logs for workflow jobs |
projects_list | List projects, project fields, and project items |
projects_get | Get details about a project, field, or item |
projects_write | Add, update, or delete project items, or create status updates |
Security
| Tool | Description |
|---|---|
run_secret_scanning | Scan supplied content or diffs for secrets |
get_code_scanning_alert | Get a code scanning alert |
list_code_scanning_alerts | List code scanning alerts |
get_secret_scanning_alert | Get a secret scanning alert |
list_secret_scanning_alerts | List secret scanning alerts |
get_dependabot_alert | Get a Dependabot alert |
list_dependabot_alerts | List Dependabot alerts |
check_dependency_vulnerabilities | Check dependencies against the advisory database |
get_global_security_advisory | Get a global security advisory |
list_global_security_advisories | List global security advisories |
list_repository_security_advisories | List a repository's security advisories |
list_org_repository_security_advisories | List an organization's repository security advisories |
Copilot, users, and search
| Tool | Description |
|---|---|
get_me | Get details of the authenticated GitHub user |
search_users | Find GitHub users |
search_orgs | Find GitHub organizations |
get_teams | Get the teams the user is a member of |
get_team_members | Get member usernames of a team |
request_copilot_review | Request a Copilot code review for a pull request |
assign_copilot_to_issue | Assign Copilot to an issue; it opens a PR with changes |
create_pull_request_with_copilot | Delegate a task to the Copilot coding agent |
get_copilot_job_status | Get the status of a Copilot coding agent job |
list_copilot_spaces | List Copilot Spaces accessible to the user |
get_copilot_space | Get the contents of a Copilot Space |
web_search | Perform an AI-powered web search with citations |
github_support_docs_search | Search GitHub product and support documentation |
Required scopes
repo— full access to repositories including code, issues, and pull requestsread:org— read organization membership and teamsread:user— read user profile informationgist— list, create, and update gistsproject— 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_fileabove any allow rules.delete_filematters — 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 formerge_pull_requestabove that allow rule. Below it the allow matches first and merges go through.
Next steps
- Create a policy — start from the read-only pattern in Policy examples above.
- Credential modes — compare SecureAuth's app against bringing your own before you install.
- Block an agent from deleting GitHub branches — a worked policy for this exact resource.