Skip to content
Discussion options

You must be logged in to vote

PRs are exposed as resources by this server today — just only the file contents at the PR head ref, not the PR's metadata/conversation. The URI template is defined in pkg/github/repository_resource.go:

repo://{owner}/{repo}/refs/pull/{prNumber}/head/contents{/path*}

So path is the file path inside the repo at the PR's head commit, exactly like browsing the PR's "Files changed" tab and selecting a file. A few concrete examples for this very server:

  • Root of the repo at PR #2186's head:
    repo://github/github-mcp-server/refs/pull/2186/head/contents/
  • A specific file from that PR:
    repo://github/github-mcp-server/refs/pull/2186/head/contents/README.md
  • A nested file:
    repo://github/github-mcp-ser…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by SamMorrowDrums
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants