@pyrokine/mcp-chrome 2.3.1 → 2.4.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 -11
- package/README_zh.md +35 -8
- package/dist/anti-detection/behavior.d.ts.map +1 -1
- package/dist/anti-detection/behavior.js.map +1 -1
- package/dist/anti-detection/injection.js.map +1 -1
- package/dist/cdp/client.d.ts.map +1 -1
- package/dist/cdp/client.js.map +1 -1
- package/dist/cdp/launcher.d.ts.map +1 -1
- package/dist/cdp/launcher.js.map +1 -1
- package/dist/core/auto-wait.d.ts.map +1 -1
- package/dist/core/auto-wait.js.map +1 -1
- package/dist/core/browser-driver.d.ts.map +1 -1
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js.map +1 -1
- package/dist/core/extension-errors.d.ts.map +1 -1
- package/dist/core/locator.d.ts.map +1 -1
- package/dist/core/locator.js.map +1 -1
- package/dist/core/retry.js.map +1 -1
- package/dist/core/session.d.ts.map +1 -1
- package/dist/core/session.js.map +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/unified-session.d.ts +7 -0
- package/dist/core/unified-session.d.ts.map +1 -1
- package/dist/core/unified-session.js +21 -6
- package/dist/core/unified-session.js.map +1 -1
- package/dist/extension/bridge.d.ts.map +1 -1
- package/dist/extension/bridge.js.map +1 -1
- package/dist/extension/http-server.d.ts.map +1 -1
- package/dist/extension/http-server.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/tools/browse.d.ts.map +1 -1
- package/dist/tools/browse.js +12 -37
- package/dist/tools/browse.js.map +1 -1
- package/dist/tools/cookies.js.map +1 -1
- package/dist/tools/diagnostics.d.ts +31 -0
- package/dist/tools/diagnostics.d.ts.map +1 -0
- package/dist/tools/diagnostics.js +92 -0
- package/dist/tools/diagnostics.js.map +1 -0
- package/dist/tools/evaluate.d.ts +7 -0
- package/dist/tools/evaluate.d.ts.map +1 -1
- package/dist/tools/evaluate.js +111 -85
- package/dist/tools/evaluate.js.map +1 -1
- package/dist/tools/extract.d.ts.map +1 -1
- package/dist/tools/extract.js +26 -8
- package/dist/tools/extract.js.map +1 -1
- package/dist/tools/input.d.ts +2 -0
- package/dist/tools/input.d.ts.map +1 -1
- package/dist/tools/input.js +320 -181
- package/dist/tools/input.js.map +1 -1
- package/dist/tools/logs.d.ts +14 -0
- package/dist/tools/logs.d.ts.map +1 -1
- package/dist/tools/logs.js +37 -9
- package/dist/tools/logs.js.map +1 -1
- package/dist/tools/post-condition.d.ts +18 -1
- package/dist/tools/post-condition.d.ts.map +1 -1
- package/dist/tools/post-condition.js +49 -83
- package/dist/tools/post-condition.js.map +1 -1
- package/dist/tools/target-diagnostics.d.ts +31 -0
- package/dist/tools/target-diagnostics.d.ts.map +1 -0
- package/dist/tools/target-diagnostics.js +85 -0
- package/dist/tools/target-diagnostics.js.map +1 -0
- package/dist/tools/wait.d.ts.map +1 -1
- package/dist/tools/wait.js +203 -217
- package/dist/tools/wait.js.map +1 -1
- package/extension/dist/assets/content.ts-pEASbjEL.js +6 -0
- package/extension/dist/assets/index.ts-BMmrcSQ6.js +8713 -0
- package/extension/dist/assets/popup-BwuBB9Cz.css +142 -0
- package/extension/dist/assets/popup.html-B81xccfq.js +127 -0
- package/extension/dist/icons/icon128.png +0 -0
- package/extension/dist/icons/icon16.png +0 -0
- package/extension/dist/icons/icon48.png +0 -0
- package/extension/dist/manifest.json +63 -0
- package/extension/dist/public/icons/icon128.png +0 -0
- package/extension/dist/public/icons/icon16.png +0 -0
- package/extension/dist/public/icons/icon48.png +0 -0
- package/extension/dist/service-worker-loader.js +1 -0
- package/extension/dist/src/popup/popup.html +50 -0
- package/package.json +16 -11
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
* {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
body {
|
|
8
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
color: #333;
|
|
11
|
+
background: #fff;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.container {
|
|
15
|
+
width: 300px;
|
|
16
|
+
padding: 16px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
h1 {
|
|
20
|
+
font-size: 18px;
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
margin-bottom: 16px;
|
|
23
|
+
color: #1a1a1a;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.status-section {
|
|
27
|
+
margin-bottom: 16px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.status-indicator {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
gap: 8px;
|
|
34
|
+
padding: 12px;
|
|
35
|
+
background: #f5f5f5;
|
|
36
|
+
border-radius: 8px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.status-dot {
|
|
40
|
+
width: 10px;
|
|
41
|
+
height: 10px;
|
|
42
|
+
border-radius: 50%;
|
|
43
|
+
background: #9e9e9e;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.status-indicator.connected .status-dot {
|
|
47
|
+
background: #4caf50;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.status-indicator.disconnected .status-dot {
|
|
51
|
+
background: #f44336;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.status-text {
|
|
55
|
+
font-size: 13px;
|
|
56
|
+
color: #666;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.button-section {
|
|
60
|
+
display: flex;
|
|
61
|
+
gap: 8px;
|
|
62
|
+
margin-bottom: 16px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.auth-section {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
gap: 8px;
|
|
69
|
+
margin-bottom: 16px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.auth-label {
|
|
73
|
+
font-size: 12px;
|
|
74
|
+
color: #666;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.auth-input {
|
|
78
|
+
width: 100%;
|
|
79
|
+
padding: 9px 10px;
|
|
80
|
+
border: 1px solid #ddd;
|
|
81
|
+
border-radius: 6px;
|
|
82
|
+
font-size: 13px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.auth-help {
|
|
86
|
+
font-size: 12px;
|
|
87
|
+
color: #777;
|
|
88
|
+
line-height: 1.35;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.auth-checkbox {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
gap: 6px;
|
|
95
|
+
font-size: 12px;
|
|
96
|
+
color: #666;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.btn {
|
|
100
|
+
flex: 1;
|
|
101
|
+
padding: 10px 16px;
|
|
102
|
+
border: none;
|
|
103
|
+
border-radius: 6px;
|
|
104
|
+
font-size: 13px;
|
|
105
|
+
font-weight: 500;
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
transition: all 0.2s;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.btn:disabled {
|
|
111
|
+
opacity: 0.5;
|
|
112
|
+
cursor: not-allowed;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.btn-primary {
|
|
116
|
+
background: #2196f3;
|
|
117
|
+
color: #fff;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.btn-primary:hover:not(:disabled) {
|
|
121
|
+
background: #1976d2;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.btn-secondary {
|
|
125
|
+
background: #f5f5f5;
|
|
126
|
+
color: #333;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.btn-secondary:hover:not(:disabled) {
|
|
130
|
+
background: #e0e0e0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.info-section {
|
|
134
|
+
padding-top: 12px;
|
|
135
|
+
border-top: 1px solid #eee;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.info-text {
|
|
139
|
+
font-size: 12px;
|
|
140
|
+
color: #999;
|
|
141
|
+
text-align: center;
|
|
142
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
//#region \0vite/modulepreload-polyfill.js
|
|
2
|
+
(function polyfill() {
|
|
3
|
+
const relList = document.createElement("link").relList;
|
|
4
|
+
if (relList && relList.supports && relList.supports("modulepreload")) return;
|
|
5
|
+
for (const link of document.querySelectorAll("link[rel=\"modulepreload\"]")) processPreload(link);
|
|
6
|
+
new MutationObserver((mutations) => {
|
|
7
|
+
for (const mutation of mutations) {
|
|
8
|
+
if (mutation.type !== "childList") continue;
|
|
9
|
+
for (const node of mutation.addedNodes) if (node.tagName === "LINK" && node.rel === "modulepreload") processPreload(node);
|
|
10
|
+
}
|
|
11
|
+
}).observe(document, {
|
|
12
|
+
childList: true,
|
|
13
|
+
subtree: true
|
|
14
|
+
});
|
|
15
|
+
function getFetchOpts(link) {
|
|
16
|
+
const fetchOpts = {};
|
|
17
|
+
if (link.integrity) fetchOpts.integrity = link.integrity;
|
|
18
|
+
if (link.referrerPolicy) fetchOpts.referrerPolicy = link.referrerPolicy;
|
|
19
|
+
if (link.crossOrigin === "use-credentials") fetchOpts.credentials = "include";
|
|
20
|
+
else if (link.crossOrigin === "anonymous") fetchOpts.credentials = "omit";
|
|
21
|
+
else fetchOpts.credentials = "same-origin";
|
|
22
|
+
return fetchOpts;
|
|
23
|
+
}
|
|
24
|
+
function processPreload(link) {
|
|
25
|
+
if (link.ep) return;
|
|
26
|
+
link.ep = true;
|
|
27
|
+
const fetchOpts = getFetchOpts(link);
|
|
28
|
+
fetch(link.href, fetchOpts);
|
|
29
|
+
}
|
|
30
|
+
})();
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/popup/popup.ts
|
|
33
|
+
/**
|
|
34
|
+
* MCP Chrome Extension - Popup UI
|
|
35
|
+
*/
|
|
36
|
+
var statusIndicator = document.getElementById("statusIndicator");
|
|
37
|
+
var statusText = document.getElementById("statusText");
|
|
38
|
+
var connectBtn = document.getElementById("connectBtn");
|
|
39
|
+
var disconnectBtn = document.getElementById("disconnectBtn");
|
|
40
|
+
var pairingTokenInput = document.getElementById("pairingTokenInput");
|
|
41
|
+
var saveTokenBtn = document.getElementById("saveTokenBtn");
|
|
42
|
+
var allowInsecureNoTokenInput = document.getElementById("allowInsecureNoTokenInput");
|
|
43
|
+
var authHelp = document.getElementById("authHelp");
|
|
44
|
+
async function updateStatus() {
|
|
45
|
+
try {
|
|
46
|
+
const response = await chrome.runtime.sendMessage({ type: "GET_STATUS" });
|
|
47
|
+
if (response.connected) {
|
|
48
|
+
const ports = response.ports ?? [];
|
|
49
|
+
statusIndicator.className = "status-indicator connected";
|
|
50
|
+
if (ports.length > 1) statusText.textContent = `已连接 ${ports.length} 个服务器 (${ports.join(", ")})`;
|
|
51
|
+
else if (ports.length === 1) statusText.textContent = `已连接 (端口 ${ports[0]})`;
|
|
52
|
+
else statusText.textContent = "已连接";
|
|
53
|
+
connectBtn.disabled = true;
|
|
54
|
+
disconnectBtn.disabled = false;
|
|
55
|
+
} else {
|
|
56
|
+
statusIndicator.className = "status-indicator disconnected";
|
|
57
|
+
statusText.textContent = "未连接";
|
|
58
|
+
connectBtn.disabled = false;
|
|
59
|
+
disconnectBtn.disabled = true;
|
|
60
|
+
}
|
|
61
|
+
allowInsecureNoTokenInput.checked = response.allowInsecureNoToken === true;
|
|
62
|
+
authHelp.textContent = response.pairingTokenConfigured ? "已配置 token,只连接同 token 的 MCP Server" : response.allowInsecureNoToken ? "未配置 token,将自动连接本地 MCP Server" : "未配置 token,不会连接未认证的 MCP Server";
|
|
63
|
+
} catch (error) {
|
|
64
|
+
console.error("Failed to get status:", error);
|
|
65
|
+
statusIndicator.className = "status-indicator disconnected";
|
|
66
|
+
statusText.textContent = "未连接";
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
connectBtn.addEventListener("click", async () => {
|
|
70
|
+
connectBtn.disabled = true;
|
|
71
|
+
statusText.textContent = "连接中...";
|
|
72
|
+
try {
|
|
73
|
+
if ((await chrome.runtime.sendMessage({ type: "CONNECT" })).connected > 0) await updateStatus();
|
|
74
|
+
else {
|
|
75
|
+
statusText.textContent = "未找到 MCP Server";
|
|
76
|
+
connectBtn.disabled = false;
|
|
77
|
+
}
|
|
78
|
+
} catch (error) {
|
|
79
|
+
console.error("Connect failed:", error);
|
|
80
|
+
statusText.textContent = "连接失败";
|
|
81
|
+
connectBtn.disabled = false;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
saveTokenBtn.addEventListener("click", async () => {
|
|
85
|
+
saveTokenBtn.disabled = true;
|
|
86
|
+
try {
|
|
87
|
+
await chrome.runtime.sendMessage({
|
|
88
|
+
type: "SET_PAIRING_TOKEN",
|
|
89
|
+
token: pairingTokenInput.value
|
|
90
|
+
});
|
|
91
|
+
pairingTokenInput.value = "";
|
|
92
|
+
await updateStatus();
|
|
93
|
+
} catch (error) {
|
|
94
|
+
console.error("Save token failed:", error);
|
|
95
|
+
authHelp.textContent = "保存 token 失败";
|
|
96
|
+
} finally {
|
|
97
|
+
saveTokenBtn.disabled = false;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
allowInsecureNoTokenInput.addEventListener("change", async () => {
|
|
101
|
+
allowInsecureNoTokenInput.disabled = true;
|
|
102
|
+
try {
|
|
103
|
+
await chrome.runtime.sendMessage({
|
|
104
|
+
type: "SET_ALLOW_INSECURE_NO_TOKEN",
|
|
105
|
+
allow: allowInsecureNoTokenInput.checked
|
|
106
|
+
});
|
|
107
|
+
await updateStatus();
|
|
108
|
+
} catch (error) {
|
|
109
|
+
console.error("Save insecure mode failed:", error);
|
|
110
|
+
authHelp.textContent = "保存无 token 连接设置失败";
|
|
111
|
+
} finally {
|
|
112
|
+
allowInsecureNoTokenInput.disabled = false;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
disconnectBtn.addEventListener("click", async () => {
|
|
116
|
+
try {
|
|
117
|
+
await chrome.runtime.sendMessage({ type: "DISCONNECT" });
|
|
118
|
+
await updateStatus();
|
|
119
|
+
} catch (error) {
|
|
120
|
+
console.error("Disconnect failed:", error);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
chrome.runtime.onMessage.addListener((message) => {
|
|
124
|
+
if (message.type === "STATUS_UPDATE") updateStatus();
|
|
125
|
+
});
|
|
126
|
+
updateStatus();
|
|
127
|
+
//#endregion
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 3,
|
|
3
|
+
"name": "MCP Chrome",
|
|
4
|
+
"version": "2.4.0",
|
|
5
|
+
"description": "Browser automation for Claude Code via MCP protocol",
|
|
6
|
+
"permissions": [
|
|
7
|
+
"alarms",
|
|
8
|
+
"tabs",
|
|
9
|
+
"activeTab",
|
|
10
|
+
"scripting",
|
|
11
|
+
"webNavigation",
|
|
12
|
+
"tabGroups",
|
|
13
|
+
"cookies",
|
|
14
|
+
"debugger",
|
|
15
|
+
"storage"
|
|
16
|
+
],
|
|
17
|
+
"host_permissions": [
|
|
18
|
+
"<all_urls>"
|
|
19
|
+
],
|
|
20
|
+
"background": {
|
|
21
|
+
"service_worker": "service-worker-loader.js",
|
|
22
|
+
"type": "module"
|
|
23
|
+
},
|
|
24
|
+
"action": {
|
|
25
|
+
"default_title": "MCP Chrome",
|
|
26
|
+
"default_popup": "src/popup/popup.html",
|
|
27
|
+
"default_icon": {
|
|
28
|
+
"16": "public/icons/icon16.png",
|
|
29
|
+
"48": "public/icons/icon48.png",
|
|
30
|
+
"128": "public/icons/icon128.png"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"icons": {
|
|
34
|
+
"16": "public/icons/icon16.png",
|
|
35
|
+
"48": "public/icons/icon48.png",
|
|
36
|
+
"128": "public/icons/icon128.png"
|
|
37
|
+
},
|
|
38
|
+
"content_scripts": [
|
|
39
|
+
{
|
|
40
|
+
"js": [
|
|
41
|
+
"assets/content.ts-pEASbjEL.js"
|
|
42
|
+
],
|
|
43
|
+
"matches": [
|
|
44
|
+
"<all_urls>"
|
|
45
|
+
],
|
|
46
|
+
"run_at": "document_idle",
|
|
47
|
+
"all_frames": true,
|
|
48
|
+
"match_about_blank": true,
|
|
49
|
+
"match_origin_as_fallback": true
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"web_accessible_resources": [
|
|
53
|
+
{
|
|
54
|
+
"matches": [
|
|
55
|
+
"<all_urls>"
|
|
56
|
+
],
|
|
57
|
+
"resources": [
|
|
58
|
+
"assets/content.ts-pEASbjEL.js"
|
|
59
|
+
],
|
|
60
|
+
"use_dynamic_url": false
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './assets/index.ts-BMmrcSQ6.js';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang='zh-CN'>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset='UTF-8'>
|
|
5
|
+
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
|
|
6
|
+
<title>MCP Chrome</title>
|
|
7
|
+
<script type="module" crossorigin src="/assets/popup.html-B81xccfq.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/assets/popup-BwuBB9Cz.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div class='container'>
|
|
12
|
+
<h1>MCP Chrome</h1>
|
|
13
|
+
|
|
14
|
+
<div class='status-section'>
|
|
15
|
+
<div class='status-indicator' id='statusIndicator'>
|
|
16
|
+
<span class='status-dot'></span>
|
|
17
|
+
<span class='status-text' id='statusText'>检查中...</span>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div class='button-section'>
|
|
22
|
+
<button class='btn btn-primary' id='connectBtn'>连接</button>
|
|
23
|
+
<button class='btn btn-secondary' disabled id='disconnectBtn'>断开</button>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class='auth-section'>
|
|
27
|
+
<label class='auth-label' for='pairingTokenInput'>Pairing token</label>
|
|
28
|
+
<input autocomplete='off' class='auth-input' id='pairingTokenInput'
|
|
29
|
+
placeholder='可选,必须与 MCP_CHROME_PAIRING_TOKEN 一致'
|
|
30
|
+
type='password'>
|
|
31
|
+
<button class='btn btn-secondary' id='saveTokenBtn'>保存 token</button>
|
|
32
|
+
<label class='auth-checkbox'>
|
|
33
|
+
<input id='allowInsecureNoTokenInput' type='checkbox'>
|
|
34
|
+
允许无 token 本地连接
|
|
35
|
+
</label>
|
|
36
|
+
<p class='auth-help' id='authHelp'>默认自动连接本地 MCP Server,可用 pairing token 加固</p>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class='info-section'>
|
|
40
|
+
<p class='info-text'>
|
|
41
|
+
通过 WebSocket 与 MCP Server 通信
|
|
42
|
+
</p>
|
|
43
|
+
<p class='info-text'>
|
|
44
|
+
服务端口范围:19222-19299
|
|
45
|
+
</p>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
</body>
|
|
50
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pyrokine/mcp-chrome",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Chrome browser automation MCP Server using Chrome DevTools Protocol",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"build": "tsc",
|
|
8
|
+
"build": "node node_modules/typescript7/bin/tsc",
|
|
9
|
+
"build:extension": "npm --prefix extension ci --include=optional && npm --prefix extension run build",
|
|
9
10
|
"start": "node dist/index.js",
|
|
10
|
-
"dev": "tsc -w",
|
|
11
|
+
"dev": "node node_modules/typescript7/bin/tsc -w",
|
|
11
12
|
"prepare": "npm run build",
|
|
13
|
+
"prepack": "npm run build && npm run build:extension",
|
|
12
14
|
"lint": "eslint \"src/**/*.ts\" \"extension/src/**/*.ts\"",
|
|
13
15
|
"lint:fix": "eslint \"src/**/*.ts\" \"extension/src/**/*.ts\" --fix",
|
|
14
16
|
"format": "prettier --write src/",
|
|
15
|
-
"format:check": "prettier --check src/"
|
|
17
|
+
"format:check": "prettier --check src/",
|
|
18
|
+
"test": "npm run build && node --test test/ch-regressions.test.js"
|
|
16
19
|
},
|
|
17
20
|
"keywords": [
|
|
18
21
|
"mcp",
|
|
@@ -26,26 +29,28 @@
|
|
|
26
29
|
"license": "MIT",
|
|
27
30
|
"dependencies": {
|
|
28
31
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
29
|
-
"ws": "^8.21.
|
|
32
|
+
"ws": "^8.21.1",
|
|
30
33
|
"zod": "^4.4.3"
|
|
31
34
|
},
|
|
32
35
|
"devDependencies": {
|
|
33
36
|
"@eslint/js": "^10.0.1",
|
|
34
|
-
"@types/node": "^
|
|
37
|
+
"@types/node": "^26.1.1",
|
|
35
38
|
"@types/ws": "^8.18.1",
|
|
36
|
-
"eslint": "^10.
|
|
37
|
-
"prettier": "^3.
|
|
38
|
-
"typescript": "
|
|
39
|
-
"typescript-eslint": "^8.
|
|
39
|
+
"eslint": "^10.7.0",
|
|
40
|
+
"prettier": "^3.9.5",
|
|
41
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
42
|
+
"typescript-eslint": "^8.64.0",
|
|
43
|
+
"typescript7": "npm:typescript@^7.0.2"
|
|
40
44
|
},
|
|
41
45
|
"engines": {
|
|
42
|
-
"node": ">=
|
|
46
|
+
"node": ">=20.19.0"
|
|
43
47
|
},
|
|
44
48
|
"bin": {
|
|
45
49
|
"mcp-chrome": "dist/index.js"
|
|
46
50
|
},
|
|
47
51
|
"files": [
|
|
48
52
|
"dist",
|
|
53
|
+
"extension/dist",
|
|
49
54
|
"README.md",
|
|
50
55
|
"README_zh.md",
|
|
51
56
|
"LICENSE"
|