Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
info and the tab list carry the same fields. Screenshot, storage, console,
network, and audits on those pages return that result instead of an empty
success.
- **Tab awareness without the debugging banner.** `listTabs`, `readTab`,
`navigateTab`, `softClick`, and `softType` use `chrome.tabs` and
`chrome.scripting`. They do not attach the debugger and do not change focus.
`chromeTabId` from `listTabs` is separate from the DevTools-connected `tabId`
used by `listBrowserTabs`. The tab list does not claim to see every open tab.
Background navigation stays in the visible window. Soft click and type report
`worked` or `needs a real gesture`.

## 2.0.5

Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ setup and a silent one look the same.
| `getSelectedElement` | The element selected in the Elements panel |
| `getPageInfo` | Which page the browser is currently on |
| `getConnectionStatus` | Whether the extension is connected, and capture counts |
| `listBrowserTabs` | Every tab with DevTools open, and the id to address it by |
| `listBrowserTabs` | Tabs with DevTools open, addressed by a DevTools-connected `tabId` |
| `listTabs` | Tabs `chrome.tabs` returns (not every open tab), addressed by `chromeTabId` |
| `readTab` | Headings, excerpt, and a snapshot of a `chromeTabId`, without the debugger |
| `navigateBrowser` | Load a URL in a DevTools-connected tab, without focusing it |
| `navigateTab` | Load a URL in the background from `listTabs`, visible window only |
| `softClick` / `softType` | Untrusted click or type. Result is `worked` or `needs a real gesture` |
| `takeScreenshot` | Screenshot returned **as an image**, plus its file path |
| `refreshBrowser` | Reloads the inspected tab |
| `getBrowserStorage` | localStorage, sessionStorage and cookies (values gated) |
Expand All @@ -116,6 +121,16 @@ All tools declare MCP output schemas, so clients receive structured data rather
than prose they have to parse, and read-only tools are annotated as such so
clients can auto-approve them safely.

### Tabs without DevTools

`listTabs`, `readTab`, `navigateTab`, `softClick`, and `softType` use `chrome.tabs` and `chrome.scripting`. They do not attach the debugger, so they do not show the debugging banner, and they do not activate a tab or focus a window.

`chromeTabId` comes from `listTabs`. `tabId` on the other tools comes from `listBrowserTabs`. They are different id spaces. Pass each id only to the tool that issued it.

`listTabs` reports the tabs `chrome.tabs` returns in the windows it returns. Other Arc Spaces, Little Arc, pinned favorites, split-view partners, and slept tabs may be missing. Incognito is skipped. This is not every open tab. Background navigation stays in the visible window until that is measured on Arc.

The popup switch has to be on. Navigation and soft input also need `--allow-input` on `browser-tools-mcp`, or `--allow-actions` on the `browser-tools` CLI. The same origin rules as other input apply. An asleep tab is reported and not reloaded. A soft action says `worked` or `needs a real gesture` and does not claim a failed action worked.

### Several tabs at once

Every tab with DevTools open is tracked separately. Telemetry is attributed to
Expand Down
7 changes: 5 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,11 @@ be, both are worth reporting.
- Chrome's "started debugging this browser" banner is a browser safety
control. It is intentional, and this project never hides it, suppresses it,
or documents a setup step that does. Features that can run without the
debugger do so. When a feature attaches the debugger, the banner stays
visible for that attachment, and dismissing it stops the attachment.
debugger do so. `listTabs`, `readTab`, `navigateTab`, `softClick`, and
`softType` use ordinary extension APIs and do not call `chrome.debugger`,
`tabs.update({active:true})`, or `windows.update({focused:true})`. When a
feature attaches the debugger, the banner stays visible for that attachment,
and dismissing it stops the attachment.
- Credential-bearing headers and secret-shaped strings are redacted before
storage, not before display.
- Request bodies are size-limited; log retention is bounded and client-supplied
Expand Down
13 changes: 13 additions & 0 deletions browser-tools-mcp/src/connector/api-policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ const AUDIT_TOOL: Record<AuditCategory, string> = {
* a unit test, so a new tool cannot skip the filter by accident.
*/
export const API_TOOL_NAMES: readonly string[] = [
"listTabs",
"readTab",
"navigateTab",
"softClick",
"softType",
"listBrowserTabs",
"getConsoleLogs",
"getConsoleErrors",
Expand Down Expand Up @@ -97,6 +102,11 @@ function toolsForRequest(method: string, path: string, query: Record<string, unk
if (method === "GET" && path === "/page") return ["getPageInfo"];
if (method === "GET" && path === "/status") return ["getConnectionStatus"];
if (method === "GET" && path === "/tabs") return ["listBrowserTabs"];
if (method === "GET" && path === "/chrome-tabs") return ["listTabs"];
if (method === "POST" && path === "/chrome-tabs/read") return ["readTab"];
if (method === "POST" && path === "/chrome-tabs/navigate") return ["navigateTab"];
if (method === "POST" && path === "/chrome-tabs/soft-click") return ["softClick"];
if (method === "POST" && path === "/chrome-tabs/soft-type") return ["softType"];
if (method === "POST" && path === "/screenshot") return ["takeScreenshot"];
if (method === "POST" && path === "/refresh") return ["refreshBrowser"];
if (method === "POST" && path === "/navigate") return ["navigateBrowser"];
Expand Down Expand Up @@ -135,6 +145,9 @@ export function isStateChangingRequest(method: string, path: string): boolean {
path === "/screenshot" ||
path === "/refresh" ||
path === "/navigate" ||
path === "/chrome-tabs/navigate" ||
path === "/chrome-tabs/soft-click" ||
path === "/chrome-tabs/soft-type" ||
path === "/settings" ||
path === "/tabs/select")
);
Expand Down
Loading
Loading