Skip to main content
The github MCP adapter wraps the GitHub REST API. Use it to triage issues, review pull requests, sync repo metadata, and post updates when workflows complete — without leaving AgentRuntime.

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:org as needed)
  • project_contributor access in your AgentRuntime workspace

Connect in AgentRuntime

1

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.
2

Add github MCP instance

Go to MCP, click Add instance for github, wire your connection on Instance config, set the profile active, and save.
3

Verify access

Run a test workflow with mcp_callget_authenticated_user to confirm the token works before automating production repos.
See Authentication for how connections bind to MCP instances.

What you can build

  • PR release assistant — On webhook or schedule: list_pull_requestsget_pull_request + list_pull_request_files → LLM summary → add_issue_comment or Gmail notify reviewers.
  • Issue triagelist_issues with labels filter → LLM classify → update_issue to add labels and assignees.
  • Changelog draftcompare_commits between tags → LLM generate notes → create_or_update_file on CHANGELOG.md → optional human_task before merge.
  • Onboarding repo scansearch_repositories or list_reposget_file_contents for README → store metadata in Postgres for internal dashboards.

Tools

Pull requests & branches

ToolDescription
get_pull_requestGet a pull request by number
list_pull_requestsList pull requests for a repository
list_pull_request_filesList files changed in a pull request
create_pull_requestCreate a pull request
update_pull_requestUpdate an existing pull request
merge_pull_requestMerge a pull request
list_branchesList branches for a repository
get_branchGet branch details
create_branchCreate a branch from a base branch or commit SHA

Issues & comments

ToolDescription
get_issueGet a single issue by number
list_issuesList issues for a repository
create_issueCreate an issue
update_issueUpdate an existing issue
add_issue_commentAdd a comment to an issue
list_issue_commentsList comments on an issue

Repository & code

ToolDescription
get_repoGet repository metadata
list_reposList repositories for the authenticated user
get_file_contentsGet file contents from a path
create_or_update_fileCreate or update a file
delete_fileDelete a file
list_commitsList commits
compare_commitsCompare two refs or commits
list_tagsList tags
create_forkFork a repository

Search & users

ToolDescription
search_repositoriesSearch repositories
search_codeSearch code
search_issues_pull_requestsSearch issues and pull requests
search_usersSearch users
get_userGet a public user profile
get_authenticated_userGet the authenticated user for the token

Example

Comment on a PR after an automated check passes:
{
  "id": "pr-comment",
  "type": "mcp_call",
  "name": "Post review summary",
  "tool_name": "add_issue_comment",
  "tool_args": {
    "owner": "your-org",
    "repo": "your-repo",
    "issue_number": "{{input.pr_number}}",
    "body": "Automated review complete.\n\n{{steps.llm-summary.result.text}}"
  },
  "depends_on": ["llm-summary"],
  "timeout_s": 30
}

Configuration

KeyRequiredDescription
APITokenYesGitHub personal access token or fine-grained token with scopes for target repositories

Troubleshooting

IssueFix
401 Bad credentialsRegenerate token; update the connection and re-validate the MCP instance
403 Resource not accessibleFine-grained token must include the repo; classic token needs repo scope
Empty search_* resultsGitHub search has rate limits and indexing delay; narrow the query