loading…
Search for a command to run...
loading…
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.
An MCP (Model Context Protocol) server for comprehensive GitHub Pull Request review, code analysis, and security issue detection.
git clone https://github.com/doraemon0905/github-review.git
cd github-review
npm install
npm run build
export GITHUB_TOKEN=your_github_personal_access_token
npm start
The server will start and listen for MCP connections on stdio.
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"
}
}
}
get_pull_requestFetch pull request details including metadata and file changes.
Parameters:
owner (string): Repository owner (username or organization)repo (string): Repository namepull_number (number): Pull request numberExample:
Get pull request microsoft/vscode #12345
review_pull_requestPerform 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
analyze_code_diffAnalyze 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);
+}
get_repository_prsList 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
The server detects various security issues including:
eval() and similar dangerous functionsinnerHTMLsetTimeout usageany type usageexec() and eval()pickle usageexcept clausesThe analyzer evaluates:
Each PR receives an overall risk rating:
src/
├── index.ts # Main MCP server
├── services/
│ ├── GitHubService.ts # GitHub API interactions
│ ├── CodeAnalyzer.ts # Code analysis engine
│ └── PRReviewer.ts # PR review orchestrator
npm run build
npm run dev
npm run lint
npm test
git checkout -b feature-namenpm testnpm run lintgit commit -am 'Add feature'git push origin feature-nameThis project is licensed under the MIT License - see the LICENSE file for details.
If you discover a security vulnerability, please send an email to [email protected]. All security vulnerabilities will be promptly addressed.
Выполни в терминале:
claude mcp add github-pr-review-mcp-server -- npx Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development