mcpbrowser 0.2.24 β 0.2.25
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 +48 -32
- package/extension/README.md +8 -3
- package/extension/package.json +2 -2
- package/extension/src/extension.js +1 -1
- package/package.json +2 -2
- package/server.json +2 -2
- package/src/mcp-browser.js +1 -1
package/README.md
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://marketplace.visualstudio.com/items?itemName=cherchyk.mcpbrowser)
|
|
4
4
|
[](https://www.npmjs.com/package/mcpbrowser)
|
|
5
|
+
[](https://modelcontextprotocol.io/quickstart/user)
|
|
5
6
|
[](https://opensource.org/licenses/MIT)
|
|
6
7
|
|
|
7
|
-
**Enables GitHub Copilot to fetch protected web pages** - handles login-protected web pages, corporate SSO, and anti-crawler restrictions that normal fetching can't handle. Uses your Chrome/Edge browser session via DevTools Protocol.
|
|
8
|
+
**Enables Claude Code, GitHub Copilot, and Claude Desktop to fetch protected web pages** - handles login-protected web pages, corporate SSO, and anti-crawler restrictions that normal fetching can't handle. Uses your Chrome/Edge browser session via DevTools Protocol.
|
|
8
9
|
|
|
9
10
|
## π Installation Options
|
|
10
11
|
|
|
@@ -19,18 +20,18 @@ Or search "MCPBrowser" in VS Code Extensions view.
|
|
|
19
20
|
**From GitHub Release:**
|
|
20
21
|
Download from [GitHub Releases](https://github.com/cherchyk/MCPBrowser/releases):
|
|
21
22
|
```bash
|
|
22
|
-
code --install-extension mcpbrowser-0.2.
|
|
23
|
+
code --install-extension mcpbrowser-0.2.24.vsix
|
|
23
24
|
```
|
|
24
25
|
|
|
25
26
|
The extension automatically:
|
|
26
27
|
- Installs the MCPBrowser npm package globally
|
|
27
|
-
- Configures mcp.json for GitHub Copilot
|
|
28
|
+
- Configures mcp.json for Claude Code & GitHub Copilot
|
|
28
29
|
- Complete one-click setup - no manual steps needed
|
|
29
30
|
|
|
30
31
|
π¦ [View on Marketplace](https://marketplace.visualstudio.com/items?itemName=cherchyk.mcpbrowser)
|
|
31
32
|
|
|
32
33
|
### Option 2: npm Package (Recommended for Manual Setup)
|
|
33
|
-
Published on npm as [mcpbrowser](https://www.npmjs.com/package/mcpbrowser) v0.2.
|
|
34
|
+
Published on npm as [mcpbrowser](https://www.npmjs.com/package/mcpbrowser) v0.2.24.
|
|
34
35
|
|
|
35
36
|
Add to your `mcp.json`:
|
|
36
37
|
```jsonc
|
|
@@ -47,11 +48,31 @@ Add to your `mcp.json`:
|
|
|
47
48
|
- Mac/Linux: `~/.config/Code/User/mcp.json`
|
|
48
49
|
|
|
49
50
|
### Option 3: MCP Registry
|
|
50
|
-
Available in the [MCP Registry](https://registry.modelcontextprotocol.io/) as `io.github.cherchyk/browser` v0.2.
|
|
51
|
+
Available in the [MCP Registry](https://registry.modelcontextprotocol.io/) as `io.github.cherchyk/browser` v0.2.24.
|
|
51
52
|
|
|
52
53
|
Search for "browser" in the registry to find configuration instructions.
|
|
53
54
|
|
|
54
|
-
### Option 4:
|
|
55
|
+
### Option 4: Claude Desktop
|
|
56
|
+
Add to your Claude Desktop config file:
|
|
57
|
+
|
|
58
|
+
**Config Location:**
|
|
59
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
60
|
+
- Mac: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"mcpServers": {
|
|
65
|
+
"MCPBrowser": {
|
|
66
|
+
"command": "npx",
|
|
67
|
+
"args": ["-y", "mcpbrowser@latest"]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Restart Claude Desktop after configuration.
|
|
74
|
+
|
|
75
|
+
### Option 5: Clone from GitHub (Development)
|
|
55
76
|
```bash
|
|
56
77
|
git clone https://github.com/cherchyk/MCPBrowser.git
|
|
57
78
|
cd MCPBrowser
|
|
@@ -59,22 +80,17 @@ npm install
|
|
|
59
80
|
copy .env.example .env # optional: set Chrome overrides
|
|
60
81
|
```
|
|
61
82
|
|
|
62
|
-
### Option 2: Install via npx (when published to npm)
|
|
63
|
-
```bash
|
|
64
|
-
npx mcpbrowser
|
|
65
|
-
```
|
|
66
|
-
|
|
67
83
|
## Prereqs
|
|
68
84
|
- Chrome or Edge installed.
|
|
69
85
|
- Node 18+.
|
|
70
86
|
|
|
71
|
-
## Run (automatic via
|
|
72
|
-
- Add the MCP server entry to
|
|
87
|
+
## Run (automatic via AI assistants)
|
|
88
|
+
- Add the MCP server entry to your AI assistant's config (see installation options above). The AI assistant will start the server automatically when it needs the toolβno manual launch required.
|
|
73
89
|
- On first use, the server auto-launches Chrome/Edge with remote debugging if it cannot find an existing DevTools endpoint. Defaults: port `9222`, user data dir `%LOCALAPPDATA%/ChromeAuthProfile`. Override with `CHROME_PATH`, `CHROME_USER_DATA_DIR`, or `CHROME_REMOTE_DEBUG_PORT`.
|
|
74
|
-
-
|
|
90
|
+
- Chrome startup is handled inside the MCP server.
|
|
75
91
|
|
|
76
92
|
## Manual start (optional)
|
|
77
|
-
Only if you want to run it yourself (
|
|
93
|
+
Only if you want to run it yourself (AI assistants already start it when configured):
|
|
78
94
|
```bash
|
|
79
95
|
npm run mcp
|
|
80
96
|
```
|
|
@@ -85,9 +101,9 @@ Or manually:
|
|
|
85
101
|
Set `CHROME_PATH` if auto-detect fails; override profile with `CHROME_USER_DATA_DIR`, port with `CHROME_REMOTE_DEBUG_PORT`.
|
|
86
102
|
|
|
87
103
|
## (Optional) Local runner
|
|
88
|
-
There is no local LLM runner now; Copilot
|
|
104
|
+
There is no local LLM runner now; AI assistants (Claude Code, GitHub Copilot, Claude Desktop) provide the LLM and call this MCP tool. If you need a standalone agent later, we can add one that reuses the fetch logic.
|
|
89
105
|
|
|
90
|
-
## Configure in VS Code (GitHub Copilot)
|
|
106
|
+
## Configure in VS Code (Claude Code & GitHub Copilot)
|
|
91
107
|
|
|
92
108
|
### Step 1: Locate your mcp.json file
|
|
93
109
|
- **Windows**: `%APPDATA%\Code\User\mcp.json`
|
|
@@ -114,20 +130,20 @@ Replace `<PATH_TO_MCPBROWSER>` with the full path where you cloned this reposito
|
|
|
114
130
|
Restart VS Code or reload the window for the changes to take effect.
|
|
115
131
|
|
|
116
132
|
### Step 4: Verify
|
|
117
|
-
In Copilot Chat, you should see the `MCPBrowser` server listed. Ask it to fetch an authenticated URL and it will drive your signed-in Chrome session.
|
|
133
|
+
In Claude Code or Copilot Chat, you should see the `MCPBrowser` server listed. Ask it to fetch an authenticated URL and it will drive your signed-in Chrome session.
|
|
118
134
|
|
|
119
135
|
## How it works
|
|
120
|
-
- Tool `fetch_webpage_protected` (inside the MCP server) drives your live Chrome (DevTools Protocol) so it inherits your auth cookies, returning `html` (truncated up to 2M chars) for analysis.
|
|
121
|
-
- **Smart confirmation**:
|
|
136
|
+
- Tool `fetch_webpage_protected` (inside the MCP server) drives your live Chrome/Edge (DevTools Protocol) so it inherits your auth cookies, returning `html` (truncated up to 2M chars) for analysis.
|
|
137
|
+
- **Smart confirmation**: AI assistant asks for confirmation ONLY on first request to a new domain - explains browser will open for authentication. Subsequent requests to same domain work automatically (session preserved).
|
|
122
138
|
- **Domain-aware tab reuse**: Automatically reuses the same tab for URLs on the same domain, preserving authentication session. Different domains open new tabs.
|
|
123
|
-
- **Automatic
|
|
124
|
-
- **Automatic auth detection**: Detects ANY authentication redirect (domain changes, login/auth/sso/oauth URLs) and waits for you to complete sign-in, then returns to target
|
|
125
|
-
- **Universal compatibility**: Works with
|
|
126
|
-
- **Smart timeouts**: 60s default for
|
|
127
|
-
-
|
|
139
|
+
- **Automatic page loading**: Waits for network idle (`networkidle0`) by default, ensuring JavaScript-heavy pages (SPAs, dashboards) fully load before returning content.
|
|
140
|
+
- **Automatic auth detection**: Detects ANY authentication redirect (domain changes, login/auth/sso/oauth URLs) and waits for you to complete sign-in, then returns to target page.
|
|
141
|
+
- **Universal compatibility**: Works with ANY authenticated site - corporate intranets, SSO, OAuth, SAML, login pages, etc.
|
|
142
|
+
- **Smart timeouts**: 60s default for page fetch, 10 min for auth redirects. Tabs stay open indefinitely for reuse (no auto-close).
|
|
143
|
+
- The AI assistant's LLM invokes this tool via MCP; this repo itself does not run an LLM.
|
|
128
144
|
|
|
129
145
|
## Auth-assisted fetch flow
|
|
130
|
-
-
|
|
146
|
+
- AI assistant can call with just the URL, or with no params if you set an env default (`DEFAULT_FETCH_URL` or `MCP_DEFAULT_FETCH_URL`). By default tabs stay open indefinitely for reuse (domain-aware).
|
|
131
147
|
- First call opens the tab and leaves it open so you can sign in. No extra params needed.
|
|
132
148
|
- After you sign in, call the same URL again; tab stays open for reuse. Set `keepPageOpen: false` to close immediately on success.
|
|
133
149
|
- Optional fields (`authWaitSelector`, `waitForSelector`, `waitForUrlPattern`, etc.) are available but not required.
|
|
@@ -137,12 +153,12 @@ In Copilot Chat, you should see the `MCPBrowser` server listed. Ask it to fetch
|
|
|
137
153
|
- To use a specific WS endpoint: set `CHROME_WS_ENDPOINT` from Chrome `chrome://version` DevTools JSON.
|
|
138
154
|
|
|
139
155
|
## Tips
|
|
140
|
-
- **Universal auth**: Works with ANY authenticated site
|
|
141
|
-
- **No re-authentication needed**: Automatically reuses the same tab for URLs on the same domain, keeping your auth session alive across multiple
|
|
142
|
-
- **Automatic
|
|
156
|
+
- **Universal auth**: Works with ANY authenticated site - corporate intranets, SSO, OAuth, SAML, login pages, CAPTCHA, human verification, etc.
|
|
157
|
+
- **No re-authentication needed**: Automatically reuses the same tab for URLs on the same domain, keeping your auth session alive across multiple page fetches
|
|
158
|
+
- **Automatic page loading**: Tool waits for pages to fully load (default 60s timeout, waits for network idle). AI assistant should trust the tool and not retry manually.
|
|
143
159
|
- **Auth redirect handling**: Auto-detects auth redirects by monitoring domain changes and common login URL patterns (`/login`, `/auth`, `/signin`, `/sso`, `/oauth`, `/saml`)
|
|
144
160
|
- **Tabs stay open**: By default tabs remain open indefinitely for reuse. Set `keepPageOpen: false` to close immediately after successful fetch.
|
|
145
161
|
- **Smart domain switching**: When switching domains, automatically closes the old tab and opens a new one to prevent tab accumulation
|
|
146
|
-
- If you hit login
|
|
147
|
-
- Use a dedicated profile directory to avoid interfering with your daily
|
|
148
|
-
- For heavy
|
|
162
|
+
- If you hit login pages, verify Chrome/Edge instance is signed in and the site opens there.
|
|
163
|
+
- Use a dedicated profile directory to avoid interfering with your daily browser.
|
|
164
|
+
- For heavy pages, add `waitForSelector` to ensure post-login content appears before extraction.
|
package/extension/README.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# MCP Browser
|
|
2
2
|
|
|
3
|
-
**Lightweight MCP server-extension
|
|
3
|
+
**Lightweight MCP server-extension for in-browser web page fetching.** Used when loading web page via browser is preferred - handles login, SSO, anti-crawler restrictions. Should be used when standard fetch_webpage fails.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- π **One-Click Setup**: Installs npm package and configures mcp.json automatically - complete setup with a single click
|
|
8
8
|
- π **Authentication Support**: Fetches web pages in your Chrome/Edge browser - authenticate once, reuse sessions automatically
|
|
9
|
-
- π€ **Bypass Anti-Crawler**: Fetch sites that block automated tools
|
|
9
|
+
- π€ **Bypass Anti-Crawler**: Fetch sites that block automated tools, including CAPTCHA and human verification
|
|
10
10
|
|
|
11
11
|
## How It Works
|
|
12
12
|
|
|
13
|
-
When Copilot needs to fetch
|
|
13
|
+
When Copilot needs to fetch a web page via browser:
|
|
14
14
|
1. MCPBrowser opens the URL in your Chrome/Edge browser
|
|
15
15
|
2. If authentication is required, you log in normally in the browser
|
|
16
16
|
3. MCPBrowser waits for the web page to fully load (handles redirects automatically)
|
|
@@ -53,6 +53,11 @@ Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P`):
|
|
|
53
53
|
|
|
54
54
|
Alternative web fetcher for GitHub Copilot when normal URL fetch fails. Uses Chrome DevTools Protocol to fetch authenticated and crawler-protected web pages through your browser session.
|
|
55
55
|
|
|
56
|
+
**Use cases:**
|
|
57
|
+
1. **Auth-required pages**: 401/403 errors, login pages, SSO, corporate intranets
|
|
58
|
+
2. **Anti-bot/crawler blocks**: CAPTCHA, human verification, bot detection
|
|
59
|
+
3. **JavaScript-heavy sites**: SPAs, dynamic content requiring browser rendering
|
|
60
|
+
|
|
56
61
|
Learn more: [MCPBrowser on GitHub](https://github.com/cherchyk/MCPBrowser)
|
|
57
62
|
|
|
58
63
|
## License
|
package/extension/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcpbrowser",
|
|
3
3
|
"displayName": "MCP Browser",
|
|
4
|
-
"description": "Lightweight MCP server-extension
|
|
5
|
-
"version": "0.2.
|
|
4
|
+
"description": "Lightweight MCP server-extension for in-browser web page fetching - handles login, SSO, and anti-crawler restrictions. Should be used when standard fetch_webpage fails",
|
|
5
|
+
"version": "0.2.25",
|
|
6
6
|
"publisher": "cherchyk",
|
|
7
7
|
"icon": "icon.png",
|
|
8
8
|
"engines": {
|
|
@@ -92,7 +92,7 @@ async function configureMcpBrowser() {
|
|
|
92
92
|
type: "stdio",
|
|
93
93
|
command: "npx",
|
|
94
94
|
args: ["-y", "mcpbrowser@latest"],
|
|
95
|
-
description: "In-browser web page fetching. Used
|
|
95
|
+
description: "In-browser web page fetching. Used when loading web page via browser is preferred. For Example: (1) auth-required pages (401/403, login, SSO, corporate intranets), (2) anti-bot/crawler blocks, CAPTCHA/human verification, (3) JavaScript-heavy sites (SPAs, dynamic content). Browser opens to load the page, user may be asked to authenticate or to prove it's not a robot."
|
|
96
96
|
};
|
|
97
97
|
|
|
98
98
|
// Write back to file with pretty formatting
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{ "name": "mcpbrowser",
|
|
2
|
-
"version": "0.2.
|
|
2
|
+
"version": "0.2.25",
|
|
3
3
|
"mcpName": "io.github.cherchyk/browser",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "MCP server
|
|
5
|
+
"description": "MCP server for in-browser web page fetching using Chrome DevTools Protocol",
|
|
6
6
|
"main": "src/mcp-browser.js",
|
|
7
7
|
"bin": {
|
|
8
8
|
"mcpbrowser": "src/mcp-browser.js"
|
package/server.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "io.github.cherchyk/browser",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "In-browser web page fetching using Chrome DevTools Protocol. Handles auth-required pages, anti-bot/crawler blocks, and JavaScript-heavy sites",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/cherchyk/MCPBrowser",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.25",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
package/src/mcp-browser.js
CHANGED
|
@@ -393,7 +393,7 @@ function prepareHtml(html, baseUrl) {
|
|
|
393
393
|
}
|
|
394
394
|
|
|
395
395
|
async function main() {
|
|
396
|
-
const server = new Server({ name: "MCPBrowser", version: "0.2.
|
|
396
|
+
const server = new Server({ name: "MCPBrowser", version: "0.2.25" }, { capabilities: { tools: {} } });
|
|
397
397
|
|
|
398
398
|
const tools = [
|
|
399
399
|
{
|