GitHub connector

Work with GitHub repositories, issues, pull requests, Actions, and more from AgentRuntime workflows.

On this page

The github connector lets workflows work with GitHub: read and write issues and pull requests, browse and change files, follow Actions runs, search code, and more. Use it to triage issues, summarize pull requests, post status comments, or keep a changelog up to date.

Prerequisites

  • A GitHub account with access to the repositories you want to automate.
  • A GitHub personal access token (classic or fine-grained) that can reach those repositories.
  • The project_contributor role or higher in your workspace, which lets you manage connections and MCP instances. See Roles and permissions.

Connect in AgentRuntime

  1. Create a GitHub token

    In GitHub, open Settings, then Developer settings, then Personal access tokens, and generate a token. For a fine-grained token, select the repositories you will use and grant only the permissions your workflow needs (for example read access to contents and pull requests, and write access to issues if you will comment). Copy the token.

  2. Add the connector to your workspace

    Click MCP in the sidebar, then Add connectors. Find GitHub in the App catalog, select it, and click Add to workspace. The instance now appears on the MCP connectors page. See MCP instances.

  3. Add your credentials to a profile

    Open the new instance to reach Instance config. Under Profiles for this connector, click New profile, enter a Display name, and on the Type secrets on this screen tab fill in github_api_token (your token). Set Status to Active — can be used in workflows and click Save. Then click Use this profile for workflows.

  4. Test it

    In Workflow Studio, add the github_get_me tool from your GitHub instance (use Browse platform MCP if it is not listed), fill in its arguments, and run the workflow. A successful step means the connection works. This tool has no arguments and returns the user the token belongs to.

Note

To reuse the same credentials in more than one profile, save them first under Connections → New custom connection, using the exact key names from Configuration, then choose Use a saved connection on the profile instead.

What you can build

  • Pull request helper. github_list_pull_requests and github_pull_request_read feed an LLM step that writes a review summary, which github_add_issue_comment posts.
  • Issue triage. github_list_issues finds new issues, an LLM step classifies them, and github_issue_write sets labels and assignees.
  • Changelog draft. github_compare_commits between two tags feeds an LLM step, and github_create_or_update_file commits the notes (add a Human approval step first).
  • CI watcher. github_actions_list and github_actions_get_job_logs collect failing runs so a workflow can open an issue or notify the team.

Tools

The Required arguments column lists the fields the tool's input schema marks as required. Some of them are optional in practice; if you have nothing to set, pass an empty value such as "", [], {}, or false.

Several tools combine related actions behind a method argument (for example github_issue_read, github_issue_write, and github_pull_request_read). The tool's input schema lists the allowed method values.

Tools marked Delete remove data and may be irreversible.

Actions

ToolAccessWhat it doesRequired arguments
github_actions_getReadGet GitHub Actions workflow, run, job, artifact, usage, or logs URL.method, owner, repo, resource_id
github_actions_get_job_logsReadGet GitHub Actions job logs by job ID or failed jobs in a run.owner, repo
github_actions_listReadList GitHub Actions workflows, runs, jobs, or artifacts.method, owner, repo
github_actions_run_triggerWriteTrigger GitHub Actions workflow runs or lifecycle operations.method, owner, repo

Pull requests

ToolAccessWhat it doesRequired arguments
github_add_comment_to_pending_reviewWriteAdd an inline comment to a pending pull request review.owner, repo, pullNumber, review_id, path, body
github_add_reply_to_pull_request_commentWriteReply to a pull request review comment.owner, repo, pullNumber, comment_id, body
github_create_pull_requestWriteCreate a pull request in a repository.owner, repo, title, head, base
github_list_pull_requestsReadList pull requests for a repository.owner, repo
github_merge_pull_requestWriteMerge a pull request.owner, repo, number
github_pull_request_readWriteGet information on a specific pull request in a GitHub repository.method, owner, repo, pullNumber
github_pull_request_review_writeWriteCreate, submit, or delete pull request reviews.method, owner, repo, pullNumber
github_request_copilot_reviewWriteRequest a GitHub Copilot code review for a pull request.owner, repo, pullNumber
github_search_pull_requestsReadSearch GitHub pull requests.query
github_update_pull_requestWriteUpdate an existing pull request.owner, repo, number
github_update_pull_request_branchWriteUpdate a pull request branch with the latest base.owner, repo, pullNumber

