mcp-chrome-bridger 1.0.10 → 1.0.11
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/dist/index.js +0 -0
- package/dist/mcp/mcp-server-stdio.js +0 -0
- package/dist/run_host.sh +0 -0
- package/dist/scripts/postinstall.js +26 -94
- package/dist/scripts/postinstall.js.map +1 -1
- package/package.json +15 -15
- package/LICENSE +0 -21
package/dist/index.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/run_host.sh
CHANGED
|
File without changes
|
|
@@ -11,45 +11,15 @@ const constant_1 = require("./constant");
|
|
|
11
11
|
const utils_1 = require("./utils");
|
|
12
12
|
// Check if this script is run directly
|
|
13
13
|
const isDirectRun = require.main === module;
|
|
14
|
-
//
|
|
15
|
-
function
|
|
16
|
-
//
|
|
17
|
-
|
|
14
|
+
// Check if we're in a monorepo/workspace development environment
|
|
15
|
+
function isWorkspaceDev() {
|
|
16
|
+
// If we're inside a .pnpm store or node_modules of a workspace, skip auto-register
|
|
17
|
+
// This prevents overwriting developer's local native host config during pnpm install
|
|
18
|
+
if (__dirname.includes('/node_modules/.pnpm/') || __dirname.includes('\\node_modules\\.pnpm\\')) {
|
|
18
19
|
return true;
|
|
19
20
|
}
|
|
20
|
-
// pnpm detection methods
|
|
21
|
-
// Method 1: Check if PNPM_HOME is set and current path contains it
|
|
22
|
-
if (process.env.PNPM_HOME && __dirname.includes(process.env.PNPM_HOME)) {
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
// Method 2: Check if we're in a global pnpm directory structure
|
|
26
|
-
// pnpm global packages are typically installed in ~/.local/share/pnpm/global/5/node_modules
|
|
27
|
-
// Windows: %APPDATA%\pnpm\global\5\node_modules
|
|
28
|
-
const globalPnpmPatterns = process.platform === 'win32'
|
|
29
|
-
? ['\\pnpm\\global\\', '\\pnpm-global\\', '\\AppData\\Roaming\\pnpm\\']
|
|
30
|
-
: ['/pnpm/global/', '/.local/share/pnpm/', '/pnpm-global/'];
|
|
31
|
-
if (globalPnpmPatterns.some((pattern) => __dirname.includes(pattern))) {
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
// Method 3: Check npm_config_prefix for pnpm
|
|
35
|
-
if (process.env.npm_config_prefix && __dirname.includes(process.env.npm_config_prefix)) {
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
// Method 4: Windows-specific global installation paths
|
|
39
|
-
if (process.platform === 'win32') {
|
|
40
|
-
const windowsGlobalPatterns = [
|
|
41
|
-
'\\npm\\node_modules\\',
|
|
42
|
-
'\\AppData\\Roaming\\npm\\node_modules\\',
|
|
43
|
-
'\\Program Files\\nodejs\\node_modules\\',
|
|
44
|
-
'\\nodejs\\node_modules\\',
|
|
45
|
-
];
|
|
46
|
-
if (windowsGlobalPatterns.some((pattern) => __dirname.includes(pattern))) {
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
21
|
return false;
|
|
51
22
|
}
|
|
52
|
-
const isGlobalInstall = detectGlobalInstall();
|
|
53
23
|
/**
|
|
54
24
|
* Write Node.js path for run_host scripts to avoid fragile relative paths
|
|
55
25
|
*/
|
|
@@ -131,27 +101,19 @@ async function ensureWindowsFilePermissions() {
|
|
|
131
101
|
async function tryRegisterNativeHost() {
|
|
132
102
|
try {
|
|
133
103
|
console.log((0, utils_1.colorText)('Attempting to register Chrome Native Messaging host...', 'blue'));
|
|
134
|
-
// Always ensure execution permissions
|
|
104
|
+
// Always ensure execution permissions
|
|
135
105
|
await ensureExecutionPermissions();
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
console.log((0, utils_1.colorText)('Please run the following command for system-level installation:', 'blue'));
|
|
143
|
-
console.log(` ${constant_1.COMMAND_NAME} register --system`);
|
|
144
|
-
printManualInstructions();
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
// Local installation mode, don't attempt automatic registration
|
|
149
|
-
console.log((0, utils_1.colorText)('Local installation detected, skipping automatic registration', 'yellow'));
|
|
106
|
+
// Try user-level installation (no elevated permissions required)
|
|
107
|
+
const userLevelSuccess = await (0, utils_1.tryRegisterUserLevelHost)();
|
|
108
|
+
if (!userLevelSuccess) {
|
|
109
|
+
console.log((0, utils_1.colorText)('User-level installation failed, system-level installation may be needed', 'yellow'));
|
|
110
|
+
console.log((0, utils_1.colorText)('Please run the following command for system-level installation:', 'blue'));
|
|
111
|
+
console.log(` ${constant_1.COMMAND_NAME} register --system`);
|
|
150
112
|
printManualInstructions();
|
|
151
113
|
}
|
|
152
114
|
}
|
|
153
115
|
catch (error) {
|
|
154
|
-
console.log((0, utils_1.colorText)(
|
|
116
|
+
console.log((0, utils_1.colorText)(`Registration error: ${error instanceof Error ? error.message : String(error)}`, 'red'));
|
|
155
117
|
printManualInstructions();
|
|
156
118
|
}
|
|
157
119
|
}
|
|
@@ -161,38 +123,15 @@ async function tryRegisterNativeHost() {
|
|
|
161
123
|
function printManualInstructions() {
|
|
162
124
|
console.log('\n' + (0, utils_1.colorText)('===== Manual Registration Guide =====', 'blue'));
|
|
163
125
|
console.log((0, utils_1.colorText)('1. Try user-level installation (recommended):', 'yellow'));
|
|
164
|
-
|
|
165
|
-
console.log(` ${constant_1.COMMAND_NAME} register`);
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
console.log(` npx ${constant_1.COMMAND_NAME} register`);
|
|
169
|
-
}
|
|
126
|
+
console.log(` ${constant_1.COMMAND_NAME} register`);
|
|
170
127
|
console.log((0, utils_1.colorText)('\n2. If user-level installation fails, try system-level installation:', 'yellow'));
|
|
171
|
-
console.log((0, utils_1.colorText)(' Use --system parameter (auto-elevate permissions):', 'yellow'));
|
|
172
|
-
if (isGlobalInstall) {
|
|
173
|
-
console.log(` ${constant_1.COMMAND_NAME} register --system`);
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
console.log(` npx ${constant_1.COMMAND_NAME} register --system`);
|
|
177
|
-
}
|
|
178
|
-
console.log((0, utils_1.colorText)('\n Or use administrator privileges directly:', 'yellow'));
|
|
179
128
|
if (os_1.default.platform() === 'win32') {
|
|
180
|
-
console.log((0, utils_1.colorText)('
|
|
181
|
-
|
|
182
|
-
console.log(` ${constant_1.COMMAND_NAME} register`);
|
|
183
|
-
}
|
|
184
|
-
else {
|
|
185
|
-
console.log(` npx ${constant_1.COMMAND_NAME} register`);
|
|
186
|
-
}
|
|
129
|
+
console.log((0, utils_1.colorText)(' Run Command Prompt as Administrator:', 'yellow'));
|
|
130
|
+
console.log(` ${constant_1.COMMAND_NAME} register --system`);
|
|
187
131
|
}
|
|
188
132
|
else {
|
|
189
|
-
console.log((0, utils_1.colorText)('
|
|
190
|
-
|
|
191
|
-
console.log(` sudo ${constant_1.COMMAND_NAME} register`);
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
console.log(` sudo npx ${constant_1.COMMAND_NAME} register`);
|
|
195
|
-
}
|
|
133
|
+
console.log((0, utils_1.colorText)(' Run with sudo:', 'yellow'));
|
|
134
|
+
console.log(` sudo ${constant_1.COMMAND_NAME} register`);
|
|
196
135
|
}
|
|
197
136
|
console.log('\n' +
|
|
198
137
|
(0, utils_1.colorText)('Ensure Chrome extension is installed and refresh the extension to connect to local service.', 'blue'));
|
|
@@ -202,25 +141,18 @@ function printManualInstructions() {
|
|
|
202
141
|
*/
|
|
203
142
|
async function main() {
|
|
204
143
|
console.log((0, utils_1.colorText)(`Installing ${constant_1.COMMAND_NAME}...`, 'green'));
|
|
205
|
-
//
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
console.log(` isGlobalInstall: ${isGlobalInstall}`);
|
|
144
|
+
// Skip auto-registration in workspace/monorepo development
|
|
145
|
+
if (isWorkspaceDev()) {
|
|
146
|
+
console.log((0, utils_1.colorText)('Workspace development detected, skipping auto-registration', 'yellow'));
|
|
147
|
+
console.log((0, utils_1.colorText)(`Run "${constant_1.COMMAND_NAME} register" manually if needed`, 'blue'));
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
212
150
|
// Always ensure execution permissions first
|
|
213
151
|
await ensureExecutionPermissions();
|
|
214
152
|
// Write Node.js path for run_host scripts to use
|
|
215
153
|
await writeNodePath();
|
|
216
|
-
//
|
|
217
|
-
|
|
218
|
-
await tryRegisterNativeHost();
|
|
219
|
-
}
|
|
220
|
-
else {
|
|
221
|
-
console.log((0, utils_1.colorText)('Local installation detected', 'yellow'));
|
|
222
|
-
printManualInstructions();
|
|
223
|
-
}
|
|
154
|
+
// Always try to register - user-level registration is safe and what users expect
|
|
155
|
+
await tryRegisterNativeHost();
|
|
224
156
|
}
|
|
225
157
|
// Only execute main function when running this script directly
|
|
226
158
|
if (isDirectRun) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postinstall.js","sourceRoot":"","sources":["../../src/scripts/postinstall.ts"],"names":[],"mappings":";;;;;;AAEA,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AACxB,yCAA0C;AAC1C,mCAA8D;AAE9D,uCAAuC;AACvC,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC;AAE5C,
|
|
1
|
+
{"version":3,"file":"postinstall.js","sourceRoot":"","sources":["../../src/scripts/postinstall.ts"],"names":[],"mappings":";;;;;;AAEA,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AACxB,yCAA0C;AAC1C,mCAA8D;AAE9D,uCAAuC;AACvC,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC;AAE5C,iEAAiE;AACjE,SAAS,cAAc;IACrB,mFAAmF;IACnF,qFAAqF;IACrF,IAAI,SAAS,CAAC,QAAQ,CAAC,sBAAsB,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,yBAAyB,CAAC,EAAE,CAAC;QAChG,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO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AAM,CACP,CACJ,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,IAAI;IACjB,OAAO,CAAC,GAAG,CAAC,IAAA,iBAAS,EAAC,cAAc,uBAAY,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAEjE,2DAA2D;IAC3D,IAAI,cAAc,EAAE,EAAE,CAAC;QACrB,OAAO,CAAC,GAAG,CAAC,IAAA,iBAAS,EAAC,4DAA4D,EAAE,QAAQ,CAAC,CAAC,CAAC;QAC/F,OAAO,CAAC,GAAG,CAAC,IAAA,iBAAS,EAAC,QAAQ,uBAAY,+BAA+B,EAAE,MAAM,CAAC,CAAC,CAAC;QACpF,OAAO;IACT,CAAC;IAED,4CAA4C;IAC5C,MAAM,0BAA0B,EAAE,CAAC;IAEnC,iDAAiD;IACjD,MAAM,aAAa,EAAE,CAAC;IAEtB,iFAAiF;IACjF,MAAM,qBAAqB,EAAE,CAAC;AAChC,CAAC;AAED,+DAA+D;AAC/D,IAAI,WAAW,EAAE,CAAC;IAChB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACrB,OAAO,CAAC,KAAK,CACX,IAAA,iBAAS,EACP,8BAA8B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EACtF,KAAK,CACN,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-chrome-bridger",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "Chrome Native-Messaging host (Node) - Fork with Chrome Web Store support",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"mcp-chrome-bridger": "./dist/cli.js",
|
|
8
8
|
"mcp-chrome-stdio": "./dist/mcp/mcp-server-stdio.js"
|
|
9
9
|
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "nodemon --watch src --ext ts,js,json --ignore dist/ --exec \"npm run build && npm run register:dev\"",
|
|
12
|
+
"build": "ts-node src/scripts/build.ts",
|
|
13
|
+
"test": "jest",
|
|
14
|
+
"test:watch": "jest --watch",
|
|
15
|
+
"lint": "eslint 'src/**/*.{js,ts}'",
|
|
16
|
+
"lint:fix": "eslint 'src/**/*.{js,ts}' --fix",
|
|
17
|
+
"format": "prettier --write 'src/**/*.{js,ts,json}'",
|
|
18
|
+
"register:dev": "node dist/scripts/register-dev.js",
|
|
19
|
+
"postinstall": "node scripts/postinstall-check.js"
|
|
20
|
+
},
|
|
10
21
|
"files": [
|
|
11
22
|
"dist",
|
|
12
23
|
"scripts"
|
|
@@ -27,13 +38,13 @@
|
|
|
27
38
|
"@modelcontextprotocol/sdk": "^1.11.0",
|
|
28
39
|
"@types/node-fetch": "^2.6.13",
|
|
29
40
|
"chalk": "^5.4.1",
|
|
41
|
+
"mcp-chrome-shared": "workspace:*",
|
|
30
42
|
"commander": "^13.1.0",
|
|
31
43
|
"fastify": "^5.3.2",
|
|
32
44
|
"is-admin": "^4.0.0",
|
|
33
45
|
"node-fetch": "^2.7.0",
|
|
34
46
|
"pino": "^9.6.0",
|
|
35
|
-
"uuid": "^11.1.0"
|
|
36
|
-
"mcp-chrome-shared": "1.0.0"
|
|
47
|
+
"uuid": "^11.1.0"
|
|
37
48
|
},
|
|
38
49
|
"devDependencies": {
|
|
39
50
|
"@jest/globals": "^29.7.0",
|
|
@@ -66,16 +77,5 @@
|
|
|
66
77
|
"*.{json,md}": [
|
|
67
78
|
"prettier --write"
|
|
68
79
|
]
|
|
69
|
-
},
|
|
70
|
-
"scripts": {
|
|
71
|
-
"dev": "nodemon --watch src --ext ts,js,json --ignore dist/ --exec \"npm run build && npm run register:dev\"",
|
|
72
|
-
"build": "ts-node src/scripts/build.ts",
|
|
73
|
-
"test": "jest",
|
|
74
|
-
"test:watch": "jest --watch",
|
|
75
|
-
"lint": "eslint 'src/**/*.{js,ts}'",
|
|
76
|
-
"lint:fix": "eslint 'src/**/*.{js,ts}' --fix",
|
|
77
|
-
"format": "prettier --write 'src/**/*.{js,ts,json}'",
|
|
78
|
-
"register:dev": "node dist/scripts/register-dev.js",
|
|
79
|
-
"postinstall": "node scripts/postinstall-check.js"
|
|
80
80
|
}
|
|
81
|
-
}
|
|
81
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 hangye
|
|
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.
|