GitHub Integration MCP Server
GitHub Integration
The GitHub MCP server provides functionality to extract diffs from Pull Requests.
Available Tools
get_diff_pr
Retrieves the diff content from a GitHub Pull Request.
Parameters:
owner: Repository owner/organization namerepo: Repository namepr_number: Pull Request number
Returns: Object containing:
content: String containing the PR diff
Authentication
Required: 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.
Error Handling
The server implements standard error handling:
Missing/invalid token returns
ErrorCode.AuthenticationErrorInvalid repository details return
ErrorCode.InvalidParamsNon-existent PR returns
ErrorCode.NotFoundFailed diff fetches return formatted error messages
Graceful shutdown on SIGINT
Technical Details
Built using the Highlight AI MCP SDK
Uses GitHub REST API v3
Input validation via Zod
Runs as a stdio-based MCP server
Supports Node.js >=18.0.0
Limitations
Rate limits apply based on GitHub API restrictions
Large diffs may be truncated according to GitHub API limits
Token requires appropriate repository access permissions
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/highlight-ing/highlight-github-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server