@mehmoodqureshi/chrome-mcp 0.1.0 → 0.2.0
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 +38 -5
- package/dist/shared/protocol.d.ts +1 -1
- package/dist/shared/protocol.js +4 -0
- package/dist/shared/snapshot.d.ts +26 -0
- package/dist/shared/snapshot.js +92 -0
- package/dist/src/bridge/auth.d.ts +23 -1
- package/dist/src/bridge/auth.js +68 -1
- package/dist/src/cli.js +7 -1
- package/dist/src/config.d.ts +2 -0
- package/dist/src/config.js +8 -0
- package/dist/src/executor/cdp-executor.d.ts +24 -1
- package/dist/src/executor/cdp-executor.js +72 -1
- package/dist/src/executor/extension-executor.d.ts +24 -1
- package/dist/src/executor/extension-executor.js +14 -2
- package/dist/src/executor/stub-executor.d.ts +10 -1
- package/dist/src/executor/stub-executor.js +19 -0
- package/dist/src/executor/types.d.ts +60 -0
- package/dist/src/mcp/tools.js +43 -2
- package/extension-dist/background.js +307 -25
- package/extension-dist/manifest.json +2 -2
- package/extension-dist/options.js +6 -3
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest_version": 3,
|
|
3
3
|
"name": "Chrome MCP Bridge",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"description": "Lets a local chrome-mcp server drive this browser. Pair it with the server's handshake token.",
|
|
6
6
|
"minimum_chrome_version": "116",
|
|
7
7
|
"background": { "service_worker": "background.js" },
|
|
8
|
-
"permissions": ["tabs", "scripting", "activeTab", "downloads", "storage", "alarms"],
|
|
8
|
+
"permissions": ["tabs", "scripting", "activeTab", "downloads", "storage", "alarms", "cookies", "debugger"],
|
|
9
9
|
"host_permissions": ["http://*/*", "https://*/*"],
|
|
10
10
|
"options_page": "options.html",
|
|
11
11
|
"action": { "default_title": "Chrome MCP — open options to pair" }
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
+
// shared/protocol.ts
|
|
4
|
+
var DEFAULT_WS_PORT = 38017;
|
|
5
|
+
|
|
3
6
|
// extension/src/options/options.ts
|
|
4
7
|
var portEl = document.getElementById("port");
|
|
5
8
|
var tokenEl = document.getElementById("token");
|
|
@@ -7,7 +10,7 @@
|
|
|
7
10
|
var statusEl = document.getElementById("status");
|
|
8
11
|
async function loadExisting() {
|
|
9
12
|
const { wsPort, connState } = await chrome.storage.local.get(["wsPort", "connState"]);
|
|
10
|
-
|
|
13
|
+
portEl.value = typeof wsPort === "number" && wsPort > 0 ? String(wsPort) : String(DEFAULT_WS_PORT);
|
|
11
14
|
render(typeof connState === "string" ? connState : "idle");
|
|
12
15
|
}
|
|
13
16
|
function render(state) {
|
|
@@ -22,8 +25,8 @@
|
|
|
22
25
|
saveEl.addEventListener("click", async () => {
|
|
23
26
|
const wsPort = Number(portEl.value);
|
|
24
27
|
const token = tokenEl.value.trim();
|
|
25
|
-
if (!Number.isInteger(wsPort) || wsPort
|
|
26
|
-
statusEl.textContent = "Status: enter a valid port and token";
|
|
28
|
+
if (!Number.isInteger(wsPort) || wsPort <= 0 || !token) {
|
|
29
|
+
statusEl.textContent = "Status: enter a valid port (> 0) and token";
|
|
27
30
|
return;
|
|
28
31
|
}
|
|
29
32
|
await chrome.storage.local.set({ wsPort, token });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mehmoodqureshi/chrome-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Drive a real Chrome browser over MCP. A stdio MCP server (CLI) plus an MV3 extension, behind one pluggable Executor (extension via chrome.scripting, or a Playwright CDP fallback).",
|
|
5
5
|
"author": "Mehmood Ur Rehman Qureshi",
|
|
6
6
|
"license": "MIT",
|
|
@@ -64,6 +64,6 @@
|
|
|
64
64
|
"typescript": "^5.7.2"
|
|
65
65
|
},
|
|
66
66
|
"engines": {
|
|
67
|
-
"node": ">=
|
|
67
|
+
"node": ">=18.0.0"
|
|
68
68
|
}
|
|
69
69
|
}
|