chrome-devtools-mcp-for-extension 0.15.1 → 0.15.2

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,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Global configuration for chrome-devtools-mcp-for-extension
8
+ */
9
+ /**
10
+ * ChatGPT configuration
11
+ */
12
+ export const CHATGPT_CONFIG = {
13
+ /**
14
+ * Default ChatGPT URL with gpt-5-thinking model
15
+ */
16
+ DEFAULT_URL: 'https://chatgpt.com/?model=gpt-5-thinking',
17
+ /**
18
+ * Base URL for ChatGPT (without query params)
19
+ */
20
+ BASE_URL: 'https://chatgpt.com/',
21
+ /**
22
+ * Default model parameter
23
+ */
24
+ DEFAULT_MODEL: 'gpt-5-thinking',
25
+ };
@@ -3,6 +3,7 @@
3
3
  * Copyright 2025 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ import { CHATGPT_CONFIG } from './config.js';
6
7
  /**
7
8
  * UI elements to check during health verification
8
9
  */
@@ -70,7 +71,7 @@ export async function verifyUIHealth(browser) {
70
71
  page = pages[0] || (await browser.newPage());
71
72
  // Navigate to ChatGPT with short timeout
72
73
  console.error(' Navigating to ChatGPT...');
73
- await page.goto('https://chatgpt.com/', {
74
+ await page.goto(CHATGPT_CONFIG.DEFAULT_URL, {
74
75
  waitUntil: 'networkidle2',
75
76
  timeout: 30000,
76
77
  });
@@ -9,6 +9,7 @@ import * as path from 'path';
9
9
  import * as os from 'os';
10
10
  import { ToolCategories } from './categories.js';
11
11
  import { defineTool } from './ToolDefinition.js';
12
+ import { CHATGPT_CONFIG } from '../config.js';
12
13
  // Default hardcoded bookmarks - fallback when Chrome bookmarks cannot be loaded
13
14
  function getDefaultBookmarks() {
14
15
  return {
@@ -24,7 +25,7 @@ function getDefaultBookmarks() {
24
25
  'localhost': 'http://localhost:3000',
25
26
  'localhost8080': 'http://localhost:8080',
26
27
  'suno': 'https://suno.com/create',
27
- 'chatgpt': 'https://chatgpt.com/?model=gpt-5-thinking'
28
+ 'chatgpt': CHATGPT_CONFIG.DEFAULT_URL
28
29
  };
29
30
  }
30
31
  /**
@@ -9,6 +9,7 @@ import z from 'zod';
9
9
  import { ToolCategories } from './categories.js';
10
10
  import { defineTool } from './ToolDefinition.js';
11
11
  import { loadSelectors, getSelector } from '../selectors/loader.js';
12
+ import { CHATGPT_CONFIG } from '../config.js';
12
13
  /**
13
14
  * Path to store chat session data
14
15
  */
@@ -186,7 +187,7 @@ export const askChatGPTWeb = defineTool({
186
187
  try {
187
188
  // Step 1: Navigate to ChatGPT
188
189
  response.appendResponseLine('ChatGPTに接続中...');
189
- await page.goto('https://chatgpt.com/?model=gpt-5-thinking', { waitUntil: 'networkidle2' });
190
+ await page.goto(CHATGPT_CONFIG.DEFAULT_URL, { waitUntil: 'networkidle2' });
190
191
  // Check if logged in
191
192
  const currentUrl = page.url();
192
193
  if (currentUrl.includes('auth') || currentUrl.includes('login')) {
@@ -8,6 +8,7 @@ import path from 'node:path';
8
8
  import z from 'zod';
9
9
  import { ToolCategories } from './categories.js';
10
10
  import { defineTool } from './ToolDefinition.js';
11
+ import { CHATGPT_CONFIG } from '../config.js';
11
12
  /**
12
13
  * Path to store chat session data
13
14
  */
@@ -669,7 +670,7 @@ export const deepResearchChatGPT = defineTool({
669
670
  }
670
671
  }
671
672
  if (needsNewChat) {
672
- await page.goto('https://chatgpt.com/?model=gpt-5-thinking', { waitUntil: 'networkidle2' });
673
+ await page.goto(CHATGPT_CONFIG.DEFAULT_URL, { waitUntil: 'networkidle2' });
673
674
  }
674
675
  // Check if logged in
675
676
  const currentUrl = page.url();
@@ -8,6 +8,7 @@ import path from 'node:path';
8
8
  import z from 'zod';
9
9
  import { ToolCategories } from './categories.js';
10
10
  import { defineTool } from './ToolDefinition.js';
11
+ import { CHATGPT_CONFIG } from '../config.js';
11
12
  /**
12
13
  * Known important elements in ChatGPT UI
13
14
  */
@@ -200,8 +201,8 @@ export const diagnoseChatgptUi = defineTool({
200
201
  },
201
202
  schema: {
202
203
  url: z.string()
203
- .default('https://chatgpt.com/')
204
- .describe('ChatGPT URL to diagnose (default: https://chatgpt.com/)'),
204
+ .default(CHATGPT_CONFIG.DEFAULT_URL)
205
+ .describe(`ChatGPT URL to diagnose (default: ${CHATGPT_CONFIG.DEFAULT_URL})`),
205
206
  waitForLoad: z.number()
206
207
  .default(5000)
207
208
  .describe('Time to wait for page to load in milliseconds (default: 5000)'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chrome-devtools-mcp-for-extension",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "description": "MCP server for Chrome extension development with Web Store automation. Fork of chrome-devtools-mcp with extension-specific tools.",
5
5
  "type": "module",
6
6
  "bin": "./build/src/index.js",