@striderlabs/mcp-bjs 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 +194 -0
- package/dist/index.js +22029 -0
- package/package.json +41 -0
- package/server.json +20 -0
- package/src/auth.ts +81 -0
- package/src/browser.ts +1050 -0
- package/src/index.ts +540 -0
- package/tsconfig.json +14 -0
package/README.md
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# @striderlabs/mcp-bjs
|
|
2
|
+
|
|
3
|
+
BJ's Wholesale Club MCP server for personal AI agents. Search products, manage your cart, check club inventory, find gas prices, manage coupons, and more — all from Claude or any MCP-compatible AI client.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Product search** — Find items with prices, stock status, and member pricing
|
|
8
|
+
- **Product details** — Full specs, descriptions, and pricing for any item
|
|
9
|
+
- **Club inventory** — Check real-time stock at your local BJ's club
|
|
10
|
+
- **Cart management** — Add, view, and remove items; initiate checkout for pickup, delivery, or shipping
|
|
11
|
+
- **Membership** — View membership info and renew
|
|
12
|
+
- **Coupons & offers** — Browse, clip, and track digital coupons
|
|
13
|
+
- **Order history** — View past orders and track shipments
|
|
14
|
+
- **Club finder** — Find BJ's locations near any zip code
|
|
15
|
+
- **Gas prices** — Check current fuel prices at BJ's stations
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @striderlabs/mcp-bjs
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or use directly with `npx`:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx @striderlabs/mcp-bjs
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Install Chromium for browser automation:**
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx patchright install chrome
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## MCP Client Configuration
|
|
36
|
+
|
|
37
|
+
### Claude Desktop
|
|
38
|
+
|
|
39
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"mcpServers": {
|
|
44
|
+
"bjs": {
|
|
45
|
+
"command": "npx",
|
|
46
|
+
"args": ["-y", "@striderlabs/mcp-bjs"]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Generic MCP Client
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"mcpServers": {
|
|
57
|
+
"bjs": {
|
|
58
|
+
"command": "striderlabs-mcp-bjs",
|
|
59
|
+
"transport": "stdio"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Available Tools
|
|
66
|
+
|
|
67
|
+
### Authentication
|
|
68
|
+
|
|
69
|
+
| Tool | Description |
|
|
70
|
+
|------|-------------|
|
|
71
|
+
| `bjs_status` | Check login status and current session |
|
|
72
|
+
| `bjs_login` | Initiate browser login (returns URL for manual sign-in) |
|
|
73
|
+
| `bjs_logout` | Log out and clear saved session |
|
|
74
|
+
|
|
75
|
+
### Products
|
|
76
|
+
|
|
77
|
+
| Tool | Description |
|
|
78
|
+
|------|-------------|
|
|
79
|
+
| `bjs_search` | Search products by keyword with optional club filter |
|
|
80
|
+
| `bjs_product_details` | Full product details and pricing by URL |
|
|
81
|
+
| `bjs_check_inventory` | Check in-stock status at a specific club |
|
|
82
|
+
|
|
83
|
+
### Cart & Checkout
|
|
84
|
+
|
|
85
|
+
| Tool | Description |
|
|
86
|
+
|------|-------------|
|
|
87
|
+
| `bjs_add_to_cart` | Add item to cart by product URL |
|
|
88
|
+
| `bjs_view_cart` | View cart contents with subtotal and total |
|
|
89
|
+
| `bjs_remove_from_cart` | Remove an item from cart by name |
|
|
90
|
+
| `bjs_checkout` | Start checkout: `pickup`, `delivery`, or `ship` |
|
|
91
|
+
|
|
92
|
+
### Membership
|
|
93
|
+
|
|
94
|
+
| Tool | Description |
|
|
95
|
+
|------|-------------|
|
|
96
|
+
| `bjs_membership_info` | Membership number, type, expiry, rewards balance |
|
|
97
|
+
| `bjs_membership_renew` | Navigate to membership renewal page |
|
|
98
|
+
|
|
99
|
+
### Coupons & Offers
|
|
100
|
+
|
|
101
|
+
| Tool | Description |
|
|
102
|
+
|------|-------------|
|
|
103
|
+
| `bjs_coupons` | Browse available digital coupons, optionally by category |
|
|
104
|
+
| `bjs_clip_coupon` | Clip a coupon to your membership card |
|
|
105
|
+
| `bjs_my_coupons` | View all clipped coupons |
|
|
106
|
+
|
|
107
|
+
### Orders
|
|
108
|
+
|
|
109
|
+
| Tool | Description |
|
|
110
|
+
|------|-------------|
|
|
111
|
+
| `bjs_order_history` | View past orders with status and total |
|
|
112
|
+
| `bjs_order_details` | Full order details with items and tracking |
|
|
113
|
+
|
|
114
|
+
### Clubs & Gas
|
|
115
|
+
|
|
116
|
+
| Tool | Description |
|
|
117
|
+
|------|-------------|
|
|
118
|
+
| `bjs_find_clubs` | Find BJ's clubs near a zip code |
|
|
119
|
+
| `bjs_gas_prices` | Current gas prices at BJ's fuel stations |
|
|
120
|
+
|
|
121
|
+
## Usage Examples
|
|
122
|
+
|
|
123
|
+
### Find paper towels near me
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
Search for paper towels at BJ's, then check if the Bounty Select-A-Size is in stock at my nearest club.
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
1. `bjs_find_clubs` → find nearby club IDs
|
|
130
|
+
2. `bjs_search` with `query: "bounty paper towels"` and `clubId`
|
|
131
|
+
3. `bjs_check_inventory` with the product URL and club ID
|
|
132
|
+
|
|
133
|
+
### Shop and checkout for pickup
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
Add 2 packs of Kirkland bottled water to my cart and start in-club pickup checkout.
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
1. `bjs_search` with `query: "bottled water"`
|
|
140
|
+
2. `bjs_add_to_cart` with `quantity: 2`
|
|
141
|
+
3. `bjs_view_cart` to confirm
|
|
142
|
+
4. `bjs_checkout` with `fulfillmentType: "pickup"`
|
|
143
|
+
|
|
144
|
+
### Find the cheapest gas
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
What are the gas prices at BJ's stations near 07001?
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
1. `bjs_gas_prices` with `zipCode: "07001"`
|
|
151
|
+
|
|
152
|
+
### Clip all grocery coupons
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
Clip all available grocery coupons to my BJ's card.
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
1. `bjs_coupons` with `category: "grocery"`
|
|
159
|
+
2. Loop through results calling `bjs_clip_coupon` for each unclipped coupon
|
|
160
|
+
|
|
161
|
+
## Authentication
|
|
162
|
+
|
|
163
|
+
BJ's requires manual sign-in on first use:
|
|
164
|
+
|
|
165
|
+
1. Call `bjs_login` — the server opens a browser and returns the login URL
|
|
166
|
+
2. Complete sign-in (enter email, password, handle 2FA if prompted)
|
|
167
|
+
3. Call `bjs_status` to confirm the session is active
|
|
168
|
+
4. Session cookies are saved to `~/.strider/bjs/` and reused automatically
|
|
169
|
+
|
|
170
|
+
## Configuration
|
|
171
|
+
|
|
172
|
+
Session data is stored at `~/.strider/bjs/`:
|
|
173
|
+
- `cookies.json` — Browser session cookies (auto-refreshed)
|
|
174
|
+
- `session.json` — Membership info cache
|
|
175
|
+
|
|
176
|
+
## Development
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
git clone https://github.com/striderlabs/mcp-bjs
|
|
180
|
+
cd mcp-bjs
|
|
181
|
+
npm install
|
|
182
|
+
npm run build
|
|
183
|
+
npm start
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Links
|
|
187
|
+
|
|
188
|
+
- [MCP Protocol](https://modelcontextprotocol.io)
|
|
189
|
+
- [BJ's Wholesale Club](https://www.bjs.com)
|
|
190
|
+
- [Report Issues](https://github.com/striderlabs/mcp-bjs/issues)
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
By [Strider Labs](https://github.com/striderlabs) — MIT License
|