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
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
This server cannot be installed
A Model Context Protocol server that provides read-only access to GitHub repositories, enabling AI assistants to perform code reviews without write permissions.
Related MCP Servers
- -securityAlicense-qualityA server that allows AI assistants to browse and read files from specified GitHub repositories, providing access to repository contents via the Model Context Protocol.Last updated -3JavaScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables AI agents to retrieve and understand entire codebases at once, providing tools to analyze local workspaces or remote GitHub repositories.Last updated -9TypeScriptMIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that enables AI models to interact with GitHub's API, allowing for repository creation and management with descriptions, topics, and website URLs through natural language commands.Last updated -1JavaScript
- -securityFlicense-qualityA Model Context Protocol server that enables AI assistants like Claude to interact with GitHub repositories, issues, and pull requests.Last updated -129Python