Home / Servers / GitHub API / pulls_update_branch

Update a pull request branch

An MCP tool from the GitHub API server, hosted on mcp.hjlabs.in.

Update a pull request branch Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. Note: If making a request on behalf of a GitHub App you must also… [PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch]

Name on the gateway: github_api__pulls_update_branch · may change things.

Parameters

NameTypeDescription
owner requiredstringThe account owner of the repository. The name is not case…
repo requiredstringThe name of the repository without the .git extension. The…
pull_number requiredintegerThe number that identifies the pull request.
expected_head_shastringThe expected SHA of the pull request's HEAD ref. This is the most recent…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "github_api__pulls_update_branch",
  "arguments": {
    "owner": "…",
    "repo": "…",
    "pull_number": 0
  }
}

Or connect the GitHub API server directly, which lists 1,221 tools including this one:

Run in your terminal
claude mcp add --transport http hj-github-api https://mcp.hjlabs.in/mcp/github-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the update a pull request branch tool with owner set to ….

More from GitHub API