Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 3 additions & 47 deletions .github/workflows/publish-to-npm-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@ name: publish-on-tag
on:
push:
tags:
- 'chrome-devtools-mcp-v*'
- 'v*'
workflow_dispatch:
inputs:
npm-publish:
description: 'Try to publish to NPM'
default: false
type: boolean
mcp-publish:
description: 'Try to publish to MCP registry'
default: true
type: boolean

permissions:
id-token: write # Required for OIDC
contents: read

jobs:
Expand Down Expand Up @@ -49,45 +44,6 @@ jobs:
NODE_ENV: 'production'

- name: Publish
run: |
npm publish --provenance --access public

publish-to-mcp-registry:
runs-on: ubuntu-latest
needs: publish-to-npm
if: ${{ (github.event_name != 'workflow_dispatch' && needs.publish-to-npm.result == 'success') || (inputs.mcp-publish && always()) }}
steps:
- name: Check out repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 2

- name: Set up Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
cache: npm
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

# Ensure npm 11.5.1 or later is installed
- name: Update npm
run: npm install -g npm@latest

- name: Install dependencies
run: npm ci

- name: Build and bundle
run: npm run bundle
run: npm publish --access public
env:
NODE_ENV: 'production'

- name: Install MCP Publisher
run: |
export OS=$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_${OS}.tar.gz" | tar xz mcp-publisher

- name: Login to MCP Registry
run: ./mcp-publisher login github-oidc

- name: Publish to MCP Registry
run: ./mcp-publisher publish
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,6 @@ build/

log.txt

.DS_Store
.DS_Store
.bin
.reports
55 changes: 29 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# Chrome DevTools MCP
# Chrome DevTools MCP - Enhanced by NIMBUS21

