Skip to content

Commit 5aa6003

Browse files
Nima21claude
andcommitted
fix: formatting and docs:generate script for Node 22
- Fix prettier formatting in eslint.config.mjs and STEALTH_FEATURES.md - Update docs:generate to use Node's native TypeScript (requires Node 22+) - Add tsx as dev dependency for local development 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 1958a3f commit 5aa6003

4 files changed

Lines changed: 537 additions & 22 deletions

File tree

STEALTH_FEATURES.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ This fork of Chrome DevTools MCP adds **stealth mode** capabilities to bypass bo
55
## New Features
66

77
### 1. **Stealth Mode** (`--stealth`)
8+
89
Enables puppeteer-extra-plugin-stealth and adds anti-detection Chrome arguments to make browser automation undetectable.
910

1011
**What it does:**
12+
1113
- Uses `puppeteer-extra` with `puppeteer-extra-plugin-stealth` plugin
1214
- Removes automation-related Chrome arguments
1315
- Adds anti-detection Chrome flags:
@@ -19,48 +21,52 @@ Enables puppeteer-extra-plugin-stealth and adds anti-detection Chrome arguments
1921
- Removes `--enable-automation` flag
2022

2123
### 2. **Custom Chrome Arguments** (`--chromeArgs`)
24+
2225
Pass any additional Chrome command-line arguments (comma-separated).
2326

2427
## Usage
2528

2629
### Basic Stealth Mode
30+
2731
```bash
2832
npx chrome-devtools-mcp@latest --stealth
2933
```
3034

3135
### Stealth Mode with Custom Chrome Arguments
36+
3237
```bash
3338
npx chrome-devtools-mcp@latest --stealth --chromeArgs="--window-size=1920,1080,--user-agent=CustomAgent"
3439
```
3540

3641
### Only Custom Arguments (without stealth plugin)
42+
3743
```bash
3844
npx chrome-devtools-mcp@latest --chromeArgs="--disable-gpu,--no-sandbox"
3945
```
4046

4147
## MCP Configuration
4248

4349
### Claude Code
50+
4451
```bash
4552
claude mcp add chrome-stealth npx chrome-devtools-mcp@latest -- --stealth
4653
```
4754

4855
Or manually edit `.claude/config.json`:
56+
4957
```json
5058
{
5159
"mcpServers": {
5260
"chrome-stealth": {
5361
"command": "npx",
54-
"args": [
55-
"chrome-devtools-mcp@latest",
56-
"--stealth"
57-
]
62+
"args": ["chrome-devtools-mcp@latest", "--stealth"]
5863
}
5964
}
6065
}
6166
```
6267

6368
### With Custom Chrome Args
69+
6470
```json
6571
{
6672
"mcpServers": {
@@ -77,6 +83,7 @@ Or manually edit `.claude/config.json`:
7783
```
7884

7985
### With Chromium Path
86+
8087
```json
8188
{
8289
"mcpServers": {
@@ -96,12 +103,14 @@ Or manually edit `.claude/config.json`:
96103
## Technical Details
97104

98105
### Modified Files
106+
99107
- `package.json` - Added `puppeteer-extra` and `puppeteer-extra-plugin-stealth` dependencies
100108
- `src/browser.ts` - Added stealth mode logic and custom Chrome args support
101109
- `src/cli.ts` - Added `--stealth` and `--chromeArgs` CLI options
102110
- `src/main.ts` - Pass stealth options to browser launcher
103111

104112
### How Stealth Mode Works
113+
105114
1. **Puppeteer-Extra Plugin**: Uses `puppeteer-extra-plugin-stealth` which applies dozens of evasion techniques:
106115
- Removes `navigator.webdriver` flag
107116
- Masks Chrome headless detection
@@ -118,6 +127,7 @@ Or manually edit `.claude/config.json`:
118127
## Testing
119128

120129
Test stealth mode on bot-protected sites:
130+
121131
```bash
122132
# Navigate to bot-protected site
123133
npx chrome-devtools-mcp@latest --stealth
@@ -130,12 +140,12 @@ npx chrome-devtools-mcp@latest --stealth
130140

131141
## Comparison with Standard Chrome DevTools MCP
132142

133-
| Feature | Standard | With Stealth |
134-
|---------|----------|--------------|
135-
| Bot Detection | ❌ Detected | ✅ Bypassed |
136-
| Performance | Fast | Slightly slower |
137-
| Dependencies | puppeteer-core | + puppeteer-extra |
138-
| Use Case | Development/Testing | Bot-protected sites |
143+
| Feature | Standard | With Stealth |
144+
| ------------- | ------------------- | ------------------- |
145+
| Bot Detection | ❌ Detected | ✅ Bypassed |
146+
| Performance | Fast | Slightly slower |
147+
| Dependencies | puppeteer-core | + puppeteer-extra |
148+
| Use Case | Development/Testing | Bot-protected sites |
139149

140150
## Use Cases
141151

@@ -147,6 +157,7 @@ npx chrome-devtools-mcp@latest --stealth
147157
## Credits
148158

149159
Stealth implementation based on:
160+
150161
- [puppeteer-extra](https://github.com/berstend/puppeteer-extra)
151162
- [puppeteer-extra-plugin-stealth](https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth)
152163

eslint.config.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ import tseslint from 'typescript-eslint';
1414
import localPlugin from './scripts/eslint_rules/local-plugin.js';
1515

1616
export default defineConfig([
17-
globalIgnores(['**/node_modules', '**/build/', 'scripts/prepare.js', 'scripts/post-build.js']),
17+
globalIgnores([
18+
'**/node_modules',
19+
'**/build/',
20+
'scripts/prepare.js',
21+
'scripts/post-build.js',
22+
]),
1823
importPlugin.flatConfigs.typescript,
1924
{
2025
languageOptions: {

0 commit comments

Comments
 (0)