GitHub Pull Request Diff
STDIOMCP server provides functionality to extract diffs from Pull Requests.
MCP server provides functionality to extract diffs from Pull Requests.
The GitHub MCP server provides functionality to extract diffs from Pull Requests.
Retrieves the diff content from a GitHub Pull Request.
Parameters:
owner
: Repository owner/organization namerepo
: Repository namepr_number
: Pull Request numberReturns: Object containing:
content
: String containing the PR diffRequired: Set the GitHub Personal Access Token as an environment variable:
export GITHUB_TOKEN=<your-github-token>
The token needs at least repo
scope permissions to access private repositories. For public repositories, a token with public_repo
scope is sufficient.
The server implements standard error handling:
ErrorCode.AuthenticationError
ErrorCode.InvalidParams
ErrorCode.NotFound