GitHub
Manage GitHub repositories, branches, file contents, issues, pull requests, reviews and releases, and search code, issues and users. Connect with GitHub OAuth.
- rest
https://api.superagnt.com/v1/connections/githubplus the vendor's own path, with your superagnt_ API key asAuthorization: Bearer.- mcp
- Tools named
connection_github_*onhttps://mcp.superagnt.com/mcp, served once the account is connected. - billing
- GitHub bills your own account. Calls cost no superagnt_ data credits.
- rate limit
- 15 requests a second, 900 a minute: the vendor's ceiling as the registry records it, for sizing bursts. Your plan's own limit is on Connections.
- vendor docs
- https://docs.github.com/en/rest
The GitHub connection lets an agent work in GitHub as the user who connected it. It lists and manages repositories, branches, commits and file contents, creates and triages issues and comments, opens, reviews and merges pull requests, publishes and edits releases, searches repositories, code, issues, users and commits, and reads users, organizations and gists.
paths, pages and file contents
Paths take {owner} and {repo}, where the owner is a user or organization login. Lists page with per_page (up to 100) and page. File contents are base64 both ways: decode content on a read, and encode it on a write.
01
Setup
- Connect GitHub. In the superagnt app open Integrations, pick GitHub and click Connect with GitHub.
- Approve the scopes. GitHub asks for
repo,read:org,user,gist,workflowanddelete_repo.
The connection acts as the GitHub user who approved it, so it reaches what that user can reach within those scopes. superagnt_ attaches the access token to every call.
02
Things to know
- Search returns
{ total_count, items }, while most lists return a bare array. Code search must be scoped to a user, an organization or a repository with a qualifier inq, such asrepo:owner/name. - Writing a file is a commit. To update or delete a file, pass its current blob
sha, read from the same path and branch withconnection_github_files_read. Leaveshaout only to create a file. - Issue lists include pull requests, marked by a
pull_requestfield. A pull request's conversation comments are issue comments (its number works asissue_number), and its inline review comments come fromconnection_github_pull_request_reviews_read. - Deleting a repository, a branch or tag ref, a release, a gist or a comment is permanent. Deleting a release keeps its tag.
- By default reads run without asking and other writes ask. Deleting a repository, a file, a ref, a release, a gist or a comment always asks a person first (Permissions).
03
Examples
Create an issue
curl -X POST "https://api.superagnt.com/v1/connections/github/repos/OWNER/REPO/issues" \
-H "Authorization: Bearer $AGNTDATA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Investigate flaky test","body":"Fails on about one CI run in ten.","labels":["bug"]}'Open a pull request
curl -X POST "https://api.superagnt.com/v1/connections/github/repos/OWNER/REPO/pulls" \
-H "Authorization: Bearer $AGNTDATA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Fix retry backoff","head":"fix/backoff","base":"main","body":"Caps the backoff at 30s."}'Search code in one repository
curl "https://api.superagnt.com/v1/connections/github/search/code?q=addClass+in:file+repo:OWNER/REPO" \
-H "Authorization: Bearer $AGNTDATA_API_KEY"Commit a new file
curl -X PUT "https://api.superagnt.com/v1/connections/github/repos/OWNER/REPO/contents/docs/NOTES.md" \
-H "Authorization: Bearer $AGNTDATA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message":"Add notes","content":"SGVsbG8=","branch":"main"}'SGVsbG8= is Hello in base64. To update the file instead, add its current sha to the body.
29 tools, one per resource and risk
MCP servers and agents on the grouped surface list GitHub as these tools. Each takes an action, and the ones that work across record types an object. Every operation also keeps its own per-operation name, in the next table, which works on every server. How grouping works: Grouped tools.
| Tool | Risk | Actions |
|---|---|---|
connection_github_repositories_readRead GitHub repositories List repositories (yours, an organization's or a user's), get one repository, or list its contributors, collaborators, languages and topics. | read | listlist_for_orglist_for_usergetlist_contributorslist_collaboratorslist_languageslist_topics |
connection_github_repositories_writeCreate and update GitHub repositories Create a repository for the authenticated user or in an organization, or change a repository's settings (name, description, visibility, default branch, archived). | write | createcreate_in_orgupdate |
connection_github_repositories_deleteDelete a GitHub repository Permanently delete a repository. | destructive | delete |
connection_github_files_readRead GitHub files Get a file (base64 content) or a directory listing at a path, on the default branch or a ref. To search code across repositories, use connection_github_search. | read | get |
connection_github_files_writeCommit a GitHub file Create or update a file as a commit (base64 content; pass the current sha to update). | write | put |
connection_github_files_deleteDelete a GitHub file Delete a file as a commit (pass its current sha). | destructive | delete |
connection_github_branches_readRead GitHub branches and refs List or get a repository's branches, or read any git ref (a branch or tag) and the sha it points at. | read | listgetget_ref |
connection_github_branches_writeCreate a GitHub branch or tag ref Create a branch or tag ref (refs/heads/... or refs/tags/...) pointing at a commit sha. | write | create_ref |
connection_github_branches_deleteDelete a GitHub branch or tag ref Permanently delete a branch or tag ref. | destructive | delete_ref |
connection_github_commits_readRead GitHub commits List commits (by branch, path, author or date), get one with its diff stats, or compare two refs. | read | listgetcompare |
connection_github_tags_readList GitHub tags List a repository's tags. | read | list |
connection_github_issues_readRead GitHub issues and comments List or get a repository's issues (pull requests are listed as issues too), read the comments on an issue or pull request, and list the repository's labels and milestones. | read | listgetlist_commentslist_labelslist_milestones |
connection_github_issues_writeWrite GitHub issues and comments Create, update, close or lock an issue, and comment on an issue or pull request (a pull request's number works as issue_number) or edit a comment. | write | createupdatecommentupdate_commentlock |
connection_github_issues_deleteDelete GitHub issue comments or unlock an issue Permanently delete a comment on an issue or pull request, or unlock a locked conversation. | destructive | delete_commentunlock |
connection_github_pull_requests_readRead GitHub pull requests List or get pull requests, and read a pull request's changed files and commits. Reviews: connection_github_pull_request_reviews_read; conversation comments are issue comments (connection_github_issues_read). | read | listgetlist_fileslist_commits |
connection_github_pull_requests_writeOpen and merge GitHub pull requests Open, update or close a pull request, merge it, or bring its branch up to date with the base. Post a plain conversation comment with connection_github_issues_write. | write | createupdatemergeupdate_branch |
connection_github_pull_request_reviews_readRead GitHub pull request reviews List a pull request's reviews and its inline review comments. | read | listlist_comments |
connection_github_pull_request_reviews_writeReview a GitHub pull request Submit a review on a pull request: approve, request changes or comment, with optional inline comments. | write | create |
connection_github_releases_readRead GitHub releases List a repository's releases, or get one by id, by tag name, or the latest published release. | read | listgetget_latestget_by_tag |
connection_github_releases_writeCreate and update GitHub releases Create a release for a tag (optionally a draft or prerelease, with generated notes) or update one. | write | createupdate |
connection_github_releases_deleteDelete a GitHub release Permanently delete a release; its tag stays. | destructive | delete |
connection_github_searchSearch GitHub Search repositories, code, issues and pull requests, users, or commits with GitHub search syntax in q (qualifiers such as repo:owner/name, language:, is:open). Code search must be scoped to a user, organization or repository. | read | repositoriescodeissuesuserscommits |
connection_github_users_readRead GitHub users Get the authenticated user or any user's profile, and list followers and followed users. | read | megetlist_followerslist_followinglist_my_followerslist_my_following |
connection_github_users_writeFollow a GitHub user Follow a user as the authenticated user (needs the user:follow scope). | write | follow |
connection_github_users_deleteUnfollow a GitHub user Unfollow a user as the authenticated user. | destructive | unfollow |
connection_github_orgs_readRead GitHub organizations List your organizations, or get an organization and its members. | read | list_minegetlist_members |
connection_github_gists_readRead GitHub gists List your gists or a user's public gists, or get one gist with its files. | read | listlist_for_userget |
connection_github_gists_writeCreate and update GitHub gists Create a gist from files (public false makes it secret) or update a gist's description and files. | write | createupdate |
connection_github_gists_deleteDelete a GitHub gist Permanently delete a gist. | destructive | delete |
All 76 operations
Each operation is a REST path under https://api.superagnt.com/v1/connections/github and an MCP tool. The per-operation tool name is the one permissions, approvals and usage records use.
| Operation | MCP tool |
|---|---|
GET /user/reposList repositories for the authenticated user | connection_github_list_my_reposgrouped: connection_github_repositories_read, action list |
POST /user/reposCreate a repository for the authenticated user | connection_github_create_repo_for_usergrouped: connection_github_repositories_write, action create |
GET /orgs/{org}/reposList organization repositories | connection_github_list_org_reposgrouped: connection_github_repositories_read, action list_for_org |
POST /orgs/{org}/reposCreate an organization repository | connection_github_create_org_repogrouped: connection_github_repositories_write, action create_in_org |
GET /users/{username}/reposList repositories for a user | connection_github_list_user_reposgrouped: connection_github_repositories_read, action list_for_user |
GET /repos/{owner}/{repo}Get a repository | connection_github_get_repogrouped: connection_github_repositories_read, action get |
PATCH /repos/{owner}/{repo}Update a repository | connection_github_update_repogrouped: connection_github_repositories_write, action update |
DELETE /repos/{owner}/{repo}Delete a repository | connection_github_delete_repogrouped: connection_github_repositories_delete, action delete |
GET /repos/{owner}/{repo}/branchesList branches | connection_github_list_branchesgrouped: connection_github_branches_read, action list |
GET /repos/{owner}/{repo}/branches/{branch}Get a branch | connection_github_get_branchgrouped: connection_github_branches_read, action get |
GET /repos/{owner}/{repo}/commitsList commits | connection_github_list_commitsgrouped: connection_github_commits_read, action list |
GET /repos/{owner}/{repo}/commits/{ref}Get a commit | connection_github_get_commitgrouped: connection_github_commits_read, action get |
GET /repos/{owner}/{repo}/compare/{basehead}Compare two commits | connection_github_compare_commitsgrouped: connection_github_commits_read, action compare |
GET /repos/{owner}/{repo}/contributorsList contributors | connection_github_list_contributorsgrouped: connection_github_repositories_read, action list_contributors |
GET /repos/{owner}/{repo}/languagesList repository languages | connection_github_list_languagesgrouped: connection_github_repositories_read, action list_languages |
GET /repos/{owner}/{repo}/tagsList repository tags | connection_github_list_tagsgrouped: connection_github_tags_read, action list |
GET /repos/{owner}/{repo}/topicsList repository topics | connection_github_list_repo_topicsgrouped: connection_github_repositories_read, action list_topics |
GET /repos/{owner}/{repo}/collaboratorsList repository collaborators | connection_github_list_collaboratorsgrouped: connection_github_repositories_read, action list_collaborators |
GET /repos/{owner}/{repo}/contents/{path}Get repository content | connection_github_get_contentgrouped: connection_github_files_read, action get |
PUT /repos/{owner}/{repo}/contents/{path}Create or update a file | connection_github_put_contentgrouped: connection_github_files_write, action put |
DELETE /repos/{owner}/{repo}/contents/{path}Delete a file | connection_github_delete_filegrouped: connection_github_files_delete, action delete |
GET /repos/{owner}/{repo}/issuesList repository issues | connection_github_list_repo_issuesgrouped: connection_github_issues_read, action list |
POST /repos/{owner}/{repo}/issuesCreate an issue | connection_github_create_issuegrouped: connection_github_issues_write, action create |
GET /repos/{owner}/{repo}/issues/{issue_number}Get an issue | connection_github_get_issuegrouped: connection_github_issues_read, action get |
PATCH /repos/{owner}/{repo}/issues/{issue_number}Update an issue | connection_github_update_issuegrouped: connection_github_issues_write, action update |
PUT /repos/{owner}/{repo}/issues/{issue_number}/lockLock an issue | connection_github_lock_issuegrouped: connection_github_issues_write, action lock |
DELETE /repos/{owner}/{repo}/issues/{issue_number}/lockUnlock an issue | connection_github_unlock_issuegrouped: connection_github_issues_delete, action unlock |
GET /repos/{owner}/{repo}/issues/{issue_number}/commentsList issue comments | connection_github_list_issue_commentsgrouped: connection_github_issues_read, action list_comments |
POST /repos/{owner}/{repo}/issues/{issue_number}/commentsCreate an issue comment | connection_github_create_issue_commentgrouped: connection_github_issues_write, action comment |
PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}Update an issue comment | connection_github_update_issue_commentgrouped: connection_github_issues_write, action update_comment |
DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}Delete an issue comment | connection_github_delete_issue_commentgrouped: connection_github_issues_delete, action delete_comment |
GET /repos/{owner}/{repo}/labelsList repository labels | connection_github_list_labelsgrouped: connection_github_issues_read, action list_labels |
GET /repos/{owner}/{repo}/milestonesList milestones | connection_github_list_milestonesgrouped: connection_github_issues_read, action list_milestones |
GET /repos/{owner}/{repo}/pullsList pull requests | connection_github_list_pull_requestsgrouped: connection_github_pull_requests_read, action list |
POST /repos/{owner}/{repo}/pullsCreate a pull request | connection_github_create_pull_requestgrouped: connection_github_pull_requests_write, action create |
GET /repos/{owner}/{repo}/pulls/{pull_number}Get a pull request | connection_github_get_pull_requestgrouped: connection_github_pull_requests_read, action get |
PATCH /repos/{owner}/{repo}/pulls/{pull_number}Update a pull request | connection_github_update_pull_requestgrouped: connection_github_pull_requests_write, action update |
GET /repos/{owner}/{repo}/pulls/{pull_number}/filesList pull request files | connection_github_list_pull_filesgrouped: connection_github_pull_requests_read, action list_files |
GET /repos/{owner}/{repo}/pulls/{pull_number}/commitsList pull request commits | connection_github_list_pull_commitsgrouped: connection_github_pull_requests_read, action list_commits |
PUT /repos/{owner}/{repo}/pulls/{pull_number}/mergeMerge a pull request | connection_github_merge_pull_requestgrouped: connection_github_pull_requests_write, action merge |
GET /repos/{owner}/{repo}/pulls/{pull_number}/reviewsList pull request reviews | connection_github_list_pr_reviewsgrouped: connection_github_pull_request_reviews_read, action list |
POST /repos/{owner}/{repo}/pulls/{pull_number}/reviewsCreate a pull request review | connection_github_create_pr_reviewgrouped: connection_github_pull_request_reviews_write, action create |
GET /repos/{owner}/{repo}/pulls/{pull_number}/commentsList pull request review comments | connection_github_list_pr_review_commentsgrouped: connection_github_pull_request_reviews_read, action list_comments |
PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branchUpdate a pull request branch | connection_github_update_pr_branchgrouped: connection_github_pull_requests_write, action update_branch |
GET /repos/{owner}/{repo}/releasesList releases | connection_github_list_releasesgrouped: connection_github_releases_read, action list |
POST /repos/{owner}/{repo}/releasesCreate a release | connection_github_create_releasegrouped: connection_github_releases_write, action create |
GET /repos/{owner}/{repo}/releases/{release_id}Get a release | connection_github_get_releasegrouped: connection_github_releases_read, action get |
PATCH /repos/{owner}/{repo}/releases/{release_id}Update a release | connection_github_update_releasegrouped: connection_github_releases_write, action update |
DELETE /repos/{owner}/{repo}/releases/{release_id}Delete a release | connection_github_delete_releasegrouped: connection_github_releases_delete, action delete |
GET /repos/{owner}/{repo}/releases/latestGet the latest release | connection_github_get_latest_releasegrouped: connection_github_releases_read, action get_latest |
GET /repos/{owner}/{repo}/releases/tags/{tag}Get a release by tag name | connection_github_get_release_by_taggrouped: connection_github_releases_read, action get_by_tag |
GET /search/repositoriesSearch repositories | connection_github_search_reposgrouped: connection_github_search, action repositories |
GET /search/codeSearch code | connection_github_search_codegrouped: connection_github_search, action code |
GET /search/issuesSearch issues and pull requests | connection_github_search_issuesgrouped: connection_github_search, action issues |
GET /search/usersSearch users | connection_github_search_usersgrouped: connection_github_search, action users |
GET /search/commitsSearch commits | connection_github_search_commitsgrouped: connection_github_search, action commits |
GET /userGet the authenticated user | connection_github_get_authenticated_usergrouped: connection_github_users_read, action me |
GET /users/{username}Get a user | connection_github_get_usergrouped: connection_github_users_read, action get |
GET /users/{username}/followersList a user's followers | connection_github_list_user_followersgrouped: connection_github_users_read, action list_followers |
GET /users/{username}/followingList who a user is following | connection_github_list_user_followinggrouped: connection_github_users_read, action list_following |
GET /user/followersList the authenticated user's followers | connection_github_list_my_followersgrouped: connection_github_users_read, action list_my_followers |
GET /user/followingList who the authenticated user follows | connection_github_list_my_followinggrouped: connection_github_users_read, action list_my_following |
PUT /user/following/{username}Follow a user | connection_github_follow_usergrouped: connection_github_users_write, action follow |
DELETE /user/following/{username}Unfollow a user | connection_github_unfollow_usergrouped: connection_github_users_delete, action unfollow |
GET /orgs/{org}Get an organization | connection_github_get_orggrouped: connection_github_orgs_read, action get |
GET /orgs/{org}/membersList organization members | connection_github_list_org_membersgrouped: connection_github_orgs_read, action list_members |
GET /user/orgsList the authenticated user's organizations | connection_github_list_my_orgsgrouped: connection_github_orgs_read, action list_mine |
GET /gistsList the authenticated user's gists | connection_github_list_my_gistsgrouped: connection_github_gists_read, action list |
POST /gistsCreate a gist | connection_github_create_gistgrouped: connection_github_gists_write, action create |
GET /gists/{gist_id}Get a gist | connection_github_get_gistgrouped: connection_github_gists_read, action get |
PATCH /gists/{gist_id}Update a gist | connection_github_update_gistgrouped: connection_github_gists_write, action update |
DELETE /gists/{gist_id}Delete a gist | connection_github_delete_gistgrouped: connection_github_gists_delete, action delete |
GET /users/{username}/gistsList a user's gists | connection_github_list_user_gistsgrouped: connection_github_gists_read, action list_for_user |
POST /repos/{owner}/{repo}/git/refsCreate a reference (branch or tag) | connection_github_create_refgrouped: connection_github_branches_write, action create_ref |
GET /repos/{owner}/{repo}/git/ref/{ref}Get a reference | connection_github_get_refgrouped: connection_github_branches_read, action get_ref |
DELETE /repos/{owner}/{repo}/git/refs/{ref}Delete a reference | connection_github_delete_refgrouped: connection_github_branches_delete, action delete_ref |