Provides read-only access to GitHub repositories, branches, commits, and pull requests, enabling code review capabilities. Includes tools for listing repositories, accessing file contents, viewing PR comments and reviews, searching code, and accessing code scanning alerts.
GitHub Code Review MCP Server
A Model Context Protocol (MCP) server for GitHub code review. This server provides read-only access to GitHub repositories, branches, commits, and pull requests, enabling AI assistants to perform code reviews without write permissions.
Features
List repositories, branches, commits, and pull requests
Access file contents from different branches and commits
View pull request comments and reviews
Search code across repositories
Access code scanning alerts
Related MCP server: GitHub MCP Server
Prerequisites
Python 3.8 or higher
A GitHub Personal Access Token with appropriate read permissions
Installation
Usage
Environment Setup
Running the Server
Configuration Options
GITHUB_PERSONAL_ACCESS_TOKEN: Your GitHub Personal Access Token (required)GITHUB_HOST: GitHub host (defaults to github.com, can be set for GitHub Enterprise)
Implementation Details
This MCP server follows the structure of the original GitHub MCP Server but is implemented in Python and focuses exclusively on read-only functionality for code review purposes.
Available Tools
Repository tools: list_branches, list_commits, get_commit, get_file_contents
Pull request tools: get_pull_request, list_pull_requests, get_pull_request_comments
Code scanning tools: list_code_scanning_alerts, get_code_scanning_alert
License
MIT