Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ function makeTargetFilter() {
]);

return function targetFilter(target: Target): boolean {
// Only attach to page-level targets. Iframes, service workers, shared
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not not true, those targets are needed.

// workers, webviews, and background pages are not needed for MCP page
// interactions and attempting to initialize them (Network.enable, etc.)
// on frozen or suspended targets can cause connection timeouts.
const type = target.type();
if (type !== 'page' && type !== 'other') {
return false;
}
if (target.url() === 'chrome://newtab/') {
return true;
}
Expand Down