back
Navigate back in browser history
Drive the browser tab you already have open: click by selector or by viewport coordinate, type the way a keyboard does, and read the console and network traffic back from that same tab.
LABSCO SUMMARY
The reason to reach for it over a selector-only driver is the two escape hatches: coordinate clicks land on whatever is at that point, iframes included, and type drives real keydown/keyup events so autocompletes, input masks and contenteditable editors behave as they would under a human. Two edges are worth planning around — network capture keeps no history, so monitoring has to be on before the traffic you care about happens, and select works on native HTML select elements only, not on custom dropdowns.
A bridge to browser tabs that connect to it, 31 commands driving an existing tab over the Chrome DevTools Protocol rather than launching an automated browser of its own.
A browser tab connected to the Kapture bridge, since every command takes a tabId; new_tab opens a page that connects itself, and list_tabs shows what is already attached. Key events, typing and network capture run through the Chrome DevTools Protocol, so the tab has to be one Kapture can attach to.
Follow the published steps
USE CASES
Attach to the tab that already holds the session, drive it to the state that fails, and read the console back without touching the browser yourself.
Focus the field first, then choose the input path the field will actually respond to: per-character events for masked inputs and autocompletes, a single committed block for large text and rich editors.
Turn capture on before you act, since it records only what happens while it is running, then click and read back the request list and the body of the one you care about.
A blocking alert, confirm or prompt stops every other command until it is answered. Answer it, then watch what the page logs next.
Put the sequence in a script of one command per line, each an ordinary tool call in query-string form, and take a screenshot at the end to confirm where it landed.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
backNavigate back in browser history
blurRemove focus (blur) from a page element using CSS selector or XPath. Only the first matching element will be blurred. Returns the unique selector of the blurred element. Also removes focus from document.activeElement if different.
clearClear a text field by selecting all of its contents and deleting them with real key events (Ctrl/Cmd+A then Backspace) via Chrome DevTools Protocol. Works on inputs, textareas, contenteditable, and "fake" inputs that ignore element.value. Optionally focuses a target element first (CSS selector or XPath); otherwise clears the currently focused element.
clickClick on a page element using CSS selector or XPath (first match, its unique selector is returned), or at a viewport coordinate by passing x and y instead. Coordinates are CSS pixels relative to the viewport - NOT screenshot pixels; divide screenshot positions by the screenshot-to-viewport scale. Coordinate clicks hit whatever is at that point, including content inside iframes that selectors cannot reach.
closeCloses a browser tab. The tab will be immediately closed and removed from the connected tabs list.
composeRun a sequence of commands against a single tab in one call. The script is one command per line in the form <tool>?<query-string> - a URL query string whose keys are exactly that tool's own parameters. URL-encode each value: spaces as %20 or +, and especially &, %, and newlines (%0A). For example, two lines: fill?selector=%23q&value=tom%20%26%20jerry then wait?t=500. Commands run in order and stop at the first failure (a command erroring or not finding its element). The whole script is validated first, so an invalid script runs nothing. Returns an array of the per-command responses in order; on failure the last entry holds the error. Eligible commands: navigate, back, forward, reload, click, hover, focus, blur, fill, type, insertText, clear, select, keypress, scroll - plus wait?t=<ms> to pause between steps. The FINAL command may additionally be a data-returning read - screenshot, dom, elements, elementsFromPoint, console_logs, or watch_console - to verify the outcome in the same call (e.g. click then screenshot, or fill then console_logs). Data reads anywhere else, lifecycle (new_tab, close, show), and evaluate commands are not eligible.
console_logsGet the browser tab's console contents - what you would see in the DevTools console, including console messages, uncaught exceptions, and browser-generated entries (network errors, violations, etc.). Returns newest first.
dialogRespond to a JavaScript dialog (alert, confirm, prompt, or onbeforeunload) that is blocking the tab. A dialog freezes the page - while one is open every other command fails fast with DIALOG_OPEN, and the command that triggered it returns a dialog field with its type and message. accept true presses OK/Leave, false presses Cancel/Stay (alerts close either way). For prompt() dialogs, text supplies the value to type before accepting.
domGet outerHTML of the body or a specific element using CSS selector or XPath. When a selector/xpath is provided, only the first matching element will be used. Returns the unique selector of the element if applicable.
elementsQuery all elements matching a CSS selector or XPath and get detailed information about each element. Use the visible parameter to filter elements by visibility status.
elementsFromPointGet information about all elements at a specific coordinate in the viewport
fillFill an input field with a value using CSS selector or XPath. Only the first matching element will be filled. Returns the unique selector of the filled element.
focusSet focus on a page element using CSS selector or XPath. Only the first matching element will be focused. Returns the unique selector of the focused element. Useful for form inputs, buttons, and other interactive elements.
forwardNavigate forward in browser history
hoverHover over a page element using CSS selector or XPath (first match, its unique selector is returned), or at a viewport coordinate by passing x and y instead. Coordinates are CSS pixels relative to the viewport - NOT screenshot pixels; divide screenshot positions by the screenshot-to-viewport scale. Coordinate hovers hit whatever is at that point, including content inside iframes that selectors cannot reach.
insertTextInsert a whole string at once into the focused element via Chrome DevTools Protocol (like an IME commit or paste - fires input/beforeinput but no per-key events). Best for large blocks of text and editors that accept inserted text (e.g. Google Docs). For inputs that require real keystrokes, use type instead. Optionally focuses a target element first (CSS selector or XPath); otherwise inserts at the currently focused element's cursor.
keypressSend a keypress event to the current tab or a specific element. Uses Chrome DevTools Protocol for proper key simulation including navigation keys (Tab, PageDown, arrows) and function keys. When delay > 500ms, automatically simulates holding the key down with repeated events.
list_tabsList all connected browser tabs
navigateNavigate browser tab to specified URL
network_bodyFetch the bodies for a single captured request by requestId (from network_requests). Monitoring must be on. Returns the request payload as requestBody (when the request had one - see hasPostData in the list) and the response body as body, plus the request/response headers. The response body is read live from the browser, so it may be unavailable - evicted, from a page that has since navigated away, or a streaming (text/event-stream) response that CDP cannot read - which returns a bodyError instead. Binary bodies come back base64-encoded (base64Encoded:true).
network_monitorTurn network monitoring on or off for a browser tab. While on, Kapture stays attached to the tab and records every network request (url, method, status, type, size, timing) into a buffer you read with network_requests; fetch an individual request/response body with network_body. The capture has NO history - it only sees requests that happen while monitoring is on, so enable it BEFORE the traffic you want to observe (e.g. before navigating or clicking). Enable is idempotent per caller: each watching client is tracked by identity, monitoring stays on until every watcher has disabled (or force is used), and a client's watchers are released automatically when it disconnects. The request buffer is cleared when monitoring fully stops. Extension 1.1.0+.
network_requestsList the network requests captured since monitoring was enabled. Returns lean metadata per request (plus hasPostData when the request carried a payload) and a requestId to pass to network_body. Each request has a monotonic seq; poll incrementally by passing the cursor from the previous call as since to get only newer requests. Returns monitoring:false (and an empty list) if monitoring is not currently on.
new_tabOpens a new browser tab with the Kapture MCP usage documentation page. The page will automatically connect to the Kapture server. Returns the tab ID of the newly opened tab once it connects.
reloadReloads the current page in the browser tab. Performs a standard page reload similar to pressing F5 or clicking the browser's refresh button.
screenshotCapture a screenshot of the page or specific element using CSS selector or XPath. When a selector/xpath is provided, only the first matching element will be captured. Returns the unique selector of the captured element if applicable.
scrollScroll the page or an element. Selector/xpath alone brings the element into view (centered vertically, nested scroll containers handled). x and/or y alone scrolls the document to that absolute coordinate. BOTH together scrolls within the element itself to that offset (e.g. an inner pane or infinite list) and returns the clamped landing position as elementScroll. A missing axis keeps the current offset (e.g. y:0 jumps to the top). Returns the resulting scroll position.
selectSelect an option from an HTML <select> dropdown element using CSS selector or XPath. Only the first matching select element will be used. Returns the unique selector of the select element. Note: Only works with native HTML select elements, not custom dropdowns.
showBrings the browser tab to the front and focuses it. This will switch to the tab's window and make it the active tab. Useful for directing user attention to a specific tab when managing multiple browser tabs.
tab_detailGet detailed information about a specific tab
typeType a string as individual keystrokes (real keydown/keyup/input events per character) via Chrome DevTools Protocol. Unlike fill, this works on "fake" inputs and rich editors that ignore element.value and react to actual keypresses (autocomplete, input masks, contenteditable). Optionally focuses a target element first (CSS selector or XPath); otherwise types into the currently focused element. Types at the cursor (does not clear - use the clear tool first to replace existing content).
watch_consoleWatch a browser tab's console in real time. Collects console messages, uncaught exceptions, and browser-generated entries as they happen for the timeout duration, then returns them in chronological order. Useful for observing the result of an action (e.g. click something, then watch what the page logs).
BEFORE YOU INSTALL
31 tools when we connected; the project documents 32. evaluate is off by default and appears only after enabling the Allow JS execution toggle. network_monitor, network_requests and network_body need extension 1.1.0 or later.
Both documented clients run the server on your machine.
INSTALLATION
Install the Kapture extension from the Chrome Web Store:
https://to.kap.co/kapture-extensionnpx -y kapture-mcp@latest bridge{
"mcpServers": {
"kapture": {
"command": "npx",
"args": [
"-y",
"kapture-mcp@latest",
"bridge"
]
}
}
}