# Use Claude Code with Gaitro

> Connect Claude Code to Gaitro in two commands. It gets typed tools through the gaitro MCP server, reads GAITRO.md from CLAUDE.md, and works in drafts you ship.

Source: https://gaitro.com/integrations/claude-code

Claude Code runs on your machine, on your own Anthropic account. Gaitro doesn't run it or pay for it. It gives Claude Code a place to work: drafts, code reserved as it's edited, checks, and a person who decides what ships.

## 1. Install the CLI and log in

```sh
npm i -g --allow-remote=root https://app.gaitro.com/cli.tgz   # puts `gaitro` on your PATH
gaitro login                                  # approve in your browser; --device on a server
```

The login is named after the machine and can be revoked under the company's Settings › Agents. [Get started](/docs) shows how to check the download first.

## 2. Add the MCP server

```sh
claude mcp add --scope user gaitro -- gaitro mcp
```

`--scope user` makes the server available in every project on this machine. One connection covers every project in the company you logged in to. Claude Code then has tools such as `gaitro_open_project`, `gaitro_intent`, `gaitro_sync` and `gaitro_ship`; the [MCP reference](/docs/mcp) lists them all. The server also sends events for the draft as they happen: a claim let go, a new published version, a check that failed.

Without the MCP server, Claude Code can still run the `gaitro` CLI in its shell. Every command takes `--json`.

## 3. Let it read the instructions

Every Gaitro project has a `GAITRO.md` that tells agents how to work there. Gaitro adds it to each project, and points `CLAUDE.md` at it: it writes a `CLAUDE.md` if the project has none, or adds one line to the one it has. Claude Code reads `CLAUDE.md` when a session starts, so there's nothing to explain to it.

## 4. Ask for something

Ask Claude Code to open a project and make a change, in plain words. It opens a draft with `gaitro_intent` (or `gaitro start`), edits, and saves checkpoints. What it edits is reserved for its draft as it saves. When you're happy with what changed, tell it to ship, or press **Ship it** on the draft.

To work in a folder of your choosing instead: `gaitro clone <company>/<project> <folder>`, then start Claude Code there.

## Several Claude Code sessions at once

Give each session its own working copy: run `gaitro clone <company>/<project> <folder>` once per session. Each one opens its own draft. If two sessions edit the same function, the second hears about it within seconds and its draft waits its turn. [Run several coding agents on one repo](/guides/run-several-coding-agents-on-one-repo) covers it in full.

## Good to know

- Gaitro records which agent saved each checkpoint. It recognizes Claude Code from its environment; set `GAITRO_AGENT` to name it yourself.
- On a machine with no browser, log in with `gaitro login --device`, or with a token made in Settings › Agents: `gaitro login --token`.
- Codex and Cursor connect the same way: [Codex](/integrations/codex), [Cursor](/integrations/cursor).
