## Overview

GT MCP allows AI agents to automatically create stacked PRs, breaking down large AI-generated changes into smaller, reviewable stacked pull requests.

- With large AI-generated diffs, stacking is more essential than ever. Just like reviewing large human PRs, reviewing massive AI-generated diffs can be overwhelming, and makes it hard to understand what changes your agent has made.
- Stacking breaks AI output into clear, sequential chunks, so you can understand what’s changing and why—earlier, faster, and in order. It helps your agent reason through changes chronologically, validating each step as it goes.

## Installation

GT MCP is built into the [Graphite CLI](/content/docs/install-the-cli/index.html)!  
Your `gt` CLI’s version must be `1.6.7` or higher to use GT MCP. See how to update your CLI [here](/content/docs/update-cli/index.html).

## Setup

### Cursor

[Install in Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=Graphite&config=eyJjb21tYW5kIjoiZ3QiLCJhcmdzIjpbIm1jcCJdfQ%3D%3D)  
Or, to add it manually:

1. Open **Cursor Settings** → **Tools & Integrations** → **Add Custom MCP**
2. Paste:

```
{
  "mcpServers": {
    "graphite": {
      "command": "gt",
      "args": ["mcp"]
    }
  }
}
```

### Claude Code

Terminal

```
claude mcp add graphite gt mcp
```
