mcpbrowser 0.2.2 → 0.2.3

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 (125) hide show
  1. package/README.md +34 -19
  2. package/package.json +1 -1
  3. package/server.json +2 -2
  4. package/.mcpregistry_github_token +0 -1
  5. package/.mcpregistry_registry_token +0 -1
  6. package/extension/mcpbrowser-0.1.1.vsix +0 -0
  7. package/extension/mcpbrowser-0.1.2.vsix +0 -0
  8. package/extension/mcpbrowser-0.1.3.vsix +0 -0
  9. package/extension/mcpbrowser-0.1.4.vsix +0 -0
  10. package/extension/mcpbrowser-config-0.1.0.vsix +0 -0
  11. package/extension/node_modules/.package-lock.json +0 -32
  12. package/extension/node_modules/@types/node/LICENSE +0 -21
  13. package/extension/node_modules/@types/node/README.md +0 -15
  14. package/extension/node_modules/@types/node/assert/strict.d.ts +0 -8
  15. package/extension/node_modules/@types/node/assert.d.ts +0 -1062
  16. package/extension/node_modules/@types/node/async_hooks.d.ts +0 -605
  17. package/extension/node_modules/@types/node/buffer.buffer.d.ts +0 -471
  18. package/extension/node_modules/@types/node/buffer.d.ts +0 -1936
  19. package/extension/node_modules/@types/node/child_process.d.ts +0 -1475
  20. package/extension/node_modules/@types/node/cluster.d.ts +0 -577
  21. package/extension/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  22. package/extension/node_modules/@types/node/compatibility/index.d.ts +0 -9
  23. package/extension/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  24. package/extension/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  25. package/extension/node_modules/@types/node/console.d.ts +0 -452
  26. package/extension/node_modules/@types/node/constants.d.ts +0 -21
  27. package/extension/node_modules/@types/node/crypto.d.ts +0 -4590
  28. package/extension/node_modules/@types/node/dgram.d.ts +0 -597
  29. package/extension/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  30. package/extension/node_modules/@types/node/dns/promises.d.ts +0 -479
  31. package/extension/node_modules/@types/node/dns.d.ts +0 -871
  32. package/extension/node_modules/@types/node/domain.d.ts +0 -170
  33. package/extension/node_modules/@types/node/events.d.ts +0 -977
  34. package/extension/node_modules/@types/node/fs/promises.d.ts +0 -1270
  35. package/extension/node_modules/@types/node/fs.d.ts +0 -4375
  36. package/extension/node_modules/@types/node/globals.d.ts +0 -172
  37. package/extension/node_modules/@types/node/globals.typedarray.d.ts +0 -38
  38. package/extension/node_modules/@types/node/http.d.ts +0 -2049
  39. package/extension/node_modules/@types/node/http2.d.ts +0 -2631
  40. package/extension/node_modules/@types/node/https.d.ts +0 -578
  41. package/extension/node_modules/@types/node/index.d.ts +0 -93
  42. package/extension/node_modules/@types/node/inspector.generated.d.ts +0 -3966
  43. package/extension/node_modules/@types/node/module.d.ts +0 -539
  44. package/extension/node_modules/@types/node/net.d.ts +0 -1012
  45. package/extension/node_modules/@types/node/os.d.ts +0 -506
  46. package/extension/node_modules/@types/node/package.json +0 -140
  47. package/extension/node_modules/@types/node/path.d.ts +0 -200
  48. package/extension/node_modules/@types/node/perf_hooks.d.ts +0 -961
  49. package/extension/node_modules/@types/node/process.d.ts +0 -1957
  50. package/extension/node_modules/@types/node/punycode.d.ts +0 -117
  51. package/extension/node_modules/@types/node/querystring.d.ts +0 -152
  52. package/extension/node_modules/@types/node/readline/promises.d.ts +0 -162
  53. package/extension/node_modules/@types/node/readline.d.ts +0 -589
  54. package/extension/node_modules/@types/node/repl.d.ts +0 -430
  55. package/extension/node_modules/@types/node/sea.d.ts +0 -153
  56. package/extension/node_modules/@types/node/stream/consumers.d.ts +0 -38
  57. package/extension/node_modules/@types/node/stream/promises.d.ts +0 -90
  58. package/extension/node_modules/@types/node/stream/web.d.ts +0 -533
  59. package/extension/node_modules/@types/node/stream.d.ts +0 -1675
  60. package/extension/node_modules/@types/node/string_decoder.d.ts +0 -67
  61. package/extension/node_modules/@types/node/test.d.ts +0 -1787
  62. package/extension/node_modules/@types/node/timers/promises.d.ts +0 -108
  63. package/extension/node_modules/@types/node/timers.d.ts +0 -286
  64. package/extension/node_modules/@types/node/tls.d.ts +0 -1255
  65. package/extension/node_modules/@types/node/trace_events.d.ts +0 -197
  66. package/extension/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -468
  67. package/extension/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -34
  68. package/extension/node_modules/@types/node/ts5.6/index.d.ts +0 -93
  69. package/extension/node_modules/@types/node/tty.d.ts +0 -208
  70. package/extension/node_modules/@types/node/url.d.ts +0 -964
  71. package/extension/node_modules/@types/node/util.d.ts +0 -2331
  72. package/extension/node_modules/@types/node/v8.d.ts +0 -809
  73. package/extension/node_modules/@types/node/vm.d.ts +0 -1001
  74. package/extension/node_modules/@types/node/wasi.d.ts +0 -181
  75. package/extension/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  76. package/extension/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  77. package/extension/node_modules/@types/node/web-globals/events.d.ts +0 -97
  78. package/extension/node_modules/@types/node/web-globals/fetch.d.ts +0 -46
  79. package/extension/node_modules/@types/node/worker_threads.d.ts +0 -715
  80. package/extension/node_modules/@types/node/zlib.d.ts +0 -540
  81. package/extension/node_modules/@types/vscode/LICENSE +0 -21
  82. package/extension/node_modules/@types/vscode/README.md +0 -15
  83. package/extension/node_modules/@types/vscode/index.d.ts +0 -21153
  84. package/extension/node_modules/@types/vscode/package.json +0 -26
  85. package/extension/node_modules/undici-types/LICENSE +0 -21
  86. package/extension/node_modules/undici-types/README.md +0 -6
  87. package/extension/node_modules/undici-types/agent.d.ts +0 -31
  88. package/extension/node_modules/undici-types/api.d.ts +0 -43
  89. package/extension/node_modules/undici-types/balanced-pool.d.ts +0 -29
  90. package/extension/node_modules/undici-types/cache.d.ts +0 -36
  91. package/extension/node_modules/undici-types/client.d.ts +0 -108
  92. package/extension/node_modules/undici-types/connector.d.ts +0 -34
  93. package/extension/node_modules/undici-types/content-type.d.ts +0 -21
  94. package/extension/node_modules/undici-types/cookies.d.ts +0 -28
  95. package/extension/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  96. package/extension/node_modules/undici-types/dispatcher.d.ts +0 -256
  97. package/extension/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  98. package/extension/node_modules/undici-types/errors.d.ts +0 -149
  99. package/extension/node_modules/undici-types/eventsource.d.ts +0 -61
  100. package/extension/node_modules/undici-types/fetch.d.ts +0 -209
  101. package/extension/node_modules/undici-types/file.d.ts +0 -39
  102. package/extension/node_modules/undici-types/filereader.d.ts +0 -54
  103. package/extension/node_modules/undici-types/formdata.d.ts +0 -108
  104. package/extension/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  105. package/extension/node_modules/undici-types/global-origin.d.ts +0 -7
  106. package/extension/node_modules/undici-types/handlers.d.ts +0 -15
  107. package/extension/node_modules/undici-types/header.d.ts +0 -4
  108. package/extension/node_modules/undici-types/index.d.ts +0 -71
  109. package/extension/node_modules/undici-types/interceptors.d.ts +0 -17
  110. package/extension/node_modules/undici-types/mock-agent.d.ts +0 -50
  111. package/extension/node_modules/undici-types/mock-client.d.ts +0 -25
  112. package/extension/node_modules/undici-types/mock-errors.d.ts +0 -12
  113. package/extension/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  114. package/extension/node_modules/undici-types/mock-pool.d.ts +0 -25
  115. package/extension/node_modules/undici-types/package.json +0 -55
  116. package/extension/node_modules/undici-types/patch.d.ts +0 -33
  117. package/extension/node_modules/undici-types/pool-stats.d.ts +0 -19
  118. package/extension/node_modules/undici-types/pool.d.ts +0 -39
  119. package/extension/node_modules/undici-types/proxy-agent.d.ts +0 -28
  120. package/extension/node_modules/undici-types/readable.d.ts +0 -65
  121. package/extension/node_modules/undici-types/retry-agent.d.ts +0 -8
  122. package/extension/node_modules/undici-types/retry-handler.d.ts +0 -116
  123. package/extension/node_modules/undici-types/util.d.ts +0 -18
  124. package/extension/node_modules/undici-types/webidl.d.ts +0 -228
  125. package/extension/node_modules/undici-types/websocket.d.ts +0 -150
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![npm version](https://img.shields.io/npm/v/mcpbrowser.svg)](https://www.npmjs.com/package/mcpbrowser)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
6
 
7
- Alternative web fetcher for GitHub Copilot when normal URL access fails due to authentication or anti-crawler restrictions. Uses your Chrome/Edge browser session via DevTools to bypass login requirements and bot detection.
7
+ Alternative web fetcher for GitHub Copilot when normal URL access fails due to authentication or anti-crawler restrictions. Uses your Chrome/Edge browser session via DevTools Protocol to bypass login requirements and bot detection.
8
8
 
9
9
  ## 🚀 Installation Options
10
10
 
@@ -59,14 +59,9 @@ npm install
59
59
  copy .env.example .env # optional: set Chrome overrides
60
60
  ```
61
61
 
62
- Add to `mcp.json`:
63
- ```jsonc
64
- "MCPBrowser": {
65
- "type": "stdio",
66
- "command": "node",
67
- "args": ["<PATH_TO_MCPBROWSER>/src/mcp-browser.js"],
68
- "description": "Loads authenticated web pages using your Chrome session"
69
- }
62
+ ### Option 2: Install via npx (when published to npm)
63
+ ```bash
64
+ npx mcpbrowser
70
65
  ```
71
66
 
72
67
  ## Prereqs
@@ -92,8 +87,38 @@ Set `CHROME_PATH` if auto-detect fails; override profile with `CHROME_USER_DATA_
92
87
  ## (Optional) Local runner
93
88
  There is no local LLM runner now; Copilot provides the LLM and calls this MCP tool. If you need a standalone agent later, we can add one that reuses the fetch logic.
94
89
 
90
+ ## Configure in VS Code (GitHub Copilot)
91
+
92
+ ### Step 1: Locate your mcp.json file
93
+ - **Windows**: `%APPDATA%\Code\User\mcp.json`
94
+ - **Linux/Mac**: `~/.config/Code/User/mcp.json`
95
+
96
+ ### Step 2: Add MCPBrowser server configuration
97
+
98
+ Add this entry to your `mcp.json` file under the `"servers"` section:
99
+
100
+ ```jsonc
101
+ "MCPBrowser": {
102
+ "type": "stdio",
103
+ "command": "node",
104
+ "args": ["<PATH_TO_MCPBROWSER>/src/mcp-browser.js"],
105
+ "description": "**USE THIS AUTOMATICALLY** when you encounter ANY authentication/authorization barrier: 401/403 errors, login redirects, 'access denied', SSO prompts, or pages requiring sign-in. Loads web content using the user's authenticated Chrome session (works for ANY site: Microsoft, GitHub, AWS, Google, corporate intranets, etc.). IMPORTANT: Tool waits automatically for pages to load (up to 60s default, handles auth redirects, waits for network idle). Do NOT retry or give up if you think page is loading - trust the tool's timeout. Do NOT ask permission - use immediately when auth is required."
106
+ }
107
+ ```
108
+
109
+ Replace `<PATH_TO_MCPBROWSER>` with the full path where you cloned this repository, for example:
110
+ - Windows: `"D:/dev/MCPBrowser/src/mcp-browser.js"`
111
+ - Linux/Mac: `"/home/user/MCPBrowser/src/mcp-browser.js"`
112
+
113
+ ### Step 3: Reload VS Code
114
+ Restart VS Code or reload the window for the changes to take effect.
115
+
116
+ ### Step 4: Verify
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
+
95
119
  ## How it works
96
120
  - Tool `load_and_extract` (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
+ - **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).
97
122
  - **Domain-aware tab reuse**: Automatically reuses the same tab for URLs on the same domain, preserving authentication session. Different domains open new tabs.
98
123
  - **Automatic page loading**: Waits for network idle (`networkidle0`) by default, ensuring JavaScript-heavy pages (SPAs, dashboards) fully load before returning content.
99
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 page.
@@ -101,16 +126,6 @@ There is no local LLM runner now; Copilot provides the LLM and calls this MCP to
101
126
  - **Smart timeouts**: 60s default for page load, 10 min for auth redirects. Tabs stay open indefinitely for reuse (no auto-close).
102
127
  - GitHub Copilot's LLM invokes this tool via MCP; this repo itself does not run an LLM.
103
128
 
104
- ## Distribution
105
-
106
- MCPBrowser is available through three channels:
107
-
108
- 1. **VS Code Extension** (easiest): [cherchyk.mcpbrowser](https://marketplace.visualstudio.com/items?itemName=cherchyk.mcpbrowser) - One-click configuration
109
- 2. **npm**: [mcpbrowser](https://www.npmjs.com/package/mcpbrowser) v0.2.2 - Use with npx
110
- 3. **MCP Registry**: [io.github.cherchyk/browser](https://registry.modelcontextprotocol.io/) v0.2.2 - Discoverable in registry
111
-
112
- All three methods configure the same underlying MCP server that drives Chrome via DevTools Protocol.
113
-
114
129
  ## Auth-assisted fetch flow
115
130
  - Copilot 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).
116
131
  - First call opens the tab and leaves it open so you can sign in. No extra params needed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcpbrowser",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "mcpName": "io.github.cherchyk/browser",
5
5
  "type": "module",
6
6
  "description": "MCP server that loads authenticated web pages using Chrome DevTools Protocol",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/cherchyk/MCPBrowser",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.2.1",
9
+ "version": "0.2.3",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "mcpbrowser",
14
- "version": "0.2.1",
14
+ "version": "0.2.3",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  }
@@ -1 +0,0 @@
1
- ghu_GEGvUt8NgjqiZYHTwekKgM9yUsX1n22fSpJ5
@@ -1 +0,0 @@
1
- {"token":"eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJtY3AtcmVnaXN0cnkiLCJleHAiOjE3NjY0MjQ1NTMsIm5iZiI6MTc2NjQyNDI1MywiaWF0IjoxNzY2NDI0MjUzLCJhdXRoX21ldGhvZCI6ImdpdGh1Yi1hdCIsImF1dGhfbWV0aG9kX3N1YiI6ImNoZXJjaHlrIiwicGVybWlzc2lvbnMiOlt7ImFjdGlvbiI6InB1Ymxpc2giLCJyZXNvdXJjZSI6ImlvLmdpdGh1Yi5jaGVyY2h5ay8qIn1dfQ.pVy-6UXIaWbfS_fZH6fw2g_tQluhRxxY_zfkp3sFwl_dMDf3io17bu12WkWwSl5k9OoWVNtGpu1gooWrvvj0Bg","expires_at":1766424553}
Binary file
Binary file
Binary file
Binary file
@@ -1,32 +0,0 @@
1
- {
2
- "name": "mcpbrowser",
3
- "version": "0.1.2",
4
- "lockfileVersion": 3,
5
- "requires": true,
6
- "packages": {
7
- "node_modules/@types/node": {
8
- "version": "20.19.27",
9
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.27.tgz",
10
- "integrity": "sha512-N2clP5pJhB2YnZJ3PIHFk5RkygRX5WO/5f0WC08tp0wd+sv0rsJk3MqWn3CbNmT2J505a5336jaQj4ph1AdMug==",
11
- "dev": true,
12
- "license": "MIT",
13
- "dependencies": {
14
- "undici-types": "~6.21.0"
15
- }
16
- },
17
- "node_modules/@types/vscode": {
18
- "version": "1.107.0",
19
- "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.107.0.tgz",
20
- "integrity": "sha512-XS8YE1jlyTIowP64+HoN30OlC1H9xqSlq1eoLZUgFEC8oUTO6euYZxti1xRiLSfZocs4qytTzR6xCBYtioQTCg==",
21
- "dev": true,
22
- "license": "MIT"
23
- },
24
- "node_modules/undici-types": {
25
- "version": "6.21.0",
26
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
27
- "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
28
- "dev": true,
29
- "license": "MIT"
30
- }
31
- }
32
- }
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
@@ -1,15 +0,0 @@
1
- # Installation
2
- > `npm install --save @types/node`
3
-
4
- # Summary
5
- This package contains type definitions for node (https://nodejs.org/).
6
-
7
- # Details
8
- Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v20.
9
-
10
- ### Additional Details
11
- * Last updated: Sun, 14 Dec 2025 00:04:32 GMT
12
- * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
-
14
- # Credits
15
- These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky).
@@ -1,8 +0,0 @@
1
- declare module "assert/strict" {
2
- import { strict } from "node:assert";
3
- export = strict;
4
- }
5
- declare module "node:assert/strict" {
6
- import { strict } from "node:assert";
7
- export = strict;
8
- }