mcpbrowser 0.2.14 → 0.2.15
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 +4 -4
- package/extension/package.json +1 -1
- package/package.json +1 -1
- package/src/mcp-browser.js +5 -5
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ Or search "MCPBrowser" in VS Code Extensions view.
|
|
|
19
19
|
**From GitHub Release:**
|
|
20
20
|
Download from [GitHub Releases](https://github.com/cherchyk/MCPBrowser/releases):
|
|
21
21
|
```bash
|
|
22
|
-
code --install-extension mcpbrowser-0.2.
|
|
22
|
+
code --install-extension mcpbrowser-0.2.15.vsix
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
The extension automatically:
|
|
@@ -30,7 +30,7 @@ The extension automatically:
|
|
|
30
30
|
📦 [View on Marketplace](https://marketplace.visualstudio.com/items?itemName=cherchyk.mcpbrowser)
|
|
31
31
|
|
|
32
32
|
### Option 2: npm Package (Recommended for Manual Setup)
|
|
33
|
-
Published on npm as [mcpbrowser](https://www.npmjs.com/package/mcpbrowser) v0.2.
|
|
33
|
+
Published on npm as [mcpbrowser](https://www.npmjs.com/package/mcpbrowser) v0.2.15.
|
|
34
34
|
|
|
35
35
|
Add to your `mcp.json`:
|
|
36
36
|
```jsonc
|
|
@@ -47,7 +47,7 @@ Add to your `mcp.json`:
|
|
|
47
47
|
- Mac/Linux: `~/.config/Code/User/mcp.json`
|
|
48
48
|
|
|
49
49
|
### Option 3: MCP Registry
|
|
50
|
-
Available in the [MCP Registry](https://registry.modelcontextprotocol.io/) as `io.github.cherchyk/browser` v0.2.
|
|
50
|
+
Available in the [MCP Registry](https://registry.modelcontextprotocol.io/) as `io.github.cherchyk/browser` v0.2.15.
|
|
51
51
|
|
|
52
52
|
Search for "browser" in the registry to find configuration instructions.
|
|
53
53
|
|
|
@@ -117,7 +117,7 @@ Restart VS Code or reload the window for the changes to take effect.
|
|
|
117
117
|
In Copilot Chat, you should see the `MCPBrowser` server listed. Ask it to load an authenticated URL and it will drive your signed-in Chrome session.
|
|
118
118
|
|
|
119
119
|
## How it works
|
|
120
|
-
- Tool `
|
|
120
|
+
- Tool `fetch_webpage_protected` (inside the MCP server) drives your live Chrome (DevTools Protocol) so it inherits your auth cookies, returning `text` and `html` (truncated up to 2M chars per field) for analysis.
|
|
121
121
|
- **Smart confirmation**: Copilot 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
122
|
- **Domain-aware tab reuse**: Automatically reuses the same tab for URLs on the same domain, preserving authentication session. Different domains open new tabs.
|
|
123
123
|
- **Automatic page loading**: Waits for network idle (`networkidle0`) by default, ensuring JavaScript-heavy pages (SPAs, dashboards) fully load before returning content.
|
package/extension/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "mcpbrowser",
|
|
3
3
|
"displayName": "MCP Browser",
|
|
4
4
|
"description": "Extends Copilot's web access to protected pages - handles login, SSO, and anti-crawler restrictions",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.15",
|
|
6
6
|
"publisher": "cherchyk",
|
|
7
7
|
"icon": "icon.png",
|
|
8
8
|
"engines": {
|
package/package.json
CHANGED
package/src/mcp-browser.js
CHANGED
|
@@ -253,7 +253,7 @@ async function fetchPage({
|
|
|
253
253
|
} catch (err) {
|
|
254
254
|
shouldKeepOpen = shouldKeepOpen || keepPageOpen;
|
|
255
255
|
const hint = shouldKeepOpen
|
|
256
|
-
? "Tab is left open. Complete sign-in there, then call
|
|
256
|
+
? "Tab is left open. Complete sign-in there, then call fetch_webpage_protected again with just the URL."
|
|
257
257
|
: undefined;
|
|
258
258
|
return { success: false, error: err.message || String(err), pageKeptOpen: shouldKeepOpen, hint };
|
|
259
259
|
} finally {
|
|
@@ -272,12 +272,12 @@ function truncate(str, max) {
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
async function main() {
|
|
275
|
-
const server = new Server({ name: "MCPBrowser", version: "0.2.
|
|
275
|
+
const server = new Server({ name: "MCPBrowser", version: "0.2.15" }, { capabilities: { tools: {} } });
|
|
276
276
|
|
|
277
277
|
const tools = [
|
|
278
278
|
{
|
|
279
|
-
name: "
|
|
280
|
-
description: "🌐 PRIMARY BROWSER TOOL for authenticated/protected websites: Opens pages in your Chrome browser with your actual user profile (saved passwords, extensions, active sessions). **USE THIS FIRST** for: internal/corporate sites (*.microsoft.com, *.eng.ms, etc.), login-required pages, SSO/OAuth protected content, paywalled sites, anti-bot protected pages, or any 401/403/authentication errors.
|
|
279
|
+
name: "fetch_webpage_protected",
|
|
280
|
+
description: "🌐 PRIMARY BROWSER TOOL for authenticated/protected websites: Opens pages in your Chrome browser with your actual user profile (saved passwords, extensions, active sessions). **USE THIS FIRST** for: internal/corporate sites (*.microsoft.com, *.eng.ms, etc.), login-required pages, SSO/OAuth protected content, paywalled sites, anti-bot protected pages, or any 401/403/authentication errors. **AUTHENTICATION FLOW**: First call with keepPageOpen=true may return login page (EXPECTED - user is authenticating in browser). WAIT 10-30 seconds, then RETRY the same URL - authentication completes in background. DO NOT give up after seeing login page - retry 2-3 times with delays. Returns both plain text and HTML. Tab reuse preserves sessions across requests. Always prefer this over generic URL fetchers for authenticated content.",
|
|
281
281
|
inputSchema: {
|
|
282
282
|
type: "object",
|
|
283
283
|
properties: {
|
|
@@ -297,7 +297,7 @@ async function main() {
|
|
|
297
297
|
|
|
298
298
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
299
299
|
const { name, arguments: args } = request.params;
|
|
300
|
-
if (name !== "
|
|
300
|
+
if (name !== "fetch_webpage_protected") {
|
|
301
301
|
throw new Error(`Unknown tool: ${name}`);
|
|
302
302
|
}
|
|
303
303
|
const safeArgs = args || {};
|