npm package: @striderlabs/mcp-gap
Description: MCP server for Gap Inc. — search products, manage cart, track orders, and shop Gap, Old Navy, Banana Republic, and Athleta with AI agents
Author: Strider Labs
Latest version: 0.1.0

# @striderlabs/mcp-gap

MCP (Model Context Protocol) server for Gap Inc. — let AI agents search products, manage your shopping bag, track orders, check rewards, and more across **Gap**, **Old Navy**, **Banana Republic**, and **Athleta**.

Built by [Strider Labs](https://striderlabs.ai).

---

## Features

- **Product Search** — search across all four Gap Inc. brands
- **Product Details** — sizes, colors, fit type, materials, ratings
- **Store Inventory** — check in-store availability near any zip code
- **Cart Management** — add items, view bag with totals
- **Checkout** — guided checkout with Gap Cash instructions
- **Rewards** — check Gap Cash balance, points, and member tier
- **Order Tracking** — status, estimated delivery, tracking numbers
- **Store Finder** — locate stores by zip code with hours and phone
- **Returns** — initiate returns with instructions and prepaid labels
- **Size Guide** — US size charts for tops, bottoms, shoes, and kids

---

## Installation

```bash
npm install -g @striderlabs/mcp-gap
```

Or run directly with npx (no install required):

```bash
npx @striderlabs/mcp-gap
```

---

## MCP Configuration

### Claude Desktop

Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):

```json
{
  "mcpServers": {
    "gap": {
      "command": "npx",
      "args": ["-y", "@striderlabs/mcp-gap"]
    }
  }
}
```

### Claude Code

```json
{
  "mcpServers": {
    "gap": {
      "command": "npx",
      "args": ["-y", "@striderlabs/mcp-gap"],
      "type": "stdio"
    }
  }
}
```

### With a local install

```json
{
  "mcpServers": {
    "gap": {
      "command": "node",
      "args": ["/path/to/node_modules/@striderlabs/mcp-gap/dist/index.js"]
    }
  }
}
```

---

## Authentication

Gap Inc. requires you to log in manually — there is no programmatic login API. Your session is saved automatically after you log in.

1. Ask your AI agent: *"Log me in to Gap"*
2. The agent will use `gap_login` to return a login URL
3. Open the URL in your browser and sign in
4. Your session cookies are saved to `~/.strider/gap/`
5. Verify with: *"Check my Gap login status"*

Sessions persist until they expire or you call `gap_logout`.

---

## Available Tools

### Authentication

| Tool | Description |
|------|-------------|
| `gap_status` | Check login status and session info |
| `gap_login` | Get login URL and instructions |
| `gap_logout` | Log out and clear saved session |

### Shopping

| Tool | Description |
|------|-------------|
| `gap_search` | Search products by keyword and brand |
| `gap_product_details` | Full product info: sizes, colors, fit, materials |
| `gap_store_inventory` | In-store availability by zip code |
| `gap_add_to_cart` | Add item to bag with size and color |
| `gap_view_cart` | View bag contents and totals |
| `gap_checkout` | Checkout instructions and URL |

### Account & Orders

| Tool | Description |
|------|-------------|
| `gap_rewards` | Gap Cash balance, points, member tier |
| `gap_track_order` | Order status, delivery, tracking number |
| `gap_find_stores` | Find stores near a zip code |
| `gap_initiate_return` | Start a return with instructions |
| `gap_size_guide` | Size charts for tops, bottoms, shoes, kids |

---

## Supported Brands

| Brand | Value |
|-------|-------|
| Gap | `"gap"` |
| Old Navy | `"old-navy"` |
| Banana Republic | `"banana-republic"` |
| Athleta | `"athleta"` |

Pass the brand as a parameter to any tool. Defaults to `"gap"` if not specified.

---

## Example Usage

```
"Search for slim fit jeans on Banana Republic"
→ gap_search { query: "slim fit jeans", brand: "banana-republic" }

"Show me the details for this product: [url]"
→ gap_product_details { product_url: "https://..." }

"Add the medium in navy to my bag"
→ gap_add_to_cart { product_url: "...", size: "M", color: "Navy" }

"What's my Gap Cash balance?"
→ gap_rewards {}

"Find Gap stores near 10001"
→ gap_find_stores { zip_code: "10001" }

"Track my order 1234567890"
→ gap_track_order { order_id: "1234567890" }

"Start a return for my order — the jeans don't fit"
→ gap_initiate_return { order_id: "...", item_name: "Slim Jeans", reason: "Wrong size" }

"What size medium in tops means in measurements?"
→ gap_size_guide { category: "tops" }
```

---

## Session Storage

Session data is stored in `~/.strider/gap/`:
- `cookies.json` — browser session cookies
- `session.json` — account metadata (email, rewards info)

---

## Limitations

- **Manual login required** — no programmatic authentication
- **UI changes** — Gap website updates may break automation; open a GitHub issue if you encounter problems
- **CAPTCHAs** — occasional CAPTCHA challenges require manual solving in the browser
- **Checkout** — actual order placement is done in-browser for security; the agent provides the URL and instructions

---

## Development

```bash
git clone https://github.com/striderlabs/mcp-gap
cd mcp-gap
npm install
npm run build
node dist/index.js
```

Type check only:
```bash
npm run typecheck
```

---

## License

MIT — [Strider Labs](https://striderlabs.ai)