claude-chrome-parallel 3.0.0 → 3.0.2

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.
Files changed (3) hide show
  1. package/README.md +271 -456
  2. package/assets/demo.svg +183 -0
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -1,596 +1,406 @@
1
1
  # Claude Chrome Parallel
2
2
 
3
- > **Run multiple Claude Code browser sessions in parallel - no more "Detached" errors.**
3
+ > **Run 20+ Claude Code browser sessions simultaneously, without conflicts.**
4
4
 
5
5
  [![npm version](https://badge.fury.io/js/claude-chrome-parallel.svg)](https://www.npmjs.com/package/claude-chrome-parallel)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
7
 
8
- ## The Power of Authenticated Browser Sessions
9
-
10
- Unlike traditional web scraping or automation tools, Claude Chrome Parallel operates within **your already logged-in Chrome browser**. This means:
11
-
12
- - **Access authenticated services** - Gmail, Salesforce, LinkedIn, banking portals, admin dashboards
13
- - **No credential management** - Session cookies and OAuth tokens are already active
14
- - **Bypass bot detection** - Uses your real browser profile, not headless automation
15
- - **Access personalized data** - Dashboards, account settings, member-only content
16
-
17
- **This is not just a development tool.** While the parallel session feature solves a technical problem for developers, the real power lies in automating *any* web task that requires authentication - tasks that were previously impossible to automate without building complex auth flows.
8
+ <p align="center">
9
+ <img src="https://raw.githubusercontent.com/shaun0927/claude-chrome-parallel/main/assets/demo.svg" alt="Chrome Extension vs Claude Chrome Parallel - Animated comparison showing how Chrome Extension fails with 'Detached' error while Claude Chrome Parallel runs 5+ sessions simultaneously" width="100%">
10
+ </p>
18
11
 
19
12
  ---
20
13
 
21
- ## Why This Exists
22
-
23
- [Claude Chrome](https://claude.ai/chrome) lets you debug **production environments while logged in**. But when you try to run multiple Claude Code sessions with browser automation simultaneously:
24
-
25
- ```
26
- Error: Detached while handling command
27
- ```
28
-
29
- This happens because the Chrome extension uses **shared internal state**. When Session A takes a screenshot, Session B's connection gets "detached."
30
-
31
- **Claude Chrome Parallel** solves this by creating **independent CDP connections** for each session:
32
-
33
14
  ```
34
- Claude Code 1 ──► Process 1 ──► CDP Connection 1 ──┐
35
- ├──► Chrome (port 9222)
36
- Claude Code 2 ──► Process 2 ──► CDP Connection 2 ──┘
15
+ ┌─────────────────────────────────────────────────────────────────────────────┐
16
+ │ │
17
+ Claude Code 1 ─► Worker A ─► [Tab1] [Tab2] ─┐ │
18
+ │ (Google account) │ │
19
+ │ │ │
20
+ │ Claude Code 2 ─► Worker B ─► [Tab3] [Tab4] ─┼─► Chrome (single instance) │
21
+ │ (Naver account) │ Port 9222 │
22
+ │ │ │
23
+ │ Claude Code 3 ─► Worker C ─► [Tab5] [Tab6] ─┘ │
24
+ │ (Amazon account) │
25
+ │ │
26
+ │ ✓ Each Worker has isolated cookies/session/storage │
27
+ │ ✓ No more "Detached" errors with concurrent sessions │
28
+ │ ✓ Multiple account logins on same site simultaneously │
29
+ │ │
30
+ └─────────────────────────────────────────────────────────────────────────────┘
37
31
  ```
38
32
 
39
- Each session gets isolated browser control. No shared state = No conflicts.
40
-
41
33
  ---
42
34
 
43
- ## Use Cases
44
-
45
- ### Beyond Development: Real-World Automation
46
-
47
- The combination of **authenticated sessions** + **natural language control** + **parallel execution** enables automation scenarios that were previously impractical:
35
+ ## Core Features
48
36
 
49
- ---
37
+ <table>
38
+ <tr>
39
+ <td width="33%" valign="top">
50
40
 
51
- ### 1. Business Process Automation
41
+ ### 🔀 Worker Isolation
52
42
 
53
- #### ERP/SaaS Dashboard Data Collection
54
- Extract reports from login-required services (Salesforce, HubSpot, Zendesk):
43
+ Each Worker has a **completely isolated browser context**.
55
44
 
56
- ```
57
- You: Navigate to our Salesforce dashboard and extract this month's sales pipeline data
45
+ - Separate cookies/sessions
46
+ - Separate localStorage
47
+ - Separate login states
58
48
 
59
- Claude: [Navigates to authenticated Salesforce, parses tables, extracts structured data]
60
- ```
49
+ **Log into multiple accounts on the same site simultaneously!**
61
50
 
62
- #### Invoice & Receipt Collection
63
- Automatically download monthly invoices from multiple services:
51
+ </td>
52
+ <td width="33%" valign="top">
64
53
 
65
- ```
66
- You: Go to AWS billing console and download last month's invoice PDF
67
-
68
- Claude: [Navigates to authenticated AWS console, finds invoice, triggers download]
69
- ```
54
+ ### ⚡ Parallel Execution
70
55
 
71
- #### Repetitive Admin Tasks
72
- Process approvals, submit forms, update records:
56
+ Run tasks across multiple tabs/Workers **at the same time**.
73
57
 
74
58
  ```
75
- You: Go to our HR portal and approve all pending time-off requests from my team
59
+ Sequential: 1500ms
60
+ Tab1 ████░░░░ 500ms
61
+ Tab2 ████░░░░ 500ms
62
+ Tab3 ████░░░░ 500ms
76
63
 
77
- Claude: [Navigates to HR system, finds pending items, processes each approval]
64
+ Parallel: 500ms
65
+ Tab1 ████░░░░
66
+ Tab2 ████░░░░
67
+ Tab3 ████░░░░
78
68
  ```
79
69
 
80
- ---
81
-
82
- ### 2. Research & Data Collection
83
-
84
- #### Competitive Analysis (Login-Required Platforms)
85
- Gather intelligence from premium platforms:
70
+ </td>
71
+ <td width="33%" valign="top">
86
72
 
87
- ```
88
- You: Search LinkedIn Sales Navigator for CTOs at fintech startups in NYC and list their profiles
89
-
90
- Claude: [Uses your LinkedIn Premium session to search and extract profile data]
91
- ```
73
+ ### 🔄 Workflow Orchestration
92
74
 
93
- #### Academic Database Research
94
- Access institutional databases that require authentication:
75
+ **Automatically distribute** complex multi-site tasks.
95
76
 
96
77
  ```
97
- You: Search IEEE Xplore for papers on "transformer architecture" from 2023 and list titles with citations
98
-
99
- Claude: [Uses your university library login to search and extract paper metadata]
100
- ```
101
-
102
- #### Financial & Real Estate Data
103
- Access member-only pricing and transaction data:
104
-
78
+ workflow_init({
79
+ workers: [
80
+ {name: "amazon", ...},
81
+ {name: "ebay", ...},
82
+ {name: "walmart", ...}
83
+ ]
84
+ })
85
+ → 3 sites run in parallel
86
+ → Results auto-collected
105
87
  ```
106
- You: Check my Schwab portfolio and summarize today's gains/losses by sector
107
88
 
108
- Claude: [Navigates authenticated brokerage account, extracts and analyzes positions]
109
- ```
89
+ </td>
90
+ </tr>
91
+ </table>
110
92
 
111
93
  ---
112
94
 
113
- ### 3. Social Media Management
114
-
115
- #### Multi-Account Content Publishing
116
- Post content across platforms:
117
-
118
- ```
119
- You: Post this announcement to our company LinkedIn, Twitter, and Facebook pages
120
-
121
- Claude: [Navigates to each platform with saved sessions, composes and publishes posts]
122
- ```
123
-
124
- #### Message & Inquiry Management
125
- Handle customer messages with templates:
126
-
127
- ```
128
- You: Check our Instagram business inbox and reply to product inquiries with our standard response
129
-
130
- Claude: [Reads DMs, identifies product questions, sends templated responses]
131
- ```
132
-
133
- #### Analytics Collection
134
- Gather engagement metrics across platforms:
135
-
136
- ```
137
- You: Get our Twitter analytics for the past week and summarize engagement trends
95
+ ## Comparison
138
96
 
139
- Claude: [Accesses Twitter Analytics dashboard, extracts metrics, provides summary]
140
- ```
97
+ | | Chrome Extension | Claude Chrome Parallel |
98
+ |---|:---:|:---:|
99
+ | **Concurrent Sessions** | ❌ 1 (Detached error) | ✅ **20+** |
100
+ | **Worker Isolation** | ❌ | ✅ Isolated cookies/sessions |
101
+ | **Multi-account Login** | ❌ | ✅ |
102
+ | **Parallel Execution** | ❌ | ✅ |
103
+ | **Network Simulation** | ❌ | ✅ 3G/4G/offline |
104
+ | **Workflow Orchestration** | ❌ | ✅ |
105
+ | **Auto Chrome Launch** | ❌ | ✅ |
141
106
 
142
107
  ---
143
108
 
144
- ### 4. E-Commerce Automation
145
-
146
- #### Member Price Monitoring
147
- Track prices that require membership login:
148
-
149
- ```
150
- You: Check the member price for this Costco item and compare with last week
151
-
152
- Claude: [Logs into Costco account, finds item, extracts member-only pricing]
153
- ```
154
-
155
- #### Inventory & Order Management
156
- Manage seller accounts across marketplaces:
109
+ ## Why It Matters
157
110
 
158
- ```
159
- You: Check our Amazon Seller Central for any new orders and list items running low on inventory
160
-
161
- Claude: [Navigates seller dashboard, extracts order and inventory data]
162
- ```
111
+ ### The Problem
163
112
 
164
- #### Review Management
165
- Respond to customer reviews at scale:
113
+ The official Chrome extension has a fatal flaw: **shared internal state**.
166
114
 
167
115
  ```
168
- You: Find all unanswered 4-star reviews on our Shopify store and draft personalized thank-you responses
169
-
170
- Claude: [Navigates store admin, identifies reviews, generates contextual responses]
116
+ Claude Code 1 ─┐
117
+ ├─► Chrome Extension (shared state) ─► "Detached" error!
118
+ Claude Code 2 ─┘
171
119
  ```
172
120
 
173
- ---
121
+ When Session A takes a screenshot, Session B's connection breaks. You can only run **one session at a time**.
174
122
 
175
- ### 5. Personal Productivity
123
+ ### The Solution
176
124
 
177
- #### Email Organization
178
- Manage your inbox intelligently:
125
+ Claude Chrome Parallel creates **independent CDP connections** per session:
179
126
 
180
127
  ```
181
- You: In Gmail, find all newsletters from the past month and add the "Newsletters" label
128
+ Claude Code 1 ─► CDP Connection 1 ─┐
129
+ ├─► Chrome (port 9222)
130
+ Claude Code 2 ─► CDP Connection 2 ─┘
182
131
 
183
- Claude: [Searches Gmail, selects matching emails, applies labels]
132
+ No shared state = No conflicts = 20+ concurrent sessions
184
133
  ```
185
134
 
186
- #### Calendar Management
187
- Bulk calendar operations:
135
+ ### The Real Power: Authenticated Sessions
188
136
 
189
- ```
190
- You: Add these 5 meetings to my Google Calendar with the details from this spreadsheet
137
+ Unlike headless automation, this runs in **your actual browser** with all your logins active:
191
138
 
192
- Claude: [Creates each calendar event with proper dates, times, and descriptions]
193
- ```
139
+ - Access Gmail, Salesforce, LinkedIn while logged in
140
+ - ✅ No credential management or auth flows needed
141
+ - ✅ Bypass bot detection (real browser profile)
142
+ - ✅ Multiple accounts simultaneously (Worker isolation)
194
143
 
195
- #### Bookmark & Archive Management
196
- Organize saved content:
197
-
198
- ```
199
- You: Save this article to my Notion reading list with its title and summary
200
-
201
- Claude: [Extracts metadata, navigates to Notion, creates database entry]
202
- ```
144
+ **This isn't just for developers.** Any web task requiring authentication—previously impossible to automate—is now possible with natural language.
203
145
 
204
146
  ---
205
147
 
206
- ### 6. QA & Testing
148
+ ## Quick Start (2 minutes)
207
149
 
208
- #### Multi-Session QA Testing
209
- Run parallel test scenarios against production:
150
+ ### 1. Install
210
151
 
211
152
  ```bash
212
- # Terminal 1: Test user login flow
213
- claude -p "Test the login flow on https://myapp.com/login"
214
-
215
- # Terminal 2: Test checkout process (simultaneously!)
216
- claude -p "Test the checkout flow on https://myapp.com/cart"
217
-
218
- # Terminal 3: Monitor admin dashboard
219
- claude -p "Take screenshots of https://myapp.com/admin every 30 seconds"
153
+ npm install -g claude-chrome-parallel
220
154
  ```
221
155
 
222
- #### Network Condition Testing
223
- Test performance under various network conditions:
156
+ ### 2. Configure Claude Code
224
157
 
225
- ```
226
- You: Simulate 3G network and test if our checkout page loads within 5 seconds
158
+ Add to `~/.claude.json`:
227
159
 
228
- Claude: [Applies network throttling, measures load time, reports results]
160
+ ```json
161
+ {
162
+ "mcpServers": {
163
+ "chrome-parallel": {
164
+ "command": "ccp",
165
+ "args": ["serve"]
166
+ }
167
+ }
168
+ }
229
169
  ```
230
170
 
231
- #### Accessibility Auditing
232
- Analyze page accessibility via the accessibility tree:
171
+ ### 3. Restart Claude Code and use
233
172
 
234
173
  ```
235
- You: Check the accessibility tree of our signup form and identify any missing labels
174
+ You: Take a screenshot of https://github.com
236
175
 
237
- Claude: [Parses full accessibility tree, identifies WCAG compliance issues]
176
+ Claude: [Auto-launches browser, captures screenshot]
238
177
  ```
239
178
 
179
+ > **Tip:** `ccp` is a shorthand for `claude-chrome-parallel`.
180
+
240
181
  ---
241
182
 
242
- ### 7. Security & Compliance
183
+ ## Usage Examples
243
184
 
244
- #### Personal Data Audit
245
- Check what data services have stored:
185
+ ### Multiple Accounts Simultaneously
246
186
 
247
187
  ```
248
- You: Navigate to my Google Account privacy settings and list all third-party apps with access
188
+ You: Create "google-personal" and "google-work" Workers,
189
+ then check the inbox of each Gmail account
249
190
 
250
- Claude: [Navigates account settings, extracts connected app list]
191
+ Claude: [Creates 2 Workers Each accesses Gmail with isolated sessions]
192
+ google-personal: Personal account - 3 new emails
193
+ google-work: Work account - 7 new emails
251
194
  ```
252
195
 
253
- #### Session Verification
254
- Verify active sessions across services:
196
+ ### Price Comparison (Parallel)
255
197
 
256
198
  ```
257
- You: Check my GitHub security settings and list all active sessions
199
+ You: Search for "iPhone 15" lowest price on Amazon, eBay, and Walmart simultaneously
258
200
 
259
- Claude: [Navigates GitHub settings, extracts session information]
201
+ Claude: [3 sites run in parallel]
202
+ Amazon: $999 (1.2s)
203
+ eBay: $945 (1.1s)
204
+ Walmart: $979 (1.3s)
205
+ Total time: 1.3s (vs 3.6s sequential)
260
206
  ```
261
207
 
262
- ---
263
-
264
- ## Core Features
265
-
266
- ### Isolated Workers (Parallel Browser Contexts)
267
-
268
- The killer feature of Claude Chrome Parallel is **worker isolation**. Each worker has:
269
-
270
- - **Separate browser context** with its own cookies, localStorage, and sessionStorage
271
- - **Independent tab management** - tabs are scoped to their worker
272
- - **Complete state isolation** - one worker's login doesn't affect another
273
-
274
- ```
275
- You: Create a worker named "google-shopping"
208
+ ### Parallel QA Testing
276
209
 
277
- Claude: [Creates isolated browser context]
278
- Worker: google-shopping
279
- Context: Isolated (separate cookies/storage)
210
+ ```bash
211
+ # Terminal 1
212
+ claude -p "Test myapp.com/login"
280
213
 
281
- You: In google-shopping worker, search for laptops
214
+ # Terminal 2 (at the same time!)
215
+ claude -p "Test myapp.com/checkout"
282
216
 
283
- Claude: [Opens tab in google-shopping worker context]
284
- Any login, preferences, or state is isolated to this worker
217
+ # Terminal 3 (at the same time!)
218
+ claude -p "Monitor myapp.com/admin"
285
219
  ```
286
220
 
287
- **Why This Matters:**
288
- - Log into different accounts simultaneously (e.g., multiple Gmail accounts)
289
- - Run parallel price comparisons without cookie conflicts
290
- - Test multi-user scenarios with complete isolation
221
+ ---
291
222
 
292
- ### Automatic Task Distribution
223
+ ## Chrome-Sisyphus: Orchestration Skill
293
224
 
294
- When you have multiple tabs open, operations are automatically distributed:
225
+ For complex multi-site workflows, use the built-in **Chrome-Sisyphus** skill system.
295
226
 
296
227
  ```
297
- You: Take screenshots of all open tabs
298
-
299
- Claude: [Parallel execution across all tabs]
300
- Tab 1: Screenshot taken (500ms)
301
- Tab 2: Screenshot taken (480ms)
302
- Tab 3: Screenshot taken (520ms)
303
- Total: ~500ms (parallel) vs ~1500ms (sequential)
228
+ ┌─────────────────────────────────────────────────────────────────┐
229
+ │ /chrome-sisyphus "Compare iPhone prices on Amazon, eBay, Walmart"
230
+ │ ↓
231
+ │ ┌──────────────────────────────────────────────────────────┐
232
+ │ │ ORCHESTRATOR (Main Session)
233
+ │ │ • Decompose task 3 workers │
234
+ │ │ • Allocate sites Amazon, eBay, Walmart │
235
+ │ │ • Context usage: ~500 tokens (lightweight!) │
236
+ │ └──────────────────────────────────────────────────────────┘
237
+ │ ↓
238
+ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
239
+ │ │ Worker 1 │ │ Worker 2 │ │ Worker 3 │
240
+ │ │ (Amazon) │ │ (eBay) │ │ (Walmart) │
241
+ │ │ Background │ │ Background │ │ Background │
242
+ │ │ Task │ │ Task │ │ Task │
243
+ │ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘
244
+ │ ↓ ↓ ↓
245
+ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
246
+ │ │ Scratchpad │ │ Scratchpad │ │ Scratchpad │
247
+ │ │ worker-1.md │ │ worker-2.md │ │ worker-3.md │
248
+ │ └─────────────┘ └─────────────┘ └─────────────┘
249
+ │ ↓
250
+ │ Results collected → Unified report to user
251
+ └─────────────────────────────────────────────────────────────────┘
304
252
  ```
305
253
 
306
- ### Workflow Orchestration
307
-
308
- For complex multi-site operations, use the orchestration tools:
254
+ ### Why This Matters: Context Isolation
309
255
 
310
- ```typescript
311
- // Initialize a parallel workflow
312
- workflow_init({
313
- name: "Price Comparison",
314
- workers: [
315
- { name: "amazon", url: "https://amazon.com", task: "Search iPhone 15 price" },
316
- { name: "ebay", url: "https://ebay.com", task: "Search iPhone 15 price" },
317
- { name: "walmart", url: "https://walmart.com", task: "Search iPhone 15 price" }
318
- ]
319
- })
320
-
321
- // Each worker executes in parallel with isolated contexts
322
- // Results are collected via workflow_collect
256
+ **Without isolation** (traditional approach):
323
257
  ```
324
-
325
- ---
326
-
327
- ## Available MCP Tools
328
-
329
- ### Browser Automation Tools
330
-
331
- | Tool | Description | Key Use Cases |
332
- |------|-------------|---------------|
333
- | `navigate` | Navigate to URL, back/forward history | Multi-page workflows |
334
- | `computer` | Screenshots, mouse clicks, keyboard, scrolling | Non-standard UI interaction |
335
- | `read_page` | Parse page via accessibility tree | Dynamic content extraction |
336
- | `find` | Find elements by natural language | "search box", "submit button" |
337
- | `form_input` | Set form values directly | Fast data entry |
338
- | `javascript_tool` | Execute arbitrary JavaScript | Complex DOM operations |
339
- | `network` | Simulate network conditions | Performance testing |
340
-
341
- ### Tab & Worker Management Tools
342
-
343
- | Tool | Description | Key Use Cases |
344
- |------|-------------|---------------|
345
- | `tabs_context_mcp` | Get available tabs by worker | Session overview |
346
- | `tabs_create_mcp` | Create new tab in worker | Parallel tab operations |
347
- | `worker_create` | Create isolated browser context | Multi-account scenarios |
348
- | `worker_list` | List all workers and their tabs | Session management |
349
- | `worker_delete` | Delete worker and close its tabs | Cleanup |
350
-
351
- ### Orchestration Tools
352
-
353
- | Tool | Description | Key Use Cases |
354
- |------|-------------|---------------|
355
- | `workflow_init` | Initialize multi-worker workflow | Parallel site operations |
356
- | `workflow_status` | Get orchestration progress | Monitoring |
357
- | `workflow_collect` | Collect results from workers | Data aggregation |
358
- | `workflow_cleanup` | Clean up workflow resources | Session cleanup |
359
- | `worker_update` | Update worker progress | Progress tracking |
360
- | `worker_complete` | Mark worker as complete | Workflow completion |
361
-
362
- ---
363
-
364
- ## Tested Concurrency
365
-
366
- | Sessions | Success Rate |
367
- |----------|-------------|
368
- | 5 | 100% |
369
- | 10 | 100% |
370
- | 15 | 100% |
371
- | 20 | 100% |
372
-
373
- ---
374
-
375
- ## Installation
376
-
377
- ```bash
378
- # From npm
379
- npm install -g claude-chrome-parallel
380
-
381
- # Or from GitHub
382
- npm install -g github:shaun0927/claude-chrome-parallel
258
+ Main Session Context:
259
+ ├── Worker 1 screenshot (500KB) ─┐
260
+ ├── Worker 1 DOM tree (large) │
261
+ ├── Worker 2 screenshot (500KB) ├─► Context explosion!
262
+ ├── Worker 2 DOM tree (large) │
263
+ └── Worker 3 ... (keeps growing) ─┘
383
264
  ```
384
265
 
385
- ### Configure Claude Code
386
-
387
- Add to your Claude Code MCP settings (`~/.claude.json`):
388
-
389
- ```json
390
- {
391
- "mcpServers": {
392
- "chrome-parallel": {
393
- "command": "ccp",
394
- "args": ["serve"]
395
- }
396
- }
397
- }
266
+ **With Chrome-Sisyphus**:
398
267
  ```
268
+ Main Session: ~500 tokens (stays light)
269
+ ├── Task plan
270
+ ├── Worker IDs
271
+ └── Status summary only
399
272
 
400
- > **Note:** `ccp` is a shorthand alias. You can also use the full name `claude-chrome-parallel`.
401
-
402
- Restart Claude Code for changes to take effect.
403
-
404
- ---
405
-
406
- ## Usage
407
-
408
- ### Basic Usage
409
-
410
- Once configured, browser automation works in any Claude Code session:
273
+ Background Tasks: (isolated, don't pollute main)
274
+ ├── Worker 1: own context, own screenshots
275
+ ├── Worker 2: own context, own screenshots
276
+ └── Worker 3: own context, own screenshots
411
277
 
412
- ```
413
- You: Take a screenshot of https://github.com
414
-
415
- Claude: [Uses chrome-parallel tools automatically]
278
+ Scratchpad Files: (persistent state)
279
+ └── .agent/chrome-sisyphus/*.md
416
280
  ```
417
281
 
418
- ### Multiple Parallel Sessions
282
+ ### Usage
419
283
 
420
- Run multiple Claude Code terminals simultaneously:
284
+ Copy the `.claude/` folder to your project:
421
285
 
422
286
  ```bash
423
- # Terminal 1
424
- claude
425
- > Navigate to myapp.com/dashboard and take a screenshot
426
-
427
- # Terminal 2 (at the same time!)
428
- claude
429
- > Fill out the form on myapp.com/contact and submit
430
-
431
- # Terminal 3 (also at the same time!)
432
- claude
433
- > Monitor network requests on myapp.com/api
287
+ cp -r node_modules/claude-chrome-parallel/.claude ~/.claude/
288
+ # Or copy to your project root
434
289
  ```
435
290
 
436
- All sessions work without conflicts!
291
+ Then use in Claude Code:
437
292
 
438
- ### Network Simulation
293
+ ```
294
+ /chrome-sisyphus Compare laptop prices on Amazon, BestBuy, and Newegg
295
+ ```
439
296
 
440
- Test how your app behaves under different network conditions:
297
+ ### Skill Files
441
298
 
442
299
  ```
443
- You: Simulate 3G network and navigate to myapp.com
444
-
445
- Claude: [Applies 3G throttling: 1.5Mbps down, 750Kbps up, 100ms latency]
300
+ .claude/
301
+ ├── commands/
302
+ │ └── chrome-sisyphus.md # /chrome-sisyphus command
303
+ └── skills/
304
+ └── chrome-sisyphus/
305
+ ├── SKILL.md # Skill overview
306
+ ├── AGENTS.md # Agent specifications
307
+ └── agents/
308
+ ├── decomposer.md # Task decomposition
309
+ ├── worker-agent.md # Worker execution (Ralph Loop)
310
+ └── coordinator.md # Result integration
446
311
  ```
447
312
 
448
- Available presets: `offline`, `slow-2g`, `2g`, `3g`, `4g`, `fast-wifi`, `custom`, `clear`
449
-
450
313
  ---
451
314
 
452
- ## How It Works
315
+ ## MCP Tools
453
316
 
454
- ### The Problem: Shared Extension State
317
+ ### Browser Automation
455
318
 
456
- The official Chrome extension maintains a single shared state:
319
+ | Tool | Description |
320
+ |------|-------------|
321
+ | `navigate` | Go to URL, back/forward |
322
+ | `computer` | Screenshot, click, keyboard, scroll |
323
+ | `read_page` | Parse page structure (accessibility tree) |
324
+ | `find` | Find elements by natural language |
325
+ | `form_input` | Set form values directly |
326
+ | `javascript_tool` | Execute JavaScript |
327
+ | `network` | Simulate network conditions |
457
328
 
458
- ```
459
- Claude Code 1 ─┐
460
- ├─► Chrome Extension (shared state) ─► Chrome
461
- Claude Code 2 ─┘
462
-
463
- State conflicts here!
464
- ```
329
+ ### Worker & Tab Management
465
330
 
466
- ### The Solution: Independent CDP Connections
467
-
468
- Chrome's DevTools Protocol natively supports multiple simultaneous connections:
469
-
470
- ```
471
- Claude Code 1 ─► Process 1 ─► CDP Connection 1 ─┐
472
- ├─► Chrome (port 9222)
473
- Claude Code 2 ─► Process 2 ─► CDP Connection 2 ─┘
331
+ | Tool | Description |
332
+ |------|-------------|
333
+ | `worker_create` | Create isolated browser context |
334
+ | `worker_list` | List Workers and their tabs |
335
+ | `worker_delete` | Delete Worker |
336
+ | `tabs_create_mcp` | Create new tab |
337
+ | `tabs_context_mcp` | Get tab info |
474
338
 
475
- Independent connections, no shared state!
476
- ```
339
+ ### Workflow Orchestration
477
340
 
478
- Each Claude Code session spawns its own MCP server process with a dedicated CDP connection.
341
+ | Tool | Description |
342
+ |------|-------------|
343
+ | `workflow_init` | Initialize parallel workflow |
344
+ | `workflow_status` | Check progress |
345
+ | `workflow_collect` | Collect results |
346
+ | `workflow_cleanup` | Clean up resources |
479
347
 
480
348
  ---
481
349
 
482
350
  ## CLI Commands
483
351
 
484
- > **Tip:** Use `ccp` as a shorthand for `claude-chrome-parallel` in all commands below.
485
-
486
352
  ```bash
487
- # Start MCP server (used by Claude Code automatically)
488
- ccp serve
489
-
490
- # Check Chrome connection status
491
- ccp check
492
-
493
- # Use custom Chrome debugging port
494
- ccp serve --port 9223
495
-
496
- # Check installation health
497
- ccp doctor
498
-
499
- # View session status and statistics
500
- ccp status
501
-
502
- # View status as JSON (for automation)
503
- ccp status --json
504
-
505
- # Clean up stale sessions and old backups
506
- ccp cleanup --max-age 24 --keep-backups 10
353
+ ccp serve # Start MCP server (auto-run by Claude Code)
354
+ ccp check # Check Chrome connection
355
+ ccp status # View session status
356
+ ccp status --json # JSON output
357
+ ccp doctor # Diagnose installation
358
+ ccp cleanup # Clean up old sessions
359
+ ccp serve --port 9223 # Use custom port
507
360
  ```
508
361
 
509
362
  ---
510
363
 
511
- ## Chrome Configuration
512
-
513
- By default, connects to Chrome on port 9222.
514
-
515
- **Auto-launch**: If Chrome isn't running with debugging enabled, the package will start it automatically.
516
-
517
- **Manual start** (if needed):
364
+ ## Performance
518
365
 
519
- ```bash
520
- # Windows
521
- chrome.exe --remote-debugging-port=9222
522
-
523
- # macOS
524
- /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
525
-
526
- # Linux
527
- google-chrome --remote-debugging-port=9222
528
- ```
366
+ | Concurrent Sessions | Success Rate |
367
+ |:---:|:---:|
368
+ | 5 | 100% |
369
+ | 10 | 100% |
370
+ | 15 | 100% |
371
+ | 20 | 100% |
529
372
 
530
373
  ---
531
374
 
532
375
  ## Additional Features
533
376
 
534
- ### Session Isolation (Bonus)
535
-
536
- When running multiple Claude Code instances, they can corrupt `~/.claude.json` due to race conditions. Use the `launch` command to run Claude with isolated config:
377
+ ### Network Simulation
537
378
 
538
- ```bash
539
- # Run Claude Code with isolated config directory
540
- ccp launch
379
+ ```
380
+ You: Test myapp.com loading time on 3G network
541
381
 
542
- # Pass any claude flags
543
- ccp launch --dangerously-skip-permissions
544
- ccp launch -p "Your prompt"
382
+ Claude: [Applies 3G throttling: 1.5Mbps, 100ms latency]
545
383
  ```
546
384
 
547
- ### Config Recovery
385
+ Presets: `offline`, `slow-2g`, `2g`, `3g`, `4g`, `fast-wifi`, `custom`
548
386
 
549
- If your `.claude.json` gets corrupted:
387
+ ### Config Recovery
550
388
 
551
389
  ```bash
552
- # Auto-recover corrupted config
390
+ # Auto-recover corrupted .claude.json
553
391
  ccp recover
554
392
 
555
- # List available backups
393
+ # List backups
556
394
  ccp recover --list-backups
557
395
  ```
558
396
 
559
- ---
560
-
561
- ## Comparison
562
-
563
- | Feature | Claude in Chrome (Extension) | Claude Chrome Parallel |
564
- |---------|------------------------------|----------------------|
565
- | Multiple sessions | ❌ Detached errors | ✅ Works perfectly |
566
- | Parallel QA testing | ❌ | ✅ |
567
- | Connection type | Shared extension state | Independent CDP |
568
- | Max concurrent sessions | 1 | 20+ tested |
569
- | Auto Chrome launch | ❌ | ✅ |
570
- | Network simulation | ❌ | ✅ 3G/4G/offline presets |
571
- | Session auto-cleanup | ❌ | ✅ TTL-based |
572
- | Connection pooling | ❌ | ✅ Pre-warmed pages |
397
+ ### Session Isolation
573
398
 
574
- ---
575
-
576
- ## Considerations
577
-
578
- ### Strengths
579
- - **Authenticated access** - Automate any login-required service
580
- - **Natural language element finding** - Resilient to DOM changes
581
- - **JavaScript execution** - Handle complex SPAs
582
- - **Visual verification** - Screenshots for evidence/debugging
583
-
584
- ### Limitations
585
- - CAPTCHA/bot detection on some services
586
- - 2FA re-authentication may require manual intervention
587
- - For high-volume tasks, native APIs are more efficient when available
588
- - Rate limiting applies to automated interactions
589
-
590
- ### Recommended Patterns
591
- 1. **Small/critical tasks** → Use this MCP
592
- 2. **High-volume tasks** → Prefer native APIs when available
593
- 3. **Services without APIs** → This MCP is often the only option
399
+ ```bash
400
+ # Run Claude with isolated config (prevents race conditions)
401
+ ccp launch
402
+ ccp launch -p "Your prompt"
403
+ ```
594
404
 
595
405
  ---
596
406
 
@@ -599,51 +409,56 @@ ccp recover --list-backups
599
409
  ### Chrome not connecting
600
410
 
601
411
  ```bash
602
- # Check status
603
412
  ccp check
604
-
605
- # Manually start Chrome with debugging
413
+ # Or manually start Chrome
606
414
  chrome --remote-debugging-port=9222
607
415
  ```
608
416
 
609
417
  ### Tools not appearing in Claude Code
610
418
 
611
- 1. Check MCP config in `~/.claude.json`
419
+ 1. Check `~/.claude.json` configuration
612
420
  2. Restart Claude Code
613
421
  3. Run `/mcp` to verify `chrome-parallel` is listed
614
422
 
615
423
  ---
616
424
 
425
+ ## Use Cases
426
+
427
+ - **Business**: ERP/SaaS data extraction, invoice downloads, repetitive task automation
428
+ - **Research**: Login-required platform data collection, academic DB searches
429
+ - **Social Media**: Multi-account posting, message management, analytics
430
+ - **E-commerce**: Member price monitoring, inventory management, review responses
431
+ - **QA Testing**: Parallel scenario testing, network condition testing
432
+ - **Productivity**: Email organization, calendar management, bookmark management
433
+
434
+ ---
435
+
617
436
  ## Development
618
437
 
619
438
  ```bash
620
439
  git clone https://github.com/shaun0927/claude-chrome-parallel.git
621
440
  cd claude-chrome-parallel
622
-
623
441
  npm install
624
442
  npm run build
625
-
626
- # Test locally
627
- npm install -g .
443
+ npm test
628
444
  ```
629
445
 
630
446
  ---
631
447
 
632
448
  ## License
633
449
 
634
- MIT License - see [LICENSE](LICENSE) for details.
450
+ MIT License - [LICENSE](LICENSE)
451
+
452
+ ---
635
453
 
636
454
  ## Disclaimer
637
455
 
638
- > **This is an unofficial, community-maintained project.**
639
- > Not affiliated with or endorsed by Anthropic.
456
+ > **This is an unofficial community project.**
457
+ > Not affiliated with Anthropic.
640
458
  >
641
- > "Claude" is a trademark of Anthropic. This project provides
642
- > tooling to enhance the Claude Code experience but is not
643
- > an official Anthropic product.
459
+ > "Claude" is a trademark of Anthropic.
644
460
 
645
461
  ## Acknowledgments
646
462
 
647
- - [Anthropic](https://anthropic.com) for Claude and the MCP protocol
648
- - [Claude Code](https://github.com/anthropics/claude-code) for the CLI
649
- - [Puppeteer](https://pptr.dev/) for browser automation
463
+ - [Anthropic](https://anthropic.com) - Claude and MCP protocol
464
+ - [Puppeteer](https://pptr.dev/) - Browser automation
@@ -0,0 +1,183 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 400">
2
+ <defs>
3
+ <linearGradient id="bgGrad" x1="0%" y1="0%" x2="100%" y2="100%">
4
+ <stop offset="0%" style="stop-color:#1a1a2e"/>
5
+ <stop offset="100%" style="stop-color:#16213e"/>
6
+ </linearGradient>
7
+ <linearGradient id="successGrad" x1="0%" y1="0%" x2="100%" y2="0%">
8
+ <stop offset="0%" style="stop-color:#00b894"/>
9
+ <stop offset="100%" style="stop-color:#00cec9"/>
10
+ </linearGradient>
11
+ <linearGradient id="errorGrad" x1="0%" y1="0%" x2="100%" y2="0%">
12
+ <stop offset="0%" style="stop-color:#e74c3c"/>
13
+ <stop offset="100%" style="stop-color:#c0392b"/>
14
+ </linearGradient>
15
+ <linearGradient id="purpleGrad" x1="0%" y1="0%" x2="100%" y2="0%">
16
+ <stop offset="0%" style="stop-color:#6c5ce7"/>
17
+ <stop offset="100%" style="stop-color:#a29bfe"/>
18
+ </linearGradient>
19
+ </defs>
20
+
21
+ <!-- Background -->
22
+ <rect width="800" height="400" fill="url(#bgGrad)"/>
23
+
24
+ <!-- Title -->
25
+ <text x="400" y="35" text-anchor="middle" fill="#fff" font-family="system-ui, -apple-system, sans-serif" font-size="18" font-weight="bold">
26
+ Chrome Extension vs Claude Chrome Parallel
27
+ </text>
28
+
29
+ <!-- LEFT SIDE: Chrome Extension (Failing) -->
30
+ <g transform="translate(30, 60)">
31
+ <!-- Header -->
32
+ <rect x="0" y="0" width="350" height="30" rx="8" ry="8" fill="#2d3436"/>
33
+ <circle cx="15" cy="15" r="5" fill="#e74c3c"/>
34
+ <circle cx="32" cy="15" r="5" fill="#f39c12"/>
35
+ <circle cx="49" cy="15" r="5" fill="#27ae60"/>
36
+ <text x="175" y="20" text-anchor="middle" fill="#b2bec3" font-family="monospace" font-size="12">Chrome Extension</text>
37
+
38
+ <!-- Terminal body -->
39
+ <rect x="0" y="30" width="350" height="290" rx="0" ry="0" fill="#0d1117"/>
40
+ <rect x="0" y="310" width="350" height="10" rx="0" ry="0" fill="#2d3436"/>
41
+
42
+ <!-- Session 1 - Success then stops -->
43
+ <text x="10" y="55" fill="#6c5ce7" font-family="monospace" font-size="11">
44
+ <tspan>$ claude "Screenshot github.com"</tspan>
45
+ </text>
46
+ <text x="10" y="75" fill="#00b894" font-family="monospace" font-size="11">
47
+ <tspan>Session 1: Taking screenshot...</tspan>
48
+ <animate attributeName="opacity" values="0;1;1" dur="4s" repeatCount="indefinite"/>
49
+ </text>
50
+ <text x="10" y="95" fill="#00b894" font-family="monospace" font-size="11">
51
+ <tspan>✓ Screenshot saved</tspan>
52
+ <animate attributeName="opacity" values="0;0;1;1" dur="4s" repeatCount="indefinite"/>
53
+ </text>
54
+
55
+ <!-- Session 2 - Error -->
56
+ <text x="10" y="130" fill="#6c5ce7" font-family="monospace" font-size="11">
57
+ <tspan>$ claude "Screenshot google.com"</tspan>
58
+ <animate attributeName="opacity" values="0;0;0;1;1" dur="4s" repeatCount="indefinite"/>
59
+ </text>
60
+ <text x="10" y="150" fill="#fdcb6e" font-family="monospace" font-size="11">
61
+ <tspan>Session 2: Connecting...</tspan>
62
+ <animate attributeName="opacity" values="0;0;0;0;1;1;0" dur="4s" repeatCount="indefinite"/>
63
+ </text>
64
+
65
+ <!-- Error message with animation -->
66
+ <g>
67
+ <animate attributeName="opacity" values="0;0;0;0;0;1;1" dur="4s" repeatCount="indefinite"/>
68
+ <rect x="5" y="165" width="340" height="50" rx="4" fill="#2d1b1b"/>
69
+ <text x="15" y="185" fill="#e74c3c" font-family="monospace" font-size="11" font-weight="bold">
70
+ ✗ Error: Session Detached
71
+ </text>
72
+ <text x="15" y="205" fill="#e17055" font-family="monospace" font-size="10">
73
+ Target closed. Another session took control.
74
+ </text>
75
+ </g>
76
+
77
+ <!-- Blinking cursor -->
78
+ <rect x="10" y="230" width="8" height="14" fill="#fff">
79
+ <animate attributeName="opacity" values="1;0;1" dur="1s" repeatCount="indefinite"/>
80
+ </rect>
81
+
82
+ <!-- Status bar -->
83
+ <text x="175" y="335" text-anchor="middle" fill="#e74c3c" font-family="system-ui" font-size="14" font-weight="bold">
84
+ ❌ Only 1 session at a time
85
+ </text>
86
+ </g>
87
+
88
+ <!-- VS Divider -->
89
+ <text x="400" y="220" text-anchor="middle" fill="#636e72" font-family="system-ui" font-size="24" font-weight="bold">VS</text>
90
+
91
+ <!-- RIGHT SIDE: Claude Chrome Parallel (Success) -->
92
+ <g transform="translate(420, 60)">
93
+ <!-- Header -->
94
+ <rect x="0" y="0" width="350" height="30" rx="8" ry="8" fill="#2d3436"/>
95
+ <circle cx="15" cy="15" r="5" fill="#e74c3c"/>
96
+ <circle cx="32" cy="15" r="5" fill="#f39c12"/>
97
+ <circle cx="49" cy="15" r="5" fill="#27ae60"/>
98
+ <text x="175" y="20" text-anchor="middle" fill="#00b894" font-family="monospace" font-size="12" font-weight="bold">Claude Chrome Parallel</text>
99
+
100
+ <!-- Terminal body -->
101
+ <rect x="0" y="30" width="350" height="290" rx="0" ry="0" fill="#0d1117"/>
102
+ <rect x="0" y="310" width="350" height="10" rx="0" ry="0" fill="#2d3436"/>
103
+
104
+ <!-- Multiple sessions all succeeding -->
105
+ <!-- Session 1 -->
106
+ <text x="10" y="55" fill="#6c5ce7" font-family="monospace" font-size="11">Session 1: github.com</text>
107
+ <rect x="150" y="43" width="0" height="14" rx="2" fill="url(#successGrad)">
108
+ <animate attributeName="width" values="0;80;80" dur="4s" repeatCount="indefinite"/>
109
+ </rect>
110
+ <text x="240" y="55" fill="#00b894" font-family="monospace" font-size="11">
111
+ <tspan>✓ Done</tspan>
112
+ <animate attributeName="opacity" values="0;0;1;1" dur="4s" repeatCount="indefinite"/>
113
+ </text>
114
+
115
+ <!-- Session 2 -->
116
+ <text x="10" y="80" fill="#6c5ce7" font-family="monospace" font-size="11">Session 2: google.com</text>
117
+ <rect x="150" y="68" width="0" height="14" rx="2" fill="url(#successGrad)">
118
+ <animate attributeName="width" values="0;0;70;70" dur="4s" repeatCount="indefinite"/>
119
+ </rect>
120
+ <text x="230" y="80" fill="#00b894" font-family="monospace" font-size="11">
121
+ <tspan>✓ Done</tspan>
122
+ <animate attributeName="opacity" values="0;0;0;1;1" dur="4s" repeatCount="indefinite"/>
123
+ </text>
124
+
125
+ <!-- Session 3 -->
126
+ <text x="10" y="105" fill="#6c5ce7" font-family="monospace" font-size="11">Session 3: amazon.com</text>
127
+ <rect x="150" y="93" width="0" height="14" rx="2" fill="url(#successGrad)">
128
+ <animate attributeName="width" values="0;0;0;90;90" dur="4s" repeatCount="indefinite"/>
129
+ </rect>
130
+ <text x="250" y="105" fill="#00b894" font-family="monospace" font-size="11">
131
+ <tspan>✓ Done</tspan>
132
+ <animate attributeName="opacity" values="0;0;0;0;1;1" dur="4s" repeatCount="indefinite"/>
133
+ </text>
134
+
135
+ <!-- Session 4 -->
136
+ <text x="10" y="130" fill="#6c5ce7" font-family="monospace" font-size="11">Session 4: naver.com</text>
137
+ <rect x="150" y="118" width="0" height="14" rx="2" fill="url(#successGrad)">
138
+ <animate attributeName="width" values="0;0;0;0;60;60" dur="4s" repeatCount="indefinite"/>
139
+ </rect>
140
+ <text x="220" y="130" fill="#00b894" font-family="monospace" font-size="11">
141
+ <tspan>✓ Done</tspan>
142
+ <animate attributeName="opacity" values="0;0;0;0;0;1;1" dur="4s" repeatCount="indefinite"/>
143
+ </text>
144
+
145
+ <!-- Session 5 -->
146
+ <text x="10" y="155" fill="#6c5ce7" font-family="monospace" font-size="11">Session 5: twitter.com</text>
147
+ <rect x="150" y="143" width="0" height="14" rx="2" fill="url(#successGrad)">
148
+ <animate attributeName="width" values="0;0;0;0;0;75;75" dur="4s" repeatCount="indefinite"/>
149
+ </rect>
150
+ <text x="235" y="155" fill="#00b894" font-family="monospace" font-size="11">
151
+ <tspan>✓ Done</tspan>
152
+ <animate attributeName="opacity" values="0;0;0;0;0;0;1" dur="4s" repeatCount="indefinite"/>
153
+ </text>
154
+
155
+ <!-- Stats box -->
156
+ <g>
157
+ <animate attributeName="opacity" values="0;0;0;0;0;0;1" dur="4s" repeatCount="indefinite"/>
158
+ <rect x="10" y="180" width="330" height="80" rx="6" fill="#1e3a1e"/>
159
+ <text x="175" y="205" text-anchor="middle" fill="#00b894" font-family="system-ui" font-size="13" font-weight="bold">
160
+ All 5 sessions completed in parallel!
161
+ </text>
162
+ <text x="175" y="230" text-anchor="middle" fill="#55efc4" font-family="monospace" font-size="12">
163
+ Total time: 1.2s (vs 6.0s sequential)
164
+ </text>
165
+ <text x="175" y="250" text-anchor="middle" fill="#81ecec" font-family="monospace" font-size="11">
166
+ ⚡ 5x faster
167
+ </text>
168
+ </g>
169
+
170
+ <!-- Status bar -->
171
+ <text x="175" y="335" text-anchor="middle" fill="#00b894" font-family="system-ui" font-size="14" font-weight="bold">
172
+ ✅ 20+ concurrent sessions
173
+ </text>
174
+ </g>
175
+
176
+ <!-- Bottom CTA -->
177
+ <g>
178
+ <rect x="250" y="365" width="300" height="28" rx="14" fill="url(#purpleGrad)"/>
179
+ <text x="400" y="384" text-anchor="middle" fill="#fff" font-family="system-ui" font-size="12" font-weight="bold">
180
+ npm install -g claude-chrome-parallel
181
+ </text>
182
+ </g>
183
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-chrome-parallel",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "MCP server for parallel Claude Code browser sessions - no more 'Detached' errors",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -68,6 +68,7 @@
68
68
  },
69
69
  "files": [
70
70
  "dist",
71
+ "assets",
71
72
  "README.md",
72
73
  "LICENSE"
73
74
  ]