[![npm chrome-devtools-mcp package](https://img.shields.io/npm/v/chrome-devtools-mcp.svg)](https://npmjs.org/package/chrome-devtools-mcp)
[![npm @nimbus21.ai/chrome-devtools-mcp package](https://img.shields.io/npm/v/@nimbus21.ai/chrome-devtools-mcp.svg)](https://npmjs.org/package/@nimbus21.ai/chrome-devtools-mcp)

`chrome-devtools-mcp` lets your coding agent (such as Gemini, Claude, Cursor or Copilot)
> **Note:** This is an **unofficial community-maintained fork** of the original Chrome DevTools MCP server, enhanced and modified by the **NIMBUS21 Team**. This package is not affiliated with or endorsed by Google or the Chrome DevTools team.

## 🚀 Powered by NIMBUS21

This enhanced version is brought to you by **[NIMBUS21](https://nimbus21.com)** - a leading technology innovation company specializing in AI-powered automation, browser automation solutions, and enterprise software development. Visit [nimbus21.ai](https://nimbus21.ai) to explore our cutting-edge AI tools, automation platforms, and developer services.

**NIMBUS21** delivers advanced browser automation frameworks, intelligent testing solutions, and AI-driven development tools for modern web applications. Our expertise in Chrome automation, DevTools integration, and Model Context Protocol (MCP) implementations helps developers and enterprises build more reliable, performant, and intelligent software solutions.

---

`@nimbus21.ai/chrome-devtools-mcp` lets your coding agent (such as Gemini, Claude, Cursor or Copilot)
control and inspect a live Chrome browser. It acts as a Model-Context-Protocol
(MCP) server, giving your AI coding assistant access to the full power of
Chrome DevTools for reliable automation, in-depth debugging, and performance analysis.
Expand Down Expand Up @@ -42,14 +52,14 @@ Add the following config to your MCP client:
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"]
"args": ["-y", "@nimbus21.ai/chrome-devtools-mcp@latest"]
}
}
}
```

> [!NOTE]
> Using `chrome-devtools-mcp@latest` ensures that your MCP client will always use the latest version of the Chrome DevTools MCP server.
> [!NOTE]
> Using `@nimbus21.ai/chrome-devtools-mcp@latest` ensures that your MCP client will always use the latest version of the NIMBUS21-enhanced Chrome DevTools MCP server.

### MCP Client configuration

Expand Down Expand Up @@ -94,7 +104,7 @@ Chrome DevTools MCP will not start the browser instance automatically using this
Use the Claude Code CLI to add the Chrome DevTools MCP server (<a href="https://docs.anthropic.com/en/docs/claude-code/mcp">guide</a>):

```bash
claude mcp add chrome-devtools npx chrome-devtools-mcp@latest
claude mcp add chrome-devtools npx @nimbus21.ai/chrome-devtools-mcp@latest
```

</details>
Expand All @@ -110,7 +120,7 @@ claude mcp add chrome-devtools npx chrome-devtools-mcp@latest
using the standard config from above. You can also install the Chrome DevTools MCP server using the Codex CLI:

```bash
codex mcp add chrome-devtools -- npx chrome-devtools-mcp@latest
codex mcp add chrome-devtools -- npx @nimbus21.ai/chrome-devtools-mcp@latest
```

**On Windows 11**
Expand All @@ -124,7 +134,7 @@ args = [
"/c",
"npx",
"-y",
"chrome-devtools-mcp@latest",
"@nimbus21.ai/chrome-devtools-mcp@latest",
]
env = { SystemRoot="C:\\Windows", PROGRAMFILES="C:\\Program Files" }
startup_timeout_ms = 20_000
Expand All @@ -151,26 +161,19 @@ Configure the following fields and press `CTRL+S` to save the configuration:

- **Server name:** `chrome-devtools`
- **Server Type:** `[1] Local`
- **Command:** `npx -y chrome-devtools-mcp@latest`
- **Command:** `npx`
- **Arguments:** `-y, @nimbus21.ai/chrome-devtools-mcp@latest`

</details>

<details>
<summary>Copilot / VS Code</summary>

**Click the button to install:**

[<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](https://vscode.dev/redirect/mcp/install?name=io.github.ChromeDevTools%2Fchrome-devtools-mcp&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22chrome-devtools-mcp%22%5D%2C%22env%22%3A%7B%7D%7D)

[<img src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5" alt="Install in VS Code Insiders">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522io.github.ChromeDevTools%252Fchrome-devtools-mcp%2522%252C%2522config%2522%253A%257B%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522chrome-devtools-mcp%2522%255D%252C%2522env%2522%253A%257B%257D%257D%257D)

**Or install manually:**

Follow the MCP install <a href="https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server">guide</a>,
with the standard config from above. You can also install the Chrome DevTools MCP server using the VS Code CLI:

```bash
code --add-mcp '{"name":"io.github.ChromeDevTools/chrome-devtools-mcp","command":"npx","args":["-y","chrome-devtools-mcp"],"env":{}}'
code --add-mcp '{"name":"chrome-devtools","command":"npx","args":["@nimbus21.ai/chrome-devtools-mcp@latest"]}'
```

</details>
Expand All @@ -180,7 +183,7 @@ code --add-mcp '{"name":"io.github.ChromeDevTools/chrome-devtools-mcp","command"

**Click the button to install:**

[<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=chrome-devtools&config=eyJjb21tYW5kIjoibnB4IC15IGNocm9tZS1kZXZ0b29scy1tY3BAbGF0ZXN0In0%3D)
[<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=chrome-devtools&config=eyJjb21tYW5kIjoibnB4IC15IEBuaW1idXMyMS5haS9jaHJvbWUtZGV2dG9vbHMtbWNwQGxhdGVzdCJ9)

**Or install manually:**

Expand All @@ -205,13 +208,13 @@ Install the Chrome DevTools MCP server using the Gemini CLI.
**Project wide:**

```bash
gemini mcp add chrome-devtools npx chrome-devtools-mcp@latest
gemini mcp add chrome-devtools npx @nimbus21.ai/chrome-devtools-mcp@latest
```

**Globally:**

```bash
gemini mcp add -s user chrome-devtools npx chrome-devtools-mcp@latest
gemini mcp add -s user chrome-devtools npx @nimbus21.ai/chrome-devtools-mcp@latest
```

Alternatively, follow the <a href="https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md#how-to-set-up-your-mcp-server">MCP guide</a> and use the standard config from above.
Expand Down Expand Up @@ -274,7 +277,7 @@ qodercli mcp add -s user chrome-devtools -- npx chrome-devtools-mcp@latest

**Click the button to install:**

[<img src="https://img.shields.io/badge/Visual_Studio-Install-C16FDE?logo=visualstudio&logoColor=white" alt="Install in Visual Studio">](https://vs-open.link/mcp-install?%7B%22name%22%3A%22chrome-devtools%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22chrome-devtools-mcp%40latest%22%5D%7D)
[<img src="https://img.shields.io/badge/Visual_Studio-Install-C16FDE?logo=visualstudio&logoColor=white" alt="Install in Visual Studio">](https://vs-open.link/mcp-install?%7B%22name%22%3A%22chrome-devtools%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22@nimbus21.ai/chrome-devtools-mcp%40latest%22%5D%7D)
</details>

<details>
Expand Down Expand Up @@ -434,7 +437,7 @@ Pass them via the `args` property in the JSON configuration. For example:
"chrome-devtools": {
"command": "npx",
"args": [
"chrome-devtools-mcp@latest",
"@nimbus21.ai/chrome-devtools-mcp@latest",
"--channel=canary",
"--headless=true",
"--isolated=true"
Expand All @@ -454,7 +457,7 @@ You can connect directly to a Chrome WebSocket endpoint and include custom heade
"chrome-devtools": {
"command": "npx",
"args": [
"chrome-devtools-mcp@latest",
"@nimbus21.ai/chrome-devtools-mcp@latest",
"--wsEndpoint=ws://127.0.0.1:9222/devtools/browser/<id>",
"--wsHeaders={\"Authorization\":\"Bearer YOUR_TOKEN\"}"
]
Expand All @@ -465,7 +468,7 @@ You can connect directly to a Chrome WebSocket endpoint and include custom heade

To get the WebSocket endpoint from a running Chrome instance, visit `http://127.0.0.1:9222/json/version` and look for the `webSocketDebuggerUrl` field.

You can also run `npx chrome-devtools-mcp@latest --help` to see all available configuration options.
You can also run `npx @nimbus21.ai/chrome-devtools-mcp@latest --help` to see all available configuration options.

## Concepts

Expand Down
153 changes: 153 additions & 0 deletions STEALTH_FEATURES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# Stealth Mode Features

This fork of Chrome DevTools MCP adds **stealth mode** capabilities to bypass bot detection on websites.

## New Features

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

**What it does:**
- Uses `puppeteer-extra` with `puppeteer-extra-plugin-stealth` plugin
- Removes automation-related Chrome arguments
- Adds anti-detection Chrome flags:
- `--disable-blink-features=AutomationControlled`
- `--disable-features=IsolateOrigins,site-per-process`
- `--no-first-run`
- `--no-service-autorun`
- `--password-store=basic`
- Removes `--enable-automation` flag

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

## Usage

### Basic Stealth Mode
```bash
npx chrome-devtools-mcp@latest --stealth
```

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

### Only Custom Arguments (without stealth plugin)
```bash
npx chrome-devtools-mcp@latest --chromeArgs="--disable-gpu,--no-sandbox"
```

## MCP Configuration

### Claude Code
```bash
claude mcp add chrome-stealth npx chrome-devtools-mcp@latest -- --stealth
```

Or manually edit `.claude/config.json`:
```json
{
"mcpServers": {
"chrome-stealth": {
"command": "npx",
"args": [
"chrome-devtools-mcp@latest",
"--stealth"
]
}
}
}
```

### With Custom Chrome Args
```json
{
"mcpServers": {
"chrome-stealth": {
"command": "npx",
"args": [
"chrome-devtools-mcp@latest",
"--stealth",
"--chromeArgs=--window-size=1920,1080"
]
}
}
}
```

### With Chromium Path
```json
{
"mcpServers": {
"chrome-stealth": {
"command": "npx",
"args": [
"chrome-devtools-mcp@latest",
"--stealth",
"--executablePath",
"/usr/bin/chromium"
]
}
}
}
```

## Technical Details

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

### How Stealth Mode Works
1. **Puppeteer-Extra Plugin**: Uses `puppeteer-extra-plugin-stealth` which applies dozens of evasion techniques:
- Removes `navigator.webdriver` flag
- Masks Chrome headless detection
- Fixes `navigator.plugins` and `navigator.languages`
- Spoofs WebGL vendor/renderer
- And many more...

2. **Chrome Flags**: Adds critical anti-detection flags:
- `--disable-blink-features=AutomationControlled` - Removes automation indicators
- `ignoreDefaultArgs: ['--enable-automation']` - Prevents automation flag

3. **Conditional**: Only uses puppeteer-extra when stealth is enabled, otherwise uses standard puppeteer-core for better performance

## Testing

Test stealth mode on bot-protected sites:
```bash
# Navigate to bot-protected site
npx chrome-devtools-mcp@latest --stealth

# Then use the MCP tools to navigate to sites like:
# - https://2nabiji.ge
# - https://bot.sannysoft.com
# - https://arh.antoinevastel.com/bots/areyouheadless
```

## Comparison with Standard Chrome DevTools MCP

| Feature | Standard | With Stealth |
|---------|----------|--------------|
| Bot Detection | ❌ Detected | ✅ Bypassed |
| Performance | Fast | Slightly slower |
| Dependencies | puppeteer-core | + puppeteer-extra |
| Use Case | Development/Testing | Bot-protected sites |

## Use Cases

- **E-commerce scraping**: Access sites with Cloudflare or similar protection
- **Price monitoring**: Automated price checking without detection
- **Testing**: Test how your site appears to real users vs bots
- **Research**: Access data from protected sources

## Credits

Stealth implementation based on:
- [puppeteer-extra](https://github.com/berstend/puppeteer-extra)
- [puppeteer-extra-plugin-stealth](https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth)

Original Chrome DevTools MCP by Google LLC / Chrome DevTools team.
Loading
Loading