Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
GitHub MCP server extracts diffs from Pull Requests, built with Highlight AI MCP SDK, using GitHub REST API v3, and runs as a stdio-based MCP server.
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