@dynamicu/chromedebug-mcp 2.2.2 → 2.3.1

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.
@@ -0,0 +1,41 @@
1
+ # Chrome Debug Assistant Extension
2
+
3
+ This Chrome extension enables visual element selection for the Chrome Debug MCP server.
4
+
5
+ ## Installation
6
+
7
+ 1. Open Chrome and navigate to `chrome://extensions/`
8
+ 2. Enable "Developer mode" (toggle in the top right)
9
+ 3. Click "Load unpacked"
10
+ 4. Select the `chrome-extension` directory
11
+
12
+ ## Usage
13
+
14
+ 1. Ensure the Chrome Debug MCP server is running (`npm start`)
15
+ 2. Navigate to any webpage
16
+ 3. Click on any element to select it
17
+ 4. The element will be:
18
+ - Highlighted with a pink outline
19
+ - Sent to Chrome Debug server
20
+ - Available for modification via Claude MCP tools
21
+
22
+ ## How it Works
23
+
24
+ 1. Click any element on the page
25
+ 2. The extension sends the element's selector to Chrome Debug
26
+ 3. Use Claude in your terminal to modify the selected element:
27
+ ```
28
+ "Show me what element is currently selected"
29
+ "Make the selected element blue"
30
+ "Apply CSS: padding: 20px !important; border-radius: 8px !important"
31
+ "Execute JavaScript to get the element's text content"
32
+ "Clear the selected element"
33
+ ```
34
+
35
+ ## Features
36
+
37
+ - Visual element selection with hover highlighting
38
+ - Automatic server detection (scans ports 3000-3025)
39
+ - Pink outline shows currently selected element
40
+ - Server connection status indicator
41
+ - One-click element selection
@@ -1537,7 +1537,7 @@ async function createUserNotification(priority, message) {
1537
1537
 
1538
1538
  const notificationOptions = {
1539
1539
  type: 'basic',
1540
- iconUrl: 'icons/icon48.png',
1540
+ iconUrl: chrome.runtime.getURL('icon48.png'),
1541
1541
  title: 'Chrome Debug Error',
1542
1542
  message: message,
1543
1543
  priority: priority === 'CRITICAL' ? 2 : 1,
@@ -2428,7 +2428,7 @@ async function startRecording(tabId, settings = {}) {
2428
2428
  // Show notification to user
2429
2429
  chrome.notifications.create({
2430
2430
  type: 'basic',
2431
- iconUrl: 'icon.png',
2431
+ iconUrl: chrome.runtime.getURL('icon48.png'),
2432
2432
  title: 'Recording Limit Reached',
2433
2433
  message: licenseCheck.message || 'Upgrade to Pro for unlimited recordings.',
2434
2434
  priority: 2
@@ -2938,7 +2938,7 @@ async function startWorkflowRecording(tabId, includeLogsInExport, sessionName =
2938
2938
  // Show notification to user (same pattern as screen recording)
2939
2939
  chrome.notifications.create({
2940
2940
  type: 'basic',
2941
- iconUrl: 'icon128.png',
2941
+ iconUrl: chrome.runtime.getURL('icon128.png'),
2942
2942
  title: 'Recording Limit Reached',
2943
2943
  message: licenseCheck.message || 'Daily limit reached. Upgrade to Pro for unlimited workflow recordings.',
2944
2944
  buttons: [{ title: 'Upgrade to Pro' }],
@@ -3749,7 +3749,7 @@ async function handleFrameCaptureComplete(sessionData) {
3749
3749
  // Show user notification about log association failure
3750
3750
  chrome.notifications.create({
3751
3751
  type: 'basic',
3752
- iconUrl: 'icon.png',
3752
+ iconUrl: chrome.runtime.getURL('icon48.png'),
3753
3753
  title: 'Chrome Debug - Log Association Failed',
3754
3754
  message: `${errorDetails} Recording saved but logs may be missing. Check console for details.`,
3755
3755
  priority: 1
@@ -3766,7 +3766,7 @@ async function handleFrameCaptureComplete(sessionData) {
3766
3766
  // Show user notification about no logs captured
3767
3767
  chrome.notifications.create({
3768
3768
  type: 'basic',
3769
- iconUrl: 'icon.png',
3769
+ iconUrl: chrome.runtime.getURL('icon48.png'),
3770
3770
  title: 'Chrome Debug - No Console Logs Captured',
3771
3771
  message: 'Recording completed but no console logs were captured. This may be expected if the page had no console activity.',
3772
3772
  priority: 0
@@ -0,0 +1,72 @@
1
+ {
2
+ "manifest_version": 3,
3
+ "name": "ChromeDebug MCP Assistant FREE v2.1.1",
4
+ "version": "2.1.1",
5
+ "description": "ChromeDebug MCP visual element selector [FREE Edition] [Build: 2025-01-20-v2.1.1]",
6
+ "permissions": [
7
+ "activeTab",
8
+ "scripting",
9
+ "tabs",
10
+ "storage",
11
+ "tabCapture",
12
+ "desktopCapture",
13
+ "notifications",
14
+ "offscreen"
15
+ ],
16
+ "host_permissions": [
17
+ "https://*.cloudfunctions.net/*"
18
+ ],
19
+ "action": {
20
+ "default_popup": "popup.html",
21
+ "default_icon": {
22
+ "16": "icon16.png",
23
+ "48": "icon48.png",
24
+ "128": "icon128.png"
25
+ }
26
+ },
27
+ "options_page": "options.html",
28
+ "content_scripts": [
29
+ {
30
+ "matches": [
31
+ "<all_urls>"
32
+ ],
33
+ "exclude_matches": [
34
+ "*://youtube.com/*",
35
+ "*://www.youtube.com/*",
36
+ "*://m.youtube.com/*",
37
+ "*://google.com/*",
38
+ "*://www.google.com/*",
39
+ "*://gmail.com/*",
40
+ "*://www.gmail.com/*",
41
+ "*://facebook.com/*",
42
+ "*://www.facebook.com/*",
43
+ "*://twitter.com/*",
44
+ "*://www.twitter.com/*",
45
+ "*://x.com/*",
46
+ "*://www.x.com/*",
47
+ "*://instagram.com/*",
48
+ "*://www.instagram.com/*"
49
+ ],
50
+ "js": [
51
+ "pako.min.js",
52
+ "web-vitals.iife.js",
53
+ "pii-redactor.js",
54
+ "data-buffer.js",
55
+ "performance-monitor.js",
56
+ "dom-tracker.js",
57
+ "network-tracker.js",
58
+ "content.js"
59
+ ],
60
+ "css": ["content.css"],
61
+ "run_at": "document_idle"
62
+ }
63
+ ],
64
+ "background": {
65
+ "service_worker": "background.js"
66
+ },
67
+ "icons": {
68
+ "16": "icon16.png",
69
+ "48": "icon48.png",
70
+ "128": "icon128.png"
71
+ }
72
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamicu/chromedebug-mcp",
3
- "version": "2.2.2",
3
+ "version": "2.3.1",
4
4
  "description": "ChromeDebug MCP - MCP server that provides full control over a Chrome browser instance for debugging and automation with AI assistants like Claude Code",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -34,7 +34,9 @@
34
34
  "config": "node scripts/config-manager.js",
35
35
  "config-show": "node scripts/config-manager.js show",
36
36
  "config-ports": "node scripts/config-manager.js list-ports",
37
- "postinstall": "npm run update-extension-config",
37
+ "postinstall": "npm run update-extension-config && node scripts/postinstall.js",
38
+ "package-extension": "node scripts/package-extension.js",
39
+ "prepublishOnly": "npm run package-extension",
38
40
  "test": "NODE_OPTIONS='--experimental-vm-modules' jest",
39
41
  "test:watch": "NODE_OPTIONS='--experimental-vm-modules' jest --watch",
40
42
  "test:coverage": "NODE_OPTIONS='--experimental-vm-modules' jest --coverage",
@@ -86,9 +88,13 @@
86
88
  "chrome-extension/*.html",
87
89
  "chrome-extension/*.png",
88
90
  "chrome-extension/manifest.json",
91
+ "chrome-extension/manifest.free.json",
89
92
  "chrome-extension/README.md",
90
93
  "config/",
91
- "scripts/",
94
+ "scripts/*.js",
95
+ "scripts/*.cjs",
96
+ "!scripts/dist",
97
+ "dist/chromedebug-extension-free.zip",
92
98
  "README.md",
93
99
  "LICENSE",
94
100
  "CLAUDE.md"
@@ -114,6 +120,7 @@
114
120
  },
115
121
  "devDependencies": {
116
122
  "@jest/globals": "^30.0.5",
123
+ "archiver": "^7.0.1",
117
124
  "copy-webpack-plugin": "^13.0.1",
118
125
  "jest": "^30.0.5",
119
126
  "jsdom": "^27.0.0",
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Package FREE Chrome extension for distribution
5
+ * Builds the free version and creates a .zip file
6
+ */
7
+
8
+ import { createWriteStream, promises as fs } from 'fs';
9
+ import { join, dirname } from 'path';
10
+ import { fileURLToPath } from 'url';
11
+ import { execSync } from 'child_process';
12
+ import archiver from 'archiver';
13
+
14
+ const __filename = fileURLToPath(import.meta.url);
15
+ const __dirname = dirname(__filename);
16
+ const rootDir = join(__dirname, '..');
17
+ const freeExtensionDir = join(rootDir, 'dist', 'free');
18
+ const outputDir = join(rootDir, 'dist');
19
+ const outputFile = join(outputDir, 'chromedebug-extension-free.zip');
20
+
21
+ async function packageExtension() {
22
+ console.log('šŸ“¦ Building and packaging FREE Chrome extension...');
23
+
24
+ // Step 1: Build the free version
25
+ console.log('šŸ”Ø Building free version...');
26
+ try {
27
+ execSync('npm run build:free', {
28
+ cwd: rootDir,
29
+ stdio: 'inherit'
30
+ });
31
+ } catch (error) {
32
+ console.error('āŒ Failed to build free version');
33
+ throw error;
34
+ }
35
+
36
+ // Step 2: Verify the build output exists
37
+ try {
38
+ await fs.access(freeExtensionDir);
39
+ } catch {
40
+ throw new Error(`Build output not found at ${freeExtensionDir}`);
41
+ }
42
+
43
+ // Step 3: Create zip file
44
+ console.log('šŸ“¦ Creating zip package...');
45
+
46
+ const output = createWriteStream(outputFile);
47
+ const archive = archiver('zip', { zlib: { level: 9 } });
48
+
49
+ return new Promise((resolve, reject) => {
50
+ output.on('close', () => {
51
+ const sizeKB = (archive.pointer() / 1024).toFixed(2);
52
+ console.log(`āœ… FREE extension packaged successfully!`);
53
+ console.log(` Size: ${sizeKB} KB`);
54
+ console.log(` Location: ${outputFile}`);
55
+ console.log(` šŸ“Œ This is the FREE version (5 recordings/day limit)`);
56
+ resolve();
57
+ });
58
+
59
+ archive.on('error', reject);
60
+
61
+ archive.pipe(output);
62
+
63
+ // Add all files from the free build directory
64
+ archive.directory(freeExtensionDir, false);
65
+
66
+ archive.finalize();
67
+ });
68
+ }
69
+
70
+ packageExtension().catch(err => {
71
+ console.error('āŒ Failed to package extension:', err);
72
+ process.exit(1);
73
+ });
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Post-install script to help users find the Chrome extension
5
+ */
6
+
7
+ import { join, dirname } from 'path';
8
+ import { fileURLToPath } from 'url';
9
+ import { existsSync } from 'fs';
10
+
11
+ const __filename = fileURLToPath(import.meta.url);
12
+ const __dirname = dirname(__filename);
13
+ const packageRoot = join(__dirname, '..');
14
+ const zipPath = join(packageRoot, 'dist', 'chromedebug-extension-free.zip');
15
+ const extensionPath = join(packageRoot, 'chrome-extension');
16
+
17
+ console.log('\nāœ… ChromeDebug MCP installed successfully!\n');
18
+
19
+ console.log('šŸš€ How ChromeDebug Works:');
20
+ console.log(' When Claude Code starts chromedebug-mcp, it automatically runs:');
21
+ console.log(' • MCP Server (for Claude Code communication)');
22
+ console.log(' • HTTP Server on port 3000-4000 (for Chrome extension)\n');
23
+
24
+ console.log('šŸ†“ FREE Chrome Extension (5 recordings/day):');
25
+ if (existsSync(zipPath)) {
26
+ console.log(` Location: ${zipPath}`);
27
+ console.log(' Extract the zip file and load in Chrome\n');
28
+ } else {
29
+ console.log(` Source: ${extensionPath}`);
30
+ console.log(' Load directly from this path\n');
31
+ }
32
+
33
+ console.log('šŸ”§ Installation steps:');
34
+ console.log(' 1. Open Chrome and go to chrome://extensions/');
35
+ console.log(' 2. Enable "Developer mode" (toggle in top right)');
36
+ console.log(' 3. Click "Load unpacked"');
37
+ if (existsSync(zipPath)) {
38
+ console.log(' 4. Extract the zip file above');
39
+ console.log(' 5. Select the extracted folder');
40
+ } else {
41
+ console.log(' 4. Navigate to and select the path above');
42
+ }
43
+ console.log(' 6. The extension will auto-detect the HTTP server port\n');
44
+
45
+ console.log('ā„¹ļø No manual server startup needed!');
46
+ console.log(' Claude Code automatically starts both servers when it runs chromedebug-mcp\n');
47
+
48
+ console.log('šŸ’Ž Want unlimited recordings?');
49
+ console.log(' Upgrade to Pro: https://chromedebug.com/buy/996773cb-682b-430f-b9e3-9ce2130bd967\n');
50
+
51
+ console.log('šŸ“š Full documentation: https://github.com/dynamicupgrade/ChromeDebug#readme\n');