Skip to content

Commit d4aaba4

Browse files
committed
Merge upstream/main into feat/switch-browser-tool
Resolved conflicts between two independent refactorings: - Our branch: extracted VERSION/args to config.js, added switch_browser tool - Upstream: added features.js for feature flags, bumped VERSION to 0.10.2 Changes: - Updated VERSION to 0.10.2 in config.ts - Added features.js import and conditional issue loading - Retained all switch_browser tool functionality - No duplicate code, clean integration All 203 tests pass.
2 parents 3779d89 + 6f9182f commit d4aaba4

File tree

17 files changed

+174
-128
lines changed

17 files changed

+174
-128
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.10.1"
2+
".": "0.10.2"
33
}

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## [0.10.2](https://github.com/ChromeDevTools/chrome-devtools-mcp/compare/chrome-devtools-mcp-v0.10.1...chrome-devtools-mcp-v0.10.2) (2025-11-19)
4+
5+
6+
### 📄 Documentation
7+
8+
* add Factory CLI configuration to MCP clients ([#523](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/523)) ([016e2fd](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/016e2fd6ee57447103f7385285dd503b5576a860))
9+
10+
11+
### ♻️ Chores
12+
13+
* clear issue aggregator on page navigation ([#565](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/565)) ([c3784d1](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/c3784d1990a926f651951e4eef05520c5c448964))
14+
* disable issues in list_console_messages for now ([#575](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/575)) ([08e9a9f](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/08e9a9f42e6ff1a92c60b3e958b0817c7b785afc))
15+
* simplify issue management ([#564](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/564)) ([3b016f1](https://github.com/ChromeDevTools/chrome-devtools-mcp/commit/3b016f1a814b1a69750813548b3f35e79bfb6fef))
16+
317
## [0.10.1](https://github.com/ChromeDevTools/chrome-devtools-mcp/compare/chrome-devtools-mcp-v0.10.0...chrome-devtools-mcp-v0.10.1) (2025-11-07)
418

519

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,28 @@ amp mcp add chrome-devtools -- npx chrome-devtools-mcp@latest
6363

6464
</details>
6565

66+
<details>
67+
<summary>Antigravity</summary>
68+
69+
To use the Chrome DevTools MCP server, disable the built-in browser in the settings and add the following config to ` ~/.gemini/antigravity/mcp_config.json`:
70+
71+
```bash
72+
{
73+
"mcpServers": {
74+
"chrome-devtools": {
75+
"type": "stdio",
76+
"command": "npx",
77+
"args": [
78+
"chrome-devtools-mcp@latest",
79+
"-y"
80+
]
81+
}
82+
}
83+
}
84+
```
85+
86+
</details>
87+
6688
<details>
6789
<summary>Claude Code</summary>
6890
Use the Claude Code CLI to add the Chrome DevTools MCP server (<a href="https://docs.anthropic.com/en/docs/claude-code/mcp">guide</a>):

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chrome-devtools-mcp",
3-
"version": "0.10.1",
3+
"version": "0.10.2",
44
"description": "MCP server for Chrome DevTools",
55
"type": "module",
66
"bin": "./build/src/index.js",

scripts/post-build.ts

Lines changed: 14 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -53,69 +53,22 @@ function main(): void {
5353

5454
// Create i18n mock
5555
const i18nDir = path.join(BUILD_DIR, devtoolsFrontEndCorePath, 'i18n');
56-
fs.mkdirSync(i18nDir, {recursive: true});
57-
const i18nFile = path.join(i18nDir, 'i18n.js');
58-
const i18nContent = `
59-
export const i18n = {
60-
registerUIStrings: () => {},
61-
getLocalizedString: (_, str) => {
62-
// So that the string passed in gets output verbatim.
63-
return str;
64-
},
65-
lockedLazyString: () => {},
66-
getLazilyComputedLocalizedString: () => ()=>{},
67-
};
68-
69-
// TODO(jacktfranklin): once the DocumentLatency insight does not depend on
70-
// this method, we can remove this stub.
71-
export const TimeUtilities = {
72-
millisToString(x) {
73-
const separator = '\xA0';
74-
const formatter = new Intl.NumberFormat('en-US', {
75-
style: 'unit',
76-
unitDisplay: 'narrow',
77-
minimumFractionDigits: 0,
78-
maximumFractionDigits: 1,
79-
unit: 'millisecond',
80-
});
81-
82-
const parts = formatter.formatToParts(x);
83-
for (const part of parts) {
84-
if (part.type === 'literal') {
85-
if (part.value === ' ') {
86-
part.value = separator;
87-
}
88-
}
89-
}
56+
const localesFile = path.join(i18nDir, 'locales.js');
57+
const localesContent = `
58+
export const LOCALES = [
59+
'en-US',
60+
];
9061
91-
return parts.map(part => part.value).join('');
92-
}
93-
};
94-
95-
// TODO(jacktfranklin): once the ImageDelivery insight does not depend on this method, we can remove this stub.
96-
export const ByteUtilities = {
97-
bytesToString(x) {
98-
const separator = '\xA0';
99-
const formatter = new Intl.NumberFormat('en-US', {
100-
style: 'unit',
101-
unit: 'kilobyte',
102-
unitDisplay: 'narrow',
103-
minimumFractionDigits: 1,
104-
maximumFractionDigits: 1,
105-
});
106-
const parts = formatter.formatToParts(x / 1000);
107-
for (const part of parts) {
108-
if (part.type === 'literal') {
109-
if (part.value === ' ') {
110-
part.value = separator;
111-
}
112-
}
113-
}
62+
export const BUNDLED_LOCALES = [
63+
'en-US',
64+
];
11465
115-
return parts.map(part => part.value).join('');
116-
}
117-
};`;
118-
writeFile(i18nFile, i18nContent);
66+
export const DEFAULT_LOCALE = 'en-US';
67+
68+
export const REMOTE_FETCH_PATTERN = '@HOST@/remote/serve_file/@VERSION@/core/i18n/locales/@[email protected]';
69+
70+
export const LOCAL_FETCH_PATTERN = './locales/@[email protected]';`;
71+
writeFile(localesFile, localesContent);
11972

12073
// Create codemirror.next mock.
12174
const codeMirrorDir = path.join(

server.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
{
22
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
33
"name": "io.github.ChromeDevTools/chrome-devtools-mcp",
4+
"title": "Chrome DevTools MCP",
45
"description": "MCP server for Chrome DevTools",
56
"repository": {
67
"url": "https://github.com/ChromeDevTools/chrome-devtools-mcp",
78
"source": "github"
89
},
9-
"version": "0.10.1",
10+
"version": "0.10.2",
1011
"packages": [
1112
{
1213
"registryType": "npm",
1314
"registryBaseUrl": "https://registry.npmjs.org",
1415
"identifier": "chrome-devtools-mcp",
15-
"version": "0.10.1",
16+
"version": "0.10.2",
1617
"transport": {
1718
"type": "stdio"
1819
},

src/DevtoolsUtils.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
type Issue,
99
type IssuesManagerEventTypes,
1010
Common,
11+
I18n,
1112
} from '../node_modules/chrome-devtools-frontend/mcp/mcp.js';
1213

1314
export function extractUrlLikeFromDevToolsTitle(
@@ -67,3 +68,13 @@ export class FakeIssuesManager extends Common.ObjectWrapper
6768
return [];
6869
}
6970
}
71+
72+
I18n.DevToolsLocale.DevToolsLocale.instance({
73+
create: true,
74+
data: {
75+
navigatorLanguage: 'en-US',
76+
settingLanguage: 'en-US',
77+
lookupClosestDevToolsLocale: l => l,
78+
},
79+
});
80+
I18n.i18n.registerLocaleDataForTest('en-US', {});

src/PageCollector.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
} from '../node_modules/chrome-devtools-frontend/mcp/mcp.js';
1717

1818
import {FakeIssuesManager} from './DevtoolsUtils.js';
19+
import {features} from './features.js';
1920
import {logger} from './logger.js';
2021
import type {
2122
CDPSession,
@@ -231,6 +232,9 @@ export class ConsoleCollector extends PageCollector<
231232

232233
override addPage(page: Page): void {
233234
super.addPage(page);
235+
if (!features.issues) {
236+
return;
237+
}
234238
if (!this.#subscribedPages.has(page)) {
235239
const subscriber = new PageIssueSubscriber(page);
236240
this.#subscribedPages.set(page, subscriber);

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {parseArguments} from './cli.js';
88

99
// If moved update release-please config
1010
// x-release-please-start-version
11-
const VERSION = '0.10.1';
11+
const VERSION = '0.10.2';
1212
// x-release-please-end
1313

1414
export const args = parseArguments(VERSION);

0 commit comments

Comments
 (0)