npm package: @striderlabs/mcp-hm
Description: MCP server for H&M - let AI agents search fashion products, manage cart, track orders, browse sales, and more
Author: Strider Labs
Latest version: 0.1.0

# @striderlabs/mcp-hm

H&M fashion retail connector for AI agents via the [Model Context Protocol](https://modelcontextprotocol.io/).

Enables AI assistants to search H&M products, manage your shopping bag, track orders, browse sales, check rewards, and more — all without leaving your chat interface.

## Install

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

Or use directly with `npx`:
```bash
npx @striderlabs/mcp-hm
```

## Prerequisites

Chrome must be installed on your system (used for browser automation).

## MCP Client Configuration

### Claude Desktop

Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:

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

Or if installed globally:

```json
{
  "mcpServers": {
    "hm": {
      "command": "striderlabs-mcp-hm"
    }
  }
}
```

### Other MCP clients

The server communicates over **stdio** (standard MCP transport). Point your client at the `striderlabs-mcp-hm` binary or `node dist/index.js`.

## Tools

| Tool | Description |
|------|-------------|
| `hm_status` | Check login status |
| `hm_login` | Initiate H&M sign-in |
| `hm_logout` | Sign out and clear session |
| `hm_search_products` | Search clothing, accessories, home items |
| `hm_product_details` | Full product info: sizes, colors, materials, fit |
| `hm_size_guide` | Size guide and measurements by category |
| `hm_add_to_cart` | Add item to shopping bag |
| `hm_view_cart` | View bag contents and totals |
| `hm_checkout` | Start checkout flow |
| `hm_find_stores` | Find stores near a location |
| `hm_member_rewards` | View H&M Member points, tier, and vouchers |
| `hm_track_order` | Track order status and delivery |
| `hm_view_wishlist` | View saved wishlist items |
| `hm_add_to_wishlist` | Save a product to wishlist |
| `hm_browse_sale` | Browse current sale and clearance items |

## Usage Examples

### Search & discover

```
Search for black slim-fit jeans in men's
Show me linen shirts under $30
Find sale items in ladies section sorted by price
```

### Product research

```
Get details for [product URL] including available sizes and materials
What sizes are available for this item?
Show me the size guide for women's tops
```

### Shopping

```
Add the Medium in Black to my bag
Show my shopping bag
Start checkout
```

### Account

```
Check my H&M Member points balance
Track my recent orders
Show my wishlist
```

## Authentication

H&M sessions are handled via browser cookies:

1. Call `hm_login` — the login page opens in a browser window
2. Sign in manually with your H&M account
3. Call `hm_status` to confirm — your session is saved to `~/.strider/hm/`
4. Future sessions reuse saved cookies automatically

**Session data is stored at:**
```
~/.strider/hm/
├── cookies.json    # Browser session cookies
└── session.json    # Login metadata
```

## Technical Details

- **Browser automation**: [Patchright](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright) (stealth-patched Playwright)
- **Transport**: stdio (MCP standard)
- **Target**: H&M US (`www2.hm.com/en_us`)
- **Runtime**: Node.js 18+, Chrome required

## Limitations

- Requires Chrome installed locally
- H&M website changes may affect selector-based scraping
- Checkout completion requires manual interaction in the browser
- In-store inventory checks depend on H&M's store finder availability

## By Strider Labs

Built by [Strider Labs](https://striderlabs.ai) — personal AI agent infrastructure.