Issues and labels

ToolAccessWhat it doesRequired arguments
github_add_issue_commentWriteAdd a comment to an issue.owner, repo, number, body
github_assign_copilot_to_issueWriteAssign Copilot to an issue in a GitHub repository.owner, repo, issue_number
github_get_labelReadGet a label.name, owner, repo
github_issue_dependency_readReadRead issue dependencies.method, owner, repo, issue_number
github_issue_dependency_writeWriteWrite issue dependencies.method, owner, repo, issue_number, blocked_by
github_issue_readReadGet information about a specific issue in a GitHub repository.method, owner, repo, issue_number
github_issue_writeWriteCreate or update an issue in a GitHub repository.method, owner, repo
github_label_writeWriteCreate, update, or delete repository labels.method, owner, repo, name
github_list_issue_fieldsReadList custom issue fields for an organization or repository.owner
github_list_issue_typesReadList issue types.org
github_list_issuesReadList issues for a repository.owner, repo
github_list_labelReadList labels from a repository.owner, repo
github_search_issuesReadSearch GitHub issues.query
github_sub_issue_writeWriteAdd, remove, or reprioritize sub-issues.method, owner, repo, issue_number

Discussions

ToolAccessWhat it doesRequired arguments
github_discussion_comment_writeWriteCreate or update a discussion comment.method, owner, discussionNumber, body
github_get_discussionReadGet a discussion.discussion_number, org, team_slug
github_get_discussion_commentsReadList comments on a discussion.owner, discussionNumber
github_list_discussion_categoriesReadList discussion categories for a repository or organization.owner
github_list_discussionsReadList discussions for a repository or organization.owner

Projects

ToolAccessWhat it doesRequired arguments
github_projects_getReadGet GitHub Projects resources.method, owner
github_projects_listReadList GitHub Projects resources.method, owner
github_projects_writeWriteWrite GitHub Projects resources.method, owner

Security alerts

ToolAccessWhat it doesRequired arguments
github_get_code_quality_findingReadGet a code quality finding in a repository.owner, repo, findingNumber
github_get_code_scanning_alertReadGet a code scanning alert.alert_number, owner, repo
github_get_dependabot_alertReadGet a dependabot alert in a repository.owner, repo, alertNumber
github_get_global_security_advisoryReadGet a global security advisory.ghsa_id
github_get_secret_scanning_alertReadGet a secret scanning alert in a repository.owner, repo, alertNumber
github_list_code_scanning_alertsReadList code scanning alerts in a repository.owner, repo
github_list_dependabot_alertsReadList dependabot alerts in a repository.owner, repo
github_list_global_security_advisoriesReadList global security advisories from GitHub.—
github_list_org_repository_security_advisoriesReadList repository security advisories for an organization.org
github_list_repository_security_advisoriesReadList security advisories for a repository.owner, repo
github_list_secret_scanning_alertsReadList secret scanning alerts in a repository.owner, repo

Notifications

ToolAccessWhat it doesRequired arguments
github_dismiss_notificationWriteDismiss a notification by marking it read or done.threadID, state
github_get_notification_detailsReadGet detailed information for a specific GitHub notification.notificationID
github_list_notificationsReadList notifications for authenticated user.—
github_manage_notification_subscriptionWriteIgnore, watch, or delete a notification thread subscription.notificationID, action
github_manage_repository_notification_subscriptionWriteIgnore, watch, or delete a repository notification subscription.owner, repo, action
github_mark_all_notifications_readWriteMark all notifications as read.—

Gists

ToolAccessWhat it doesRequired arguments
github_create_gistWriteCreate a new gist.filename, content
github_get_gistReadGet a gist.gist_id
github_list_gistsReadList gists for a user.—
github_update_gistWriteUpdate an existing gist.gist_id, filename, content
ToolAccessWhat it doesRequired arguments
github_search_codeReadSearch code across GitHub.query
github_search_commitsReadSearch commits on GitHub.query
github_search_orgsReadSearch GitHub organizations.query
github_search_repositoriesReadSearch GitHub repositories.query
github_search_usersReadSearch GitHub users.query

Users and teams

ToolAccessWhat it doesRequired arguments
github_get_meReadGet details of the authenticated GitHub user.—
github_get_team_membersReadGet team members.org, team_slug
github_get_teamsReadGet teams the user belongs to across organizations.—
github_get_userReadGet a public GitHub user profile by username.username
github_list_starred_repositoriesReadList repositories starred by a user.—
github_star_repositoryWriteStar a repository for the authenticated user.owner, repo
github_unstar_repositoryWriteUnstar a repository.owner, repo

Repositories, branches, and files

ToolAccessWhat it doesRequired arguments
github_compare_commitsReadCompare two refs or commits in a repository.owner, repo, base, head
github_create_branchWriteCreate a branch.branch_name, owner, repo, sha
github_create_or_update_fileWriteCreate or update a file in a repository.owner, repo, path, message, content
github_create_repositoryWriteCreate repository.name
github_delete_fileDeleteDelete a file in a repository.owner, repo, path, message, sha
github_fork_repositoryWriteCreate a fork of a repository.owner, repo
github_get_branchReadGet branch details for a repository.owner, repo, branch
github_get_commitReadGet a single commit by SHA.owner, repo, sha
github_get_file_blameReadGet blame information for a file.owner, repo, path
github_get_file_contentsReadGet file contents from a repository path.owner, repo, path
github_get_latest_releaseReadGet the latest release for a repository.owner, repo
github_get_release_by_tagReadGet a release by tag name.owner, repo, tag
github_get_repoReadGet repository metadata by owner and repository name.owner, repo
github_get_repository_treeReadGet the tree structure of a GitHub repository at a specific ref or SHA.owner, repo
github_get_tagReadGet a repository tag by name.owner, repo, tag
github_list_branchesReadList branches for a repository.owner, repo
github_list_commitsReadList commits for a repository branch or ref.owner, repo
github_list_releasesReadList releases for a repository.owner, repo
github_list_repositoriesReadList repositories.—
github_list_repository_collaboratorsReadList collaborators on a repository.owner, repo
github_list_tagsReadList tags for a repository.owner, repo
github_push_filesWriteCreate or update multiple files in one commit.owner, repo, branch, message, files

Example

Comment on a pull request or issue. number is the issue or pull request number.

{
  "id": "pr-comment",
  "type": "mcp",
  "name": "Post review summary",
  "tool_name": "github_add_issue_comment",
  "tool_args": {
    "owner": "your-org",
    "repo": "your-repo",
    "number": "{{input.pr_number}}",
    "body": "Automated review complete.\n\n{{steps.llm-summary.result.text}}"
  },
  "depends_on": [
    "llm-summary"
  ],
  "timeout_s": 30
}

Configuration

KeyRequiredDescription
github_api_tokenYesGitHub personal access token or fine-grained token with access to the repositories you call.

Troubleshooting

ProblemWhat to do
401 "Bad credentials"The token is wrong, expired, or revoked. Create a new one and update the profile.
403 or 404 on a repositoryThe token cannot see that repository. For a fine-grained token, add the repository and the needed permission.
Empty search resultsGitHub rate-limits search and can lag on new content. Narrow the query and retry later.
Want to start a workflow from a GitHub eventSee Inbound webhooks.
Edit this pageagentruntime-io/agentruntime-docs