Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Hosted MCP `get_check_runs` fails with 403 where the equivalent REST call succeeds

Đang mở
#2,381 1 bình luận 4 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
github, go
Lĩnh vực
api, authentication, security

Hướng nghiên cứu

Bắt đầu tại điểm vào pull_request_read của phương thức get_check_runs và so sánh đường dẫn xác thực và quyền trong môi trường hosted với yêu cầu REST thành công được mô tả ở đây. Kiểm tra thay đổi được giới thiệu bởi #1942; công việc được xem là hoàn tất khi phương thức hosted trả về các lần chạy kiểm tra cho trường hợp kho lưu trữ private được báo cáo, hoặc ghi rõ tài liệu về quyền cần thiết nếu không thể thay đổi hosted installation.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug request ai review
Describe the bug

pull_request_read with method: get_check_runs returns 403 Resource not accessible by personal access token [] for a private repo that the same classic PAT can read via the plain REST API (gh pr checks / GET /repos/{owner}/{repo}/commits/{ref}/check-runs). Every other pull_request_read method (get, get_files, get_reviews, get_review_comments, etc.) works with that token on the same PR — only get_check_runs fails.

This means the method shipped via #1942 is effectively unusable against repos where the user's PAT is fine but the underlying MCP app installation is missing Checks: Read. The caller cannot fix it by adding PAT scopes, since the failing call isn't authenticated with the caller's PAT permission surface.

Affected version

Hosted remote MCP at https://api.githubcopilot.com/mcp/. github-mcp-server --version not available for the hosted deployment.

Steps to reproduce the behavior
  1. Authenticate the hosted Copilot MCP with a classic PAT that has repo, read:org, and SSO authorization for the org hosting a private repo.k
  2. Invoke mcp__github__pull_request_read with:
    method: get_check_runs
    owner: <org>
    repo:  <private-repo>
    pullNumber: <N>
    
  3. From a local shell using the same PAT:
    gh api /repos/<org>/<private-repo>/commits/<head-sha>/check-runs
    
    returns 200 with the full check-runs payload.
Expected vs actual behavior

Expected: MCP get_check_runs returns the same payload as the REST API.

Actual:

failed to get check runs: GET https://api.github.com/repos/<org>/<private-repo>/commits/<sha>/check-runs?page=1&per_page=30: 403 Resource not accessible by personal access token []

All other pull_request_read methods succeed against the same PR with the same token.

Logs

Error string as surfaced to the MCP client:

failed to get check runs: GET https://api.github.com/repos/<org>/<private-repo>/commits/<sha>/check-runs?page=1&per_page=30: 403 Resource not accessible by personal access token []
Notes
  • Feature was added in #1942 (closed). This report is a regression / follow-up: the method is reachable but consistently 403s under hosted-MCP auth where the caller's PAT has repo.
  • Likely fix direction: ensure the hosted MCP's GitHub App installation requests Checks: Read, or document the fine-grained permission requirement alongside the tool description.

Remark: This issue was analyzed and the report was created with Claude Code.

Ngôn ngữ chính
Go
Star
33.1k
Fork
5k
Merge trung bình
2 ngày 1 giờ
Pull request đã merge (30 ngày)
25

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/github-mcp-server

Tất cả issue của github/github-mcp-server

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.