Skip to content

Feature Request: Support for browser extension development and debugging #96

@keleus

Description

@keleus

Goals

The primary goals of these new tools is to enable Chrome Extension debugging for AI Assistants:

  • Manage the extension lifecycle (install, reload, …)
  • Ability to inspect and debug extension components, such as service workers, side panel, and popups.
  • Simulate extension user interactions (e.g. click the extension action, …)

Example prompts

  • Install my extension and open https://example.com. Find out why the reading time is not injected into the page below the first heading.
  • Why does my extension not show a summary of https://example.com in the sidepanel when clicking the extension action?
  • When selecting the first heading on https://example.com, opening my extension popup and clicking "translate text" the translation is not displayed in the popup. Why?

Use cases

  1. Load an extension while in development
  2. Debug extensions via console logs for extension pages (side panel, tabs, popup, offscreen document) and extension context (content scripts, service worker)
  3. Inspect extension state by evaluating scripts in extension pages and contexts
  4. Test an extension by triggering an extension action
  5. Test an extension by simulating user input on extension pages

Features

The following tools should be added to the Chrome DevTools MCP server:

Extension Management

  • list_extensions: Lists all installed extensions, including their name, ID, version, and enabled status.
  • install_extension: Installs an extension.
    • Existing CDP method: Extensions.loadUnpacked
  • uninstall_extension: Uninstalls an enabled extension.
    • Existing CDP method: Extensions.uninstall
  • reload_extension: Reloads an extension to apply any changes.

Extension Debugging

Extension Interaction

  • click_extension_icon: Simulates a click on an extension's browser action or page action icon.
    • Note: Once the extension's popup is open, CDP already exposes the popup as a target, so we can inspect it just like a page.
  • click_extension_context_menu: Simulates a click on an extension’s context menu entry.
  • All input automation tools need to be able to work in an extension context (sidepanel, popup, extension tab page)

Constraints

  • Token usage should not increase when extension debugging is not enabled.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions