gh-pr-mcp

v0.1.3
gh-pr-mcp Checked 8 hours ago Published 3 months ago

MCP server exposing a focused set of GitHub PR and review helpers the gh CLI can't do in one shot

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

gh_pr_delete_comment

delete an existing pull request review comment (inline or reply). comment_id: the id of the comment to delete (from pr_review_threads). repo: optional 'owner/repo' override.

ParameterTypeDescription
comment_id *integer
repostring
repo_pathstring

gh_pr_edit_comment

edit an existing pull request review comment (inline or reply). comment_id: the id of the comment to edit (from pr_review_threads). body: the new comment body. repo: optional 'owner/repo' override.

ParameterTypeDescription
body *string
comment_id *integer
repostring
repo_pathstring

gh_pr_list

list pull requests (gh pr list). state: 'open', 'closed', 'merged', or 'all'. repo_path: optional local checkout to resolve the repo from. Defaults to the current project directory (where Claude Code is running), so you rarely need to set it. Set it only to target a different checkout.

ParameterTypeDescription
authorstring
basestring
labelstring
limitinteger
repostring
repo_pathstring
statestring

gh_pr_resolve_thread

mark a PR review thread as resolved. thread_id: GraphQL node id from pr_review_threads (the 'resolve_id' field). repo_path: optional local checkout to resolve the GitHub host from. Defaults to the current project directory (where Claude Code is running), so you rarely need to set it. Set it only to target a different checkout.

ParameterTypeDescription
thread_id *string
repo_pathstring

gh_pr_unresolve_thread

mark a PR review thread as unresolved. thread_id: GraphQL node id from pr_review_threads (the 'resolve_id' field). repo_path: optional local checkout to resolve the GitHub host from. Defaults to the current project directory (where Claude Code is running), so you rarely need to set it. Set it only to target a different checkout.

ParameterTypeDescription
thread_id *string
repo_pathstring

gh_pr_add_review

submit a PR review with optional inline comments via the GitHub API. event: 'APPROVE', 'REQUEST_CHANGES', or 'COMMENT'. body: top-level review body. inline_comments: list of dicts, each with: path (str) — relative file path line (int) — line number in the new file body (str) — comment text side (str) — 'RIGHT' (default) or 'LEFT' use this instead of pr_review when you need to attach comments to specific lines of the diff.

ParameterTypeDescription
event *string
pr *
bodystring
inline_comments
repostring
repo_pathstring

gh_pr_reply_comment

reply to an existing inline review comment thread. comment_id: the id of the root comment to reply to (from pr_review_threads). body: your reply text.

ParameterTypeDescription
body *string
comment_id *integer
pr *
repostring
repo_pathstring

gh_pr_view

view pull request details including description and comments (gh pr view). pr: PR number or branch name. repo_path: optional local checkout to resolve the repo from. Defaults to the current project directory (where Claude Code is running), so you rarely need to set it. Set it only to target a different checkout.

ParameterTypeDescription
pr *
repostring
repo_pathstring

gh_pr_checks

show CI check status for a pull request (gh pr checks).

ParameterTypeDescription
pr *
repostring
repo_pathstring

gh_pr_files

list files changed by a pull request as a compact diffstat (no patch blobs). Per file: status letter (A/D/M/R/C), path (with rename origin), +adds/-dels, plus a totals header. Use this to triage a PR you have NOT checked out — in a local worktree, `git diff --name-status origin/<base>...HEAD` is free and faster. repo_path: optional local checkout to resolve the repo from. Defaults to the current project directory (where Claude Code is running), so you rarely need to set it. Set it only to target a different checkout.

ParameterTypeDescription
pr *
repostring
repo_pathstring

gh_pr_review_threads

fetch inline review comment threads on a PR, structured for agent use. Returns JSON with a 'threads' list and a 'summary'. Each thread: thread_id — numeric comment id; pass to gh_pr_reply_comment to reply resolve_id — GraphQL node id; pass to gh_pr_resolve_thread / gh_pr_unresolve_thread resolved — true if the thread has been marked resolved on GitHub file, line — where the comment was placed in the diff outdated — true when the commented line no longer exists in the current diff author — {login, type} where type is 'human' or 'bot' body — root comme…

ParameterTypeDescription
pr *
kindstring
repostring
repo_pathstring

gh_run_view

view a workflow run's details or logs (gh run view).

ParameterTypeDescription
run_id *
logboolean
repostring
repo_pathstring

gh_run_job_view

view details or logs for a specific job within a run (gh run view --job). job_name: numeric job id, or a case-insensitive partial match on the job names shown in run_view output. log: fetch the job's step logs (timestamps stripped, long output tailed).

ParameterTypeDescription
run_id *
job_namestring
logboolean
repostring
repo_pathstring