--- title: Set up Foyer description: Install the GitHub App, the CLI, and the MCP server. --- Three install surfaces, one URL. Pick the ones you need. If a term on this page is unfamiliar (signal, repair prompt, partial comment), see [Concepts](/agents/concepts) — it defines the vocabulary every other page reuses. ## 1. GitHub App (start here — fastest) Install on a repo so every PR gets a merge-readiness comment automatically. Install URL: [api.getfoyer.dev/auth/github/install](https://api.getfoyer.dev/auth/github/install) Open that URL in a browser. After GitHub finishes the install, you're redirected back to Foyer. Every PR on installed repos gets a merge-readiness comment automatically — no per-PR action required. ## 2. CLI (local pre-PR review) Run the same review locally before you push. Authenticates via RFC 8628 device-code flow — no token copy-paste. ```bash npm i -g @getfoyer/cli foyer login ``` Verify: ```bash foyer status ``` Should print your principal and current org. Exits `0` on a valid token, `2` if the token is missing or rejected. See the [CLI reference](/agents/cli) for the full command list. ## 3. MCP (wire Foyer into your agent) Add Foyer as an MCP server so your agent can pull review context, plan artifacts, and blockers directly. Run `foyer login` first so a token exists at `~/.foyer/credentials`. Then for Claude Code: ```bash claude mcp add foyer \ --scope user \ --env FOYER_TOKEN="$(jq -r .token ~/.foyer/credentials)" \ -- npx -y @getfoyer/mcp@latest ``` **Why the `jq`?** Reading the token from the file at install time strips any trailing newline. The newline-in-token footgun produces a `-32000` MCP JSON-RPC error that's painful to debug. For other MCP clients, see the [MCP install page](/agents/mcp). Verify: in Claude Code run `/mcp`, look for `foyer` in green. --- [agent navigation] - prev: https://docs.getfoyer.dev/agents - next: https://docs.getfoyer.dev/agents/cli - index: https://docs.getfoyer.dev/llms.txt - human: https://docs.getfoyer.dev/setup