Gonéri's blog Light modeDark mode


Claude and Github MCP tools

You already use Github with the gh command and want to enable the MCP service in Claude Code.

In this case, you don't need to prepare a new Github Personal Access Token, but you can just reuse the gh's token that gh auth token returns:

With Fishshell, this looks like this:

claude mcp add-json github -- (printf '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer %s"}}' (gh auth token))

or Bash:

claude mcp add-json github "$(printf '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer %s"}}' "$(gh auth token)")"

screenshot