Githome
Connect AI apps: Claude Code
Docs / Connect AI apps

Claude Code

Add Githome's MCP server to Claude Code with one command, sign in from /mcp, and let Claude push branches and open pull requests on Githome.

Claude Code connects to Githome through its MCP server at https://git.pkgforge.dev/mcp. Together with the githome CLI, Claude can then push a branch, open a pull request and merge it, without leaving the terminal. Githome ships no Claude Code plugin: the MCP server is the whole connection.

1. Install the CLI

The CLI gives Claude git access and the pull request commands. It needs Node.js 26 or later, and installs a private copy of the Node.js 26 LTS when the machine has none:

curl -fsSL https://git.pkgforge.dev/install | bash
githome setup

On Windows, in PowerShell: powershell -c "irm https://git.pkgforge.dev/install.ps1 | iex", then githome setup. It opens your browser to sign in (on a machine without one it shows a code to enter instead), runs githome auth setup-git so git pushes and pulls with the same sign-in, and signs in gh when you have it. You can also ask Claude Code to run both lines: it gives you the link or code, and you click Authorize. See Install and sign in to the CLI.

2. Add the MCP server

claude mcp add --scope user --transport http githome https://git.pkgforge.dev/mcp

With --scope user the server is available in every project on your machine. Leave the flag out to keep it to the current project.

To share it with everyone working on a repository, commit it in the repository's .mcp.json; each person signs in with their own account:

{ "mcpServers": { "githome": { "type": "http", "url": "https://git.pkgforge.dev/mcp" } } }

3. Sign in

  1. In Claude Code, run /mcp, select githome and choose Authenticate.
  2. Your browser opens Githome's consent page. Choose whom Claude Code acts as and its access, then choose Connect.
  3. Back in the terminal, /mcp shows the server as connected.

Githome's consent page for Claude Code: "Connect Claude Code to Githome", an app published by claude.ai that sends you back to an app on this computer, with Act as set to the agent ada-bot and Write access selected, and the Connect and Cancel buttons.

On a machine without a browser, run claude mcp login githome --no-browser, open the printed link on any device, and paste the address you land on back into the terminal.

Tip

Act as one of your agents. Claude Code's commits, comments and pull requests then show as the agent's, and they wait for a person's approval before they land.

Check that it works

claude mcp list

githome shows Connected (before you sign in it shows Needs authentication). Then try it:

claude -p "Who am I on Githome?"

The whoami tool answers with the account you picked on the consent page.

Pull requests from the terminal

With the CLI installed, Claude Code works through the usual loop on its own:

git push -u origin my-branch
githome pr create --title "Fix the login redirect" --intent "Sign-in should return people to the page they came from"
githome pr merge --auto --squash

The pull request commands use the current branch's pull request when you leave out the number. githome pr checks --watch waits for a branch's checks and githome run logs <job-id> reads the log of a failed job, on a deployment where CI runs; the forge CI of git.pkgforge.dev is dormant, so no workflow runs there now.

To let Claude use gh as it would on GitHub, and to see the branch's pull request in Claude Code's footer and the desktop app, sign gh in to Githome once. githome setup in step 1 did this if gh was installed then; otherwise run:

githome auth setup-gh

See GitHub CLI for what works with gh.

Headless: CI and cloud sessions

Where nobody can approve a browser sign-in, give Claude Code an agent's token in GITHOME_TOKEN and add a server that sends it:

claude mcp add --scope user --transport http githome https://git.pkgforge.dev/mcp \
  --header 'Authorization: Bearer ${GITHOME_TOKEN}'

Keep the single quotes: Claude Code reads ${GITHOME_TOKEN} from the environment each time it connects, so the token is never written to its settings. A token and the browser sign-in can't share one server entry: with the header set, Claude Code doesn't fall back to OAuth. The CLI and githome auth setup-git read GITHOME_TOKEN too. For Claude Code on the web, set up the environment from the repository's Agent setup. More in Headless use.

Troubleshooting

ProblemWhat to do
claude mcp list doesn't show githomeRun the claude mcp add command of step 2 again. A server added without --scope user belongs to the project you ran it in.
/mcp shows the server as needing authenticationChoose Authenticate, or run claude mcp login githome.
The browser says "Can't connect this app"Remove the server with claude mcp remove githome and add it again, then sign in.
A tool says it needs the write scopeYou connected with Read. Disconnect Claude Code under Settings → Access tokens → Connected apps and sign in again with Write.
git push to main fails with "agents may not push to protected or default branches"Claude Code acts as an agent: push a branch and open a pull request.
/mcp shows the server but every call answers 401The server entry has an Authorization header with an old or empty GITHOME_TOKEN. Set the variable to a current token, or remove the header to use the browser sign-in.