Skip to main content
Glama

GitHub Code Review MCP Server

README.md1.85 kB
# GitHub Code Review MCP Server A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) 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 1. Python 3.8 or higher 2. A GitHub Personal Access Token with appropriate read permissions ## Installation ```bash # Clone the repository git clone https://github.com/milind-kulshrestha/github-code-review-mcp-server.git cd github-code-review-mcp-server # Install dependencies pip install -e . ``` ## Usage ### Environment Setup ```bash # Set your GitHub Personal Access Token export GITHUB_PERSONAL_ACCESS_TOKEN=your_token_here ``` ### Running the Server ```bash # Run the server with standard input/output python -m github_code_review ``` ## 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](https://github.com/github/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

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/milind-kulshrestha/github-code-review-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server