@striderlabs/mcp-hm 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,141 @@
1
+ # @striderlabs/mcp-hm
2
+
3
+ H&M fashion retail connector for AI agents via the [Model Context Protocol](https://modelcontextprotocol.io/).
4
+
5
+ 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.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @striderlabs/mcp-hm
11
+ ```
12
+
13
+ Or use directly with `npx`:
14
+ ```bash
15
+ npx @striderlabs/mcp-hm
16
+ ```
17
+
18
+ ## Prerequisites
19
+
20
+ Chrome must be installed on your system (used for browser automation).
21
+
22
+ ## MCP Client Configuration
23
+
24
+ ### Claude Desktop
25
+
26
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
27
+
28
+ ```json
29
+ {
30
+ "mcpServers": {
31
+ "hm": {
32
+ "command": "npx",
33
+ "args": ["-y", "@striderlabs/mcp-hm"]
34
+ }
35
+ }
36
+ }
37
+ ```
38
+
39
+ Or if installed globally:
40
+
41
+ ```json
42
+ {
43
+ "mcpServers": {
44
+ "hm": {
45
+ "command": "striderlabs-mcp-hm"
46
+ }
47
+ }
48
+ }
49
+ ```
50
+
51
+ ### Other MCP clients
52
+
53
+ The server communicates over **stdio** (standard MCP transport). Point your client at the `striderlabs-mcp-hm` binary or `node dist/index.js`.
54
+
55
+ ## Tools
56
+
57
+ | Tool | Description |
58
+ |------|-------------|
59
+ | `hm_status` | Check login status |
60
+ | `hm_login` | Initiate H&M sign-in |
61
+ | `hm_logout` | Sign out and clear session |
62
+ | `hm_search_products` | Search clothing, accessories, home items |
63
+ | `hm_product_details` | Full product info: sizes, colors, materials, fit |
64
+ | `hm_size_guide` | Size guide and measurements by category |
65
+ | `hm_add_to_cart` | Add item to shopping bag |
66
+ | `hm_view_cart` | View bag contents and totals |
67
+ | `hm_checkout` | Start checkout flow |
68
+ | `hm_find_stores` | Find stores near a location |
69
+ | `hm_member_rewards` | View H&M Member points, tier, and vouchers |
70
+ | `hm_track_order` | Track order status and delivery |
71
+ | `hm_view_wishlist` | View saved wishlist items |
72
+ | `hm_add_to_wishlist` | Save a product to wishlist |
73
+ | `hm_browse_sale` | Browse current sale and clearance items |
74
+
75
+ ## Usage Examples
76
+
77
+ ### Search & discover
78
+
79
+ ```
80
+ Search for black slim-fit jeans in men's
81
+ Show me linen shirts under $30
82
+ Find sale items in ladies section sorted by price
83
+ ```
84
+
85
+ ### Product research
86
+
87
+ ```
88
+ Get details for [product URL] including available sizes and materials
89
+ What sizes are available for this item?
90
+ Show me the size guide for women's tops
91
+ ```
92
+
93
+ ### Shopping
94
+
95
+ ```
96
+ Add the Medium in Black to my bag
97
+ Show my shopping bag
98
+ Start checkout
99
+ ```
100
+
101
+ ### Account
102
+
103
+ ```
104
+ Check my H&M Member points balance
105
+ Track my recent orders
106
+ Show my wishlist
107
+ ```
108
+
109
+ ## Authentication
110
+
111
+ H&M sessions are handled via browser cookies:
112
+
113
+ 1. Call `hm_login` — the login page opens in a browser window
114
+ 2. Sign in manually with your H&M account
115
+ 3. Call `hm_status` to confirm — your session is saved to `~/.strider/hm/`
116
+ 4. Future sessions reuse saved cookies automatically
117
+
118
+ **Session data is stored at:**
119
+ ```
120
+ ~/.strider/hm/
121
+ ├── cookies.json # Browser session cookies
122
+ └── session.json # Login metadata
123
+ ```
124
+
125
+ ## Technical Details
126
+
127
+ - **Browser automation**: [Patchright](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright) (stealth-patched Playwright)
128
+ - **Transport**: stdio (MCP standard)
129
+ - **Target**: H&M US (`www2.hm.com/en_us`)
130
+ - **Runtime**: Node.js 18+, Chrome required
131
+
132
+ ## Limitations
133
+
134
+ - Requires Chrome installed locally
135
+ - H&M website changes may affect selector-based scraping
136
+ - Checkout completion requires manual interaction in the browser
137
+ - In-store inventory checks depend on H&M's store finder availability
138
+
139
+ ## By Strider Labs
140
+
141
+ Built by [Strider Labs](https://striderlabs.ai) — personal AI agent infrastructure.