mcpXmcpXDocs

mcpX product documentation

Tool reference

The browser tools exposed by mcpX, grouped by the job they perform.

mcpX exposes focused tools rather than one unrestricted browser command. Most tools accept an explicit tabId; use tabs-list or tab-current to discover it.

Tabs and navigation

ToolWhat it does
tabs-listLists tabs across Chrome windows.
tab-currentReturns the active tab.
tab-activateActivates a tab and can focus its window.
open-tabOpens an HTTP or HTTPS URL in a new tab.
close-tabCloses an explicit tab.
tab-navigateNavigates an explicit tab to an HTTP or HTTPS URL.
tab-backGoes back in tab history.
tab-forwardGoes forward in tab history.

Chrome-internal, extension, file, data, and view-source destinations are restricted.

Read and locate page content

ToolWhat it does
snapshotReturns a bounded semantic view of useful page elements, roles, names, states, bounds, context, and references.
resolve-elementResolves a target by ref, test ID, CSS selector, role and name, or visible text.

References belong to the current document generation. Navigation invalidates them, so request a new snapshot after the page changes. If a locator matches more than once, provide nth or a more specific locator.

Interact with elements

ToolWhat it does
tab-clickClicks one rendered target.
double-clickDispatches a two-click interaction and a double-click event.
hoverMoves over a rendered target.
type-textReplaces, appends, clears, or inserts text in an editable control.
press-keySends supported page-level keyboard behavior.
select-optionSelects native option values and dispatches input and change events.

Hidden, disabled, detached, obstructed, zero-sized, missing, or ambiguous targets return typed errors. Browser-owned shortcuts such as focusing Chrome's address bar are not synthetically invoked.

Scroll and wait

ToolWhat it does
tab-scrollScrolls the window or a container, or moves a target into view.
waitWaits for bounded time, navigation, or an element state.

Waits support cancellation and clean up their page request after cancellation or timeout.

Screenshots

screenshot captures an explicit tab as native MCP PNG or JPEG image content. It supports viewport or full-page capture, JPEG quality, pixel and byte limits, encoded dimensions, and state-restoration metadata.

Screenshots use Chrome's debugger permission. Close DevTools or another debugger extension for the target tab if mcpX reports DEBUGGER_UNAVAILABLE.

Console monitoring

Console collection is explicit and ordered:

  1. Call console-start on the target tab.
  2. Reproduce the behavior.
  3. Read events with console-logs.
  4. Optionally call console-clear.
  5. Finish with console-stop.

Only events emitted after console-start are available. Filters include level, source, timestamp, text, and result limit. The bounded store reports entries it had to evict.

Error model

Tool failures identify the failed tool, a sanitized target, a typed code, and whether the request is retryable. Common codes include:

CodeTypical response
TAB_NOT_FOUNDRefresh the tab list and retry with a current ID.
RESTRICTED_PAGEMove to a normal HTTP or HTTPS page.
ELEMENT_NOT_FOUNDTake a fresh snapshot or refine the locator.
AMBIGUOUS_ELEMENTAdd nth or use a more specific locator.
ELEMENT_NOT_INTERACTABLECheck visibility, obstruction, or disabled state.
DEBUGGER_UNAVAILABLEClose DevTools or the competing debugger.
TIMEOUTCheck the expected state and use a bounded retry.
DISCONNECTEDReconnect the extension and confirm the server is running.
CANCELLEDThe client cancelled the matching request.