Describe the issue
The GitHub MCP server fails to retrieve PR comments from private repositories, returning 404 Not Found errors even when the authenticated user has proper access to the repository and PR.
Steps to reproduce
- Configure GitHub MCP server with a token that has access to a private repository
- Use
mcp__github__search_pull_requests to find a PR (this works correctly)
- Use
mcp__github__get_pull_request_comments with the PR details
- Use
mcp__github__get_issue_comments with the PR number
Expected behavior
The MCP server should return PR comments in JSON format, similar to how it works for public repositories.
Actual behavior
Both functions return MCP errors:
MCP error -32603: failed to get pull request comments: GET https://api.github.com/repos/{owner}/{repo}/pulls/{pr_number}/comments?per_page=100: 404 Not Found []
MCP error -32603: failed to get issue comments: GET https://api.github.com/repos/{owner}/{repo}/issues/{pr_number}/comments?page=1&per_page=30: 404 Not Found []
Environment
- MCP Server: GitHub MCP (via Claude Code)
- Repository type: Private
- Authentication: Personal Access Token with repo permissions
- The same API endpoints work when called directly with curl using the same token
Additional context
- The user has admin access to the repository
- The PR exists and has comments visible in the GitHub web interface
- Other GitHub MCP functions work correctly (
search_pull_requests, etc.)
- The same issue affects both PR-level comments and review comments
- This blocks automation workflows that depend on accessing PR comments via MCP
Related
Similar issue reported for GitHub CLI: cli/cli#11363
This appears to be a broader issue with GitHub API access for private repositories across different tooling.
Describe the issue
The GitHub MCP server fails to retrieve PR comments from private repositories, returning 404 Not Found errors even when the authenticated user has proper access to the repository and PR.
Steps to reproduce
mcp__github__search_pull_requeststo find a PR (this works correctly)mcp__github__get_pull_request_commentswith the PR detailsmcp__github__get_issue_commentswith the PR numberExpected behavior
The MCP server should return PR comments in JSON format, similar to how it works for public repositories.
Actual behavior
Both functions return MCP errors:
Environment
Additional context
search_pull_requests, etc.)Related
Similar issue reported for GitHub CLI: cli/cli#11363
This appears to be a broader issue with GitHub API access for private repositories across different tooling.