pr_comments
A tool to fetch GitHub PR comments and reply to review comments via CLI and MCP interfaces.
Installation
Usage
CLI Mode
# Get review comments (thread-paginated, unresolved by default)
# Include resolved review comments
# Filter by comment source (robot, human, or all)
# Reply to a review comment (auto-prefixes with AI identifier)
# List PRs
Thread-Level Pagination
Comments are paginated at the thread level (parent + all replies stay together). By default, 10 threads are returned per call. Repeated MCP calls with the same parameters return the next page.
Configure page size via environment variable:
Resolution Filtering
- Review comments can be part of conversation threads that can be marked as resolved
- By default, resolved comments are filtered out to focus on active discussions
- Use
--include-resolvedto see all comments including resolved ones
Comment Source Filtering
Use --comment-source-type to filter by who created the comment:
robot- Only comments from botshuman- Only comments from humansall- All comments (default)
MCP Mode
# Start MCP server
Available MCP tools:
get_comments- Get review comments with thread-level paginationadd_comment_reply- Reply to a review comment (auto-prefixes with AI identifier)list_prs- List pull requests
Authentication
Set the GITHUB_TOKEN or GH_TOKEN environment variable:
Alternatively, the tool will use credentials from gh auth login if available.
Note: The token needs the repo scope for private repositories.
Configuration
If not in a git repository, specify the repository: