It can if you are running it through Claude Code on your own machine.
The https://claude.ai environment has very limited network access - it can install packages from PyPI and NPM and clone repositories from github.com but it can't access any other domain, including api.github.com.
;-) Confirmed by trying. I'm working on an AI-frontend "documents-as-code" tool, and having this as a skill that works across all Claude surfaces would be a huge win. Unfortunately it looks like that's not gonna happen today because ^^ ...
Looks like Claude Desktop and/or Claude Code + a non-big-fat-pig MCP (aka "not GitHub's official version") will be needed.
Here's hoping that Anthropic solves "safe external access / auth from code execution tool" soon.