Pr Comments Resolver Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Pr Comments Resolver Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A comprehensive Model Context Protocol (MCP) server that not only fetches GitHub PR comments but also intelligently applies and fixes them directly in your workspace files. This enhanced version includes smart pattern recognition, similar comment linking, and automated issue resolution capabilities optimized for Cursor IDE.
cd pr-comments-resolver
uv syncOr using pip:
pip install -r requirements.txtpublic_repo (and repo for private repositories)#### Method 1: Environment Variable (Recommended)
export GITHUB_TOKEN="your_token_here"#### Method 2: MCP Client Configuration For Cursor (add to your MCP settings):
{
"mcpServers": {
"pr-comments-resolver": {
"command": "python",
"args": ["/path/to/pr-comments-resolver/main.py"],
"env": {
"GITHUB_TOKEN": "your_token_here"
}
}
}
}# Complete everything in one go - no redundant API calls!
complete_pr_workflow("https://github.com/owner/repo/pull/123", dry_run=True)
# Apply everything after preview
complete_pr_workflow("https://github.com/owner/repo/pull/123", dry_run=False)This unified tool:
#### Step 1: Embed PR Comments
# In Cursor IDE, use the MCP tool to embed comments in files
resolve_pr_comments("https://github.com/owner/repo/pull/123", dry_run=True)#### Step 2: Intelligent Fix & Check
# Automatically check and fix issues mentioned in comments
check_and_fix_applied_comments("https://github.com/owner/repo/pull/123", dry_run=True)
# Apply the fixes
check_and_fix_applied_comments("https://github.com/owner/repo/pull/123", dry_run=False)#### Step 3: Focus on Specific Files
# Check and fix comments for a specific file
check_specific_file_comments("https://github.com/owner/repo/pull/123", "src/components/Button.tsx", dry_run=False)The system will automatically:
Example embedded comment:
/**
* PR Comment from @reviewer: you can use theme token here
* Comment ID: 123456
* Line: ~42
*/
const color = '#ff0000'; // ← This will be automatically fixed!After running `check_and_fix_applied_comments`:
const color = theme.colors.primary; // ← Automatically fixed!python main.py#### 🔍 Core Functionality
##### detect_workspace Automatically detect and analyze your current workspace.
{
"tool": "detect_workspace",
"arguments": {}
}##### set_workspace_path Set a custom workspace path for file operations.
{
"tool": "set_workspace_path",
"arguments": {
"workspace_path": "/path/to/your/project"
}
}##### fetch_pr_comments_tool Fetch all comments from a GitHub PR with enhanced processing.
{
"tool": "fetch_pr_comments_tool",
"arguments": {
"pr_url": "https://github.com/owner/repo/pull/123"
}
}##### complete_pr_workflow 🚀 NEW! (RECOMMENDED) Complete PR comment resolution workflow in one step with smart caching.
{
"tool": "complete_pr_workflow",
"arguments": {
"pr_url": "https://github.com/owner/repo/pull/123",
"workspace_path": "/optional/custom/path",
"dry_run": true
}
}What it does:
##### resolve_pr_comments ✨ NEW! Embed PR comments directly in your source files at specific locations.
{
"tool": "resolve_pr_comments",
"arguments": {
"pr_url": "https://github.com/owner/repo/pull/123",
"dry_run": true
}
}##### check_and_fix_applied_comments ✨ NEW! Intelligently check and fix issues mentioned in PR comments after they're applied.
{
"tool": "check_and_fix_applied_comments",
"arguments": {
"pr_url": "https://github.com/owner/repo/pull/123",
"dry_run": true
}
}Features:
##### check_specific_file_comments ✨ NEW! Check and fix comments for a specific file.
{
"tool": "check_specific_file_comments",
"arguments": {
"pr_url": "https://github.com/owner/repo/pull/123",
"file_path": "src/components/Button.tsx",
"dry_run": true
}
}#### 🛠️ Utility Tools
##### clear_pr_cache ✨ NEW! Clear cached PR comments data to force fresh API calls.
{
"tool": "clear_pr_cache",
"arguments": {
"pr_url": "https://github.com/owner/repo/pull/123"
}
}Cache Features:
#### 🎯 Enhanced Prompt Generation
##### generate_cursor_prompt Generate optimized prompts for Cursor IDE with intelligent formatting.
{
"tool": "generate_cursor_prompt",
"arguments": {
"pr_url": "https://github.com/owner/repo/pull/123",
"format_type": "cursor"
}
}Format Types:
"cursor" - Optimized for Cursor IDE with enhanced formatting"json" - Structured JSON format for automated processing"markdown" - Clean markdown format for documentation"structured" - Advanced structured format with metadata#### 🔧 Direct File Modification
##### apply_pr_comments Apply all actionable PR comments directly to your workspace files.
{
"tool": "apply_pr_comments",
"arguments": {
"pr_url": "https://github.com/owner/repo/pull/123",
"dry_run": true
}
}##### apply_single_comment Apply a specific comment to a file.
{
"tool": "apply_single_comment",
"arguments": {
"pr_url": "https://github.com/owner/repo/pull/123",
"comment_id": "987654321",
"dry_run": false
}
}#### 📝 Comment Integration
##### embed_comments_in_files Embed PR comments as hidden comments directly in source files.
{
"tool": "embed_comments_in_files",
"arguments": {
"pr_url": "https://github.com/owner/repo/pull/123"
}
}##### get_file_context Get enhanced context around specific lines in files.
{
"tool": "get_file_context",
"arguments": {
"file_path": "src/main.py",
"line_number": 42,
"context_lines": 10
}
}The server automatically categorizes comments by:
# 1. Detect workspace
detect_workspace()
# 2. Generate Cursor-optimized prompt
generate_cursor_prompt("https://github.com/owner/repo/pull/123", "cursor")
# 3. Review the generated prompt in Cursor# 1. Test changes with dry run
apply_pr_comments("https://github.com/owner/repo/pull/123", dry_run=true)
# 2. Apply actual changes
apply_pr_comments("https://github.com/owner/repo/pull/123", dry_run=false)
# 3. Embed comments for reference
embed_comments_in_files("https://github.com/owner/repo/pull/123")# 1. Fetch all comments
fetch_pr_comments_tool("https://github.com/owner/repo/pull/123")
# 2. Apply specific high-priority comment
apply_single_comment("https://github.com/owner/repo/pull/123", "comment_id", false)The generated prompts are specifically optimized for Cursor IDE with:
All tools return comprehensive JSON responses with:
{
"success": true,
"workspace_path": "/path/to/workspace",
"pr_info": {
"owner": "username",
"repo": "repository",
"pr_number": 123,
"url": "https://github.com/username/repository/pull/123"
},
"results": {
"total_comments": 15,
"actionable_comments": 8,
"successful": 6,
"failed": 0,
"skipped": 2
},
"details": [...]
}pr-comments-resolver/
├── main.py # Enhanced MCP server with all tools
├── modules/
│ ├── __init__.py # Module initialization
│ ├── prompt_generator.py # Enhanced prompt generation
│ └── file_manager.py # Workspace and file operations
├── pyproject.toml # Dependencies and project config
├── README.md # This file
└── uv.lock # Dependency lock filehttpx - Async HTTP client for GitHub APImcp[cli] - Model Context Protocol frameworkaiofiles - Async file operationspathlib2 - Enhanced path handling (Python < 3.11)# Install development dependencies
uv sync --dev
# Run linting
black .
flake8 .
mypy .
# Run tests
pytestIf you're upgrading from the basic version:
uv syncThis project is open source. Please check the license file for details.
Workspace not detected
# Manually set workspace path
set_workspace_path("/path/to/your/project")File not found errors
Permission errors
Rate limiting
Enable detailed logging by setting environment variable:
export LOG_LEVEL=DEBUG
python main.pyTransform your PR review workflow with intelligent automation! 🎉
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.