Prerequisites
- A GitHub account with access to the repositories you will automate
- A personal access token (classic or fine-grained) with scopes for those repos (
repo,read:orgas needed) - project_contributor access in your AgentRuntime workspace
Connect in AgentRuntime
Create a GitHub connection
Go to Connections and click New custom connection to create an API key connection. Paste your GitHub token as the secret. Store the token in a connection profile — never in workflow JSON.
Add github MCP instance
Go to MCP, click Add instance for github, wire your connection on Instance config, set the profile active, and save.
What you can build
- PR release assistant — On webhook or schedule:
list_pull_requests→get_pull_request+list_pull_request_files→ LLM summary →add_issue_commentor Gmail notify reviewers. - Issue triage —
list_issueswith labels filter → LLM classify →update_issueto add labels and assignees. - Changelog draft —
compare_commitsbetween tags → LLM generate notes →create_or_update_fileonCHANGELOG.md→ optional human_task before merge. - Onboarding repo scan —
search_repositoriesorlist_repos→get_file_contentsfor README → store metadata in Postgres for internal dashboards.
Tools
Pull requests & branches
| Tool | Description |
|---|---|
get_pull_request | Get a pull request by number |
list_pull_requests | List pull requests for a repository |
list_pull_request_files | List files changed in a pull request |
create_pull_request | Create a pull request |
update_pull_request | Update an existing pull request |
merge_pull_request | Merge a pull request |
list_branches | List branches for a repository |
get_branch | Get branch details |
create_branch | Create a branch from a base branch or commit SHA |
Issues & comments
| Tool | Description |
|---|---|
get_issue | Get a single issue by number |
list_issues | List issues for a repository |
create_issue | Create an issue |
update_issue | Update an existing issue |
add_issue_comment | Add a comment to an issue |
list_issue_comments | List comments on an issue |
Repository & code
| Tool | Description |
|---|---|
get_repo | Get repository metadata |
list_repos | List repositories for the authenticated user |
get_file_contents | Get file contents from a path |
create_or_update_file | Create or update a file |
delete_file | Delete a file |
list_commits | List commits |
compare_commits | Compare two refs or commits |
list_tags | List tags |
create_fork | Fork a repository |
Search & users
| Tool | Description |
|---|---|
search_repositories | Search repositories |
search_code | Search code |
search_issues_pull_requests | Search issues and pull requests |
search_users | Search users |
get_user | Get a public user profile |
get_authenticated_user | Get the authenticated user for the token |
Example
Comment on a PR after an automated check passes:Configuration
| Key | Required | Description |
|---|---|---|
APIToken | Yes | GitHub personal access token or fine-grained token with scopes for target repositories |
Troubleshooting
| Issue | Fix |
|---|---|
401 Bad credentials | Regenerate token; update the connection and re-validate the MCP instance |
403 Resource not accessible | Fine-grained token must include the repo; classic token needs repo scope |
Empty search_* results | GitHub search has rate limits and indexing delay; narrow the query |
Related
- Integrations quickstart
- Inbound webhooks — trigger workflows from GitHub events
- Connector catalog
- Troubleshooting