GitHub PR Review Server
БесплатноНе проверенComprehensive MCP server for analyzing GitHub pull requests, detecting security vulnerabilities, assessing code quality, and providing risk ratings across multi
Описание
Comprehensive MCP server for analyzing GitHub pull requests, detecting security vulnerabilities, assessing code quality, and providing risk ratings across multiple languages.
README
An MCP (Model Context Protocol) server for comprehensive GitHub Pull Request review, code analysis, and security issue detection.
Features
- 🔍 Comprehensive PR Analysis: Analyzes pull requests for code quality, security vulnerabilities, and best practices
- 🛡️ Security Scanning: Detects common security issues and vulnerabilities across multiple programming languages
- 📊 Code Quality Assessment: Evaluates code maintainability, complexity, and adherence to best practices
- 🚨 Risk Assessment: Provides overall risk ratings and actionable recommendations
- 🔧 Multi-language Support: Supports JavaScript, TypeScript, Python, Java, C#, PHP, and more
- 📋 Detailed Reporting: Generates comprehensive review reports with file-level analysis
Installation
Prerequisites
- Node.js 18.0.0 or higher
- GitHub Personal Access Token with repository access
Setup
- Clone the repository:
git clone https://github.com/doraemon0905/github-review.git
cd github-review
- Install dependencies:
npm install
- Build the project:
npm run build
- Set up environment variables:
export GITHUB_TOKEN=your_github_personal_access_token
Usage
Running the MCP Server
npm start
The server will start and listen for MCP connections on stdio.
Configuration in Cursor/Claude
Add the following configuration to your MCP settings:
{
"github-pr-review": {
"command": "node",
"args": ["/path/to/github-review/dist/index.js"],
"env": {
"GITHUB_TOKEN": "your_github_token_here"
}
}
}
Available Tools
1. get_pull_request
Fetch pull request details including metadata and file changes.
Parameters:
owner(string): Repository owner (username or organization)repo(string): Repository namepull_number(number): Pull request number
Example:
Get pull request microsoft/vscode #12345
2. review_pull_request
Perform a comprehensive review of a pull request including code analysis, issue detection, and security checks.
Parameters:
owner(string): Repository ownerrepo(string): Repository namepull_number(number): Pull request numberinclude_security(boolean, optional): Include security analysis (default: true)include_best_practices(boolean, optional): Include best practices recommendations (default: true)severity_threshold(string, optional): Minimum severity level to report - "low", "medium", "high", or "critical" (default: "medium")
Example:
Review pull request microsoft/vscode #12345 with high severity threshold
3. analyze_code_diff
Analyze specific code changes for issues and security vulnerabilities.
Parameters:
diff_content(string): Git diff content to analyzefile_path(string): Path of the file being analyzedlanguage(string, optional): Programming language (auto-detected if not provided)include_security(boolean, optional): Include security analysis (default: true)
Example:
Analyze this diff for security issues:
```diff
+function validateUser(input) {
+ return eval(input.code);
+}
4. get_repository_prs
List pull requests for a repository with filtering options.
Parameters:
owner(string): Repository ownerrepo(string): Repository namestate(string, optional): PR state filter - "open", "closed", or "all" (default: "open")limit(number, optional): Maximum number of PRs to return (default: 10, max: 100)sort(string, optional): Sort criteria - "created", "updated", "popularity", or "long-running" (default: "created")
Example:
List open pull requests for microsoft/vscode
Security Analysis
The server detects various security issues including:
JavaScript/TypeScript
- Use of
eval()and similar dangerous functions - XSS vulnerabilities via
innerHTML - Unsafe
setTimeoutusage - TypeScript
anytype usage - Hardcoded secrets and API keys
Python
- Use of
exec()andeval() - Unsafe
pickleusage - Bare
exceptclauses - Input validation issues
PHP
- SQL injection patterns
- Use of dangerous functions
- Unvalidated superglobal usage
General
- Hardcoded passwords and API keys
- Commented-out code
- TODO/FIXME markers
- Long lines and code complexity
Code Quality Assessment
The analyzer evaluates:
- Complexity: Cyclomatic complexity based on decision points
- Maintainability: Score based on line count, complexity, and readability
- Duplicate Code: Detection of repeated code patterns
- Best Practices: Language-specific coding standards
- File Risk: Assessment based on file types and patterns
Risk Assessment
Each PR receives an overall risk rating:
- Low: Minor issues, safe to merge
- Medium: Some issues present, review recommended
- High: Security concerns or multiple issues
- Critical: Serious issues that block merging
Development
Project Structure
src/
├── index.ts # Main MCP server
├── services/
│ ├── GitHubService.ts # GitHub API interactions
│ ├── CodeAnalyzer.ts # Code analysis engine
│ └── PRReviewer.ts # PR review orchestrator
Building
npm run build
Development Mode
npm run dev
Linting
npm run lint
Testing
npm test
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and add tests
- Run the test suite:
npm test - Run the linter:
npm run lint - Commit your changes:
git commit -am 'Add feature' - Push to the branch:
git push origin feature-name - Create a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Security
If you discover a security vulnerability, please send an email to [email protected]. All security vulnerabilities will be promptly addressed.
Changelog
Version 1.0.0
- Initial release
- GitHub PR analysis
- Multi-language security scanning
- Code quality assessment
- Risk assessment and recommendations
Установка GitHub PR Review Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/Vibe-Code-Agent/github-reviewFAQ
GitHub PR Review Server MCP бесплатный?
Да, GitHub PR Review Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для GitHub PR Review Server?
Нет, GitHub PR Review Server работает без API-ключей и переменных окружения.
GitHub PR Review Server — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить GitHub PR Review Server в Claude Desktop, Claude Code или Cursor?
Открой GitHub PR Review Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare GitHub PR Review Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
