Skip to main content
Glama
operagx-connector-plus

operagx-connector-plus

by Zindaar

operagx-connector-plus

CI npm version npm downloads Node.js >=18 License: MIT Open issues

An MCP server that adds real browser interaction — click, type, keyboard, form-fill, drag, scroll, select — on top of the read-only OperaGX connector (go-to-page, list-tabs, tab-content, screenshot, close-tab, history). Run both MCP servers side by side; this one doesn't replace the original, it fills the gap between "read the page" and "act on it."

Why the Chrome DevTools Protocol, not OS-level input

Two ways exist to make an agent actually click/type in a browser:

  1. OS-level hardware events (SendInput on Windows, robotjs, xdotool) — simulate input at the operating system, blind to window coordinates, steal the real mouse cursor, need the window focused and on-screen, and need OS accessibility permissions.

  2. Chrome DevTools Protocol (Input.dispatchMouseEvent / Input.dispatchKeyEvent) — simulates input inside the browser's own input pipeline. Indistinguishable from real hardware input to the page (unlike element.click()/dispatchEvent() in JS, which skip native browser behavior and are trivially detectable by sites), works in the background, doesn't touch the real OS cursor, and needs no extra OS permissions.

Since Opera GX is Chromium-based, it already speaks CDP. This server uses playwright-core purely as a typed CDP client (chromium.connectOverCDP) — no Playwright-managed browser is launched; it attaches to your existing, already-running Opera GX.

Related MCP server: open-browser-bridge

Install

npm install
npm run build

Requires Node.js 18+.

Setup

  1. Launch Opera GX with a remote debugging port. Add a flag to wherever you launch it from:

    --remote-debugging-port=9222

    This applies to a shortcut's target, a Run-at-login entry, or any launcher — see docs/enabling-cdp.md for exact steps on Windows (taskbar pin, Start Menu shortcut, autostart registry entry).

  2. Register the server with your MCP client. For the Claude Code CLI, at user scope (available in every project):

    claude mcp add operagx-connector-plus -s user \
      -e OPERAGX_CDP_URL=http://localhost:9222 \
      -- node /absolute/path/to/operagx-connector-plus/dist/index.js

    For other clients, the equivalent JSON config is:

    {
      "mcpServers": {
        "operagx-connector-plus": {
          "command": "node",
          "args": ["/absolute/path/to/operagx-connector-plus/dist/index.js"],
          "env": { "OPERAGX_CDP_URL": "http://localhost:9222" }
        }
      }
    }
  3. Also register the base OperaGX connector (screenshot, tab-content, go-to-page, ...) — this server is designed to complement it, not replace it. See the section below for the recommended combined workflow.

The interaction loop

This server pairs with the base connector's screenshot tool for visual grounding ("set-of-marks" style):

  1. operagx_map_elements — scans the DOM for clickable/fillable elements, returns each with a small integer id, role, text, and coordinates, and draws numbered badges on the live page.

  2. Call the base connector's screenshot tool — the badges let you visually confirm which numbered id is which element.

  3. operagx_click / operagx_type_text / operagx_fill_form / operagx_select_option / operagx_drag_and_drop / etc., addressed by elementId (preferred), a raw CSS selector, or absolute x/y coordinates.

  4. operagx_clear_annotations when done, so badges don't linger in future screenshots.

Tools

Tool

Does

Read-only

Idempotent

operagx_list_tabs

Enumerate tabs with a stable tabId usable by every other tool here

✅

✅

operagx_map_elements

Map clickable/fillable elements to numbered ids + coordinates, annotate the page

✅

—

operagx_clear_annotations

Remove the numbered overlay badges

—

✅

operagx_click

Real CDP mouse click (left/right/middle, single/double/triple)

—

—

operagx_hover

Move the mouse over an element/point

—

✅

operagx_type_text

Focus + type real per-character key events

—

—

operagx_press_key

Send a key or chord (Enter, Control+A, ...)

—

—

operagx_fill_form

Fill multiple fields in one call, optional submit key

—

—

operagx_select_option

Choose a <select> option by value/label/index

—

✅

operagx_drag_and_drop

Real mouse-down → move → mouse-up drag

—

—

operagx_scroll

Mouse-wheel scroll, or scroll an element into view

—

—

operagx_wait_for

Wait for a selector to reach a state (visible/hidden/attached/detached)

✅

✅

Every tool accepts an optional tab selector (tabId, tabIndex, matchUrl, matchTitle); omitting it defaults to the first open tab. Every tool also declares MCP annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) and a structured outputSchema, so clients that support structuredContent get typed results, not just text.

Evaluations

evaluations/eval.xml has 10 read-only, verifiable QA pairs for testing whether an LLM can use this server effectively, following the MCP evaluation guidelines. Since this server deliberately has no navigation tool (that's the base connector's job), each question assumes both servers are available, exactly as described above.

Security notes

  • This server can act on whatever page is open — treat it like giving a script mouse/keyboard access to the browser. Don't point an autonomous agent at a tab with an authenticated session you don't want touched.

  • There is no execute-script/arbitrary-JS tool by design, to keep the attack surface to well-defined interaction primitives.

  • CDP is unauthenticated by default on localhost — don't expose the debugging port beyond localhost/a trusted network. This server binds outbound to whatever OPERAGX_CDP_URL you configure; it does not open any listening port itself.

  • All inputs are validated with Zod .strict() schemas before any tool executes.

Development

npm run dev     # tsc --watch
npm run build   # one-shot build to dist/
npx @modelcontextprotocol/inspector node dist/index.js   # interactive testing

Contributing

See CONTRIBUTING.md.

License

MIT

Available Tools

12 tools
operagx_clear_annotationsClear Element AnnotationsA
Idempotent

Removes the numbered overlay badges left behind by operagx_map_elements.

Args:

  • tabId / tabIndex / matchUrl / matchTitle (optional): which tab to clear. Defaults to the first open tab.

Returns: { "ok": true }

Examples:

  • Use when: you're done visually grounding element ids and want a clean screenshot again.

Inputs: tabId, matchUrl, tabIndex, matchTitle. Returns: ok

operagx_clickClickA
Destructive

Clicks a real point in the browser via CDP mouse input (Input.dispatchMouseEvent), not a JS-level element.click(), so native behaviors (custom canvas controls, drag handles, popups, focus/blur listeners) fire exactly as they would for a human click.

Args:

  • tabId / tabIndex / matchUrl / matchTitle (optional): which tab to click in.

  • elementId (number, optional): id from the last operagx_map_elements call. Preferred.

  • selector (string, optional): CSS selector, if not using elementId.

  • x / y (number, optional): absolute viewport coordinates, if not using elementId/selector.

  • button ('left' | 'right' | 'middle', default 'left').

  • clickCount (number, default 1): 2 for double-click, 3 for triple-click.

Exactly one of elementId, selector, or x+y must be given.

Returns: { "ok": true, "clickedAt": { "x": number, "y": number, "selector"?: string } }

Examples:

  • Use when: "click the Submit button" -> map_elements first for its elementId, then click it.

  • Use when: a canvas-drawn control has no DOM selector -> click with explicit x/y from a screenshot's pixel coordinates.

  • Don't use when: you need to type into a field afterward and haven't focused it yet — use operagx_type_text instead, which clicks and types in one call.

Error Handling:

  • Returns "elementId N is not in the current map..." if the id is stale — call operagx_map_elements again.

  • Returns "Provide one of: elementId, selector, or x/y." if no target was given.

Inputs: x, y, tabId, button, +6 more. Returns: ok, clickedAt

operagx_drag_and_dropDrag And DropA
Destructive

Performs a real mouse-down / move / mouse-up drag between two points or elements, so drag handlers relying on genuine mousemove events (sortable lists, sliders, canvas handles) receive the motion they expect.

Args:

  • tabId / tabIndex / matchUrl / matchTitle (optional): which tab.

  • from / to: each { elementId? | selector? | x?+y? }, identifying the start and end points.

  • steps (number, default 10): intermediate mousemove steps between from and to.

Returns: { "ok": true, "from": { "x": number, "y": number, "selector"?: string }, "to": { "x": number, "y": number, "selector"?: string } }

Examples:

  • Use when: "drag item A onto the trash icon" -> map_elements for both elementIds, then drag_and_drop from item A's id to the trash icon's id.

Inputs: to (required), from (required), steps, tabId, +3 more. Returns: ok, to, from

operagx_fill_formFill FormA
Destructive

Fills multiple fields in one call and optionally submits at the end. Each field targets an element the same way as operagx_click (elementId/selector/x+y).

Args:

  • tabId / tabIndex / matchUrl / matchTitle (optional): which tab to fill.

  • fields (array, min length 1): each item is { elementId? | selector? | x?+y?, value: string }.

  • submitKey (string, optional): e.g. "Enter" to press after the last field. Omit to skip.

Returns: { "ok": true, "fields": [ { "filledAt": { "x": number, "y": number, "selector"?: string }, "value": string } ] }

Examples:

  • Use when: "log in with username tomsmith and password foo" -> map_elements for both field ids, then fill_form with both, submitKey="Enter".

  • Don't use when: only one field needs filling — operagx_type_text is simpler for that case.

Inputs: fields (required), tabId, matchUrl, tabIndex, +2 more. Returns: ok, fields

operagx_hoverHoverA
Idempotent

Moves the mouse over an element or point without clicking, e.g. to reveal a hover-triggered menu or tooltip before interacting with it.

Args:

  • tabId / tabIndex / matchUrl / matchTitle (optional): which tab to hover in.

  • elementId / selector / x+y: exactly one, same as operagx_click.

Returns: { "ok": true, "hoveredAt": { "x": number, "y": number, "selector"?: string } }

Examples:

  • Use when: "open the dropdown that only appears on hover" -> hover over its trigger element first, then operagx_map_elements to find the newly-visible items.

Inputs: x, y, tabId, matchUrl, +4 more. Returns: ok, hoveredAt

operagx_list_tabsList Tabs (Plus)A
Read-onlyIdempotent

Lists every open tab with a stable tabId usable by every other tool in this server.

This complements the read-only list-tabs from the base OperaGX connector: that one is for reading; this one hands you the id format the interaction tools (operagx_click, operagx_type_text, operagx_map_elements, ...) expect in their tabId parameter.

Args: none.

Returns: { "tabs": [ { "tabId": string, "url": string, "title": string, "index": number } ] }

Examples:

  • Use when: you need to address a specific tab by id instead of relying on the default (first open tab).

  • Don't use when: you already have a tabId from a previous call in this session — ids are stable for the lifetime of the browser connection, no need to re-list before every action.

Inputs: no named parameters. Returns: tabs

operagx_map_elementsMap Interactive ElementsA
Read-only

Scans the page for clickable/fillable elements (links, buttons, inputs, selects, ARIA widgets) and returns each with a small integer id, role, text, CSS selector, and viewport coordinates.

By default it also draws numbered badges on the live page — call the base connector's screenshot tool right after this to visually ground the ids, then reference them as elementId in operagx_click / operagx_type_text / etc. Call operagx_clear_annotations when done looking, so the badges don't linger in future screenshots.

Args:

  • tabId / tabIndex / matchUrl / matchTitle (optional): which tab to scan. Defaults to the first open tab.

  • annotate (boolean, default true): draw numbered overlay badges.

  • visibleOnly (boolean, default true): skip elements outside the viewport or CSS-hidden.

  • limit (number, default 100, max 500): cap on elements returned, to avoid overwhelming context on dense pages.

Returns: { "count": number, // elements actually returned (<= limit) "totalFound": number, // elements matched before truncation "truncated": boolean, // true if totalFound > count "elements": [ { "id": number, // pass this as elementId to other tools "tag": string, // e.g. "input", "button", "a" "role": string | null, // ARIA role, if set "text": string, // visible text / placeholder / aria-label, truncated to 120 chars "selector": string, // CSS selector (fallback addressing) "rect": { "x": number, "y": number, "width": number, "height": number }, "center": { "x": number, "y": number }, "attributes": { [name: string]: string } // id/class/name/type/role/placeholder/aria-label/value/href } ] }

Examples:

  • Use when: "click the login button" -> map_elements first to find its id, then operagx_click with that elementId.

  • Use when: a page has more interactive elements than the default limit -> re-call with a higher limit, or narrow with visibleOnly=true (default) to only what's on-screen.

  • Don't use when: you already have a fresh element map from a moment ago and the page hasn't changed — re-resolve selectors instead of re-scanning.

Error Handling:

  • Returns "No open tabs found..." if the browser has no open tabs — open one first.

Inputs: limit, tabId, annotate, matchUrl, +3 more. Returns: count, elements, truncated, totalFound

operagx_press_keyPress KeyA
Destructive

Sends a key or chord to the focused element or page, e.g. "Enter", "Escape", "Tab", "Control+A", "Control+Shift+ArrowLeft". If a target is given, it is clicked/focused first.

Args:

  • tabId / tabIndex / matchUrl / matchTitle (optional): which tab to send the key to.

  • elementId / selector / x+y (all optional): if given, focus this element first; otherwise the key goes to whatever currently has focus.

  • key (string): Playwright key syntax, e.g. "Enter" or "Control+A".

Returns: { "ok": true }

Examples:

  • Use when: "press Enter to submit the search" -> press_key with key="Enter" (target optional if the search field is already focused from a previous type_text call).

  • Use when: "select all text in this field" -> press_key with the field's elementId and key="Control+A".

Inputs: key (required), x, y, tabId, +5 more. Returns: ok

operagx_scrollScrollA

Scrolls the page with a real mouse-wheel event, or scrolls a specific element into view.

Args:

  • tabId / tabIndex / matchUrl / matchTitle (optional): which tab.

  • elementId / selector (optional): if given, scrolls that element into view instead of wheel-scrolling the page.

  • deltaX / deltaY (number, default 0): wheel scroll amount in CSS pixels, used only when no elementId/selector is given.

Returns: Either { "ok": true, "scrolledTo": { "x": number, "y": number, "selector"?: string } } or { "ok": true, "delta": { "x": number, "y": number } }

Examples:

  • Use when: "scroll down to load more results" -> scroll with deltaY=800.

  • Use when: "scroll the footer link into view" -> scroll with that link's elementId.

Inputs: tabId, deltaX, deltaY, matchUrl, +4 more. Returns: ok, delta, scrolledTo

operagx_select_optionSelect Dropdown OptionA
DestructiveIdempotent

Chooses an option in a native dropdown by value, label, or index.

Args:

  • tabId / tabIndex / matchUrl / matchTitle (optional): which tab.

  • selector (string): CSS selector for the element.

  • value / label / index: exactly one, identifying which option to choose.

Returns: { "ok": true, "selected": string[] } // the value(s) selected, per the DOM API

Examples:

  • Use when: "choose 'Option 2' from the dropdown" -> select_option with the select's selector and label="Option 2".

Error Handling:

  • Playwright throws if the selector doesn't resolve to a , or the option doesn't exist — the error message names the selector and requested value.

Inputs: selector (required), index, label, tabId, +4 more. Returns: ok, selected

operagx_type_textType TextA
Destructive

Focuses an element (by clicking it) and types text using real per-character key events (CDP Input.dispatchKeyEvent), so JS keydown/input listeners, IME composition, and masked inputs behave like real typing rather than a value assignment.

Args:

  • tabId / tabIndex / matchUrl / matchTitle (optional): which tab to type into.

  • elementId / selector / x+y: exactly one, same as operagx_click — identifies the field.

  • text (string): the text to type.

  • clearFirst (boolean, default true): select-all + Backspace before typing, to replace any existing value instead of appending.

  • delayMs (number, default 20): delay between keystrokes; raise it for sites that debounce input handling.

Returns: { "ok": true, "typedInto": { "x": number, "y": number, "selector"?: string } }

Examples:

  • Use when: "enter 'tomsmith' in the username field" -> map_elements for its elementId, then type_text with text="tomsmith".

  • Don't use when: filling several fields at once — use operagx_fill_form instead, it's one tool call for the whole form and can submit at the end.

Inputs: text (required), x, y, tabId, +7 more. Returns: ok, typedInto

operagx_wait_forWait For SelectorA
Read-onlyIdempotent

Waits until a selector reaches a given state, or times out.

Args:

  • tabId / tabIndex / matchUrl / matchTitle (optional): which tab.

  • selector (string): CSS selector to wait for.

  • state ('attached' | 'visible' | 'hidden' | 'detached', default 'visible').

  • timeoutMs (number, default 10000).

Returns: { "ok": true }

Examples:

  • Use when: "wait for the spinner to disappear before continuing" -> wait_for with the spinner's selector and state="hidden".

Error Handling:

  • Throws a timeout error naming the selector and state if it isn't reached in time.

Inputs: selector (required), state, tabId, matchUrl, +3 more. Returns: ok

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.5/5.0

    Scored across 12 tools

    Disambiguation5/5

    Each tool targets a distinct user interaction: typing, clicking, hovering, key presses, form filling, option selection, drag-and-drop, scrolling, waiting, and element mapping. Even the overlapping type_text and fill_form are clearly differentiated by scope (single field vs. multi-field with submit).

    Naming Consistency5/5

    All tools share the 'operagx_' prefix and use clear snake_case verb-based names (type_text, list_tabs, clear_annotations, drag_and_drop). Single-word verbs like 'click' and 'scroll' are still consistent with the action-oriented pattern and do not cause confusion.

    Tool Count5/5

    12 tools is a well-scoped set for a browser interaction extension. Each tool covers a distinct, commonly needed automation primitive without redundancy, fitting comfortably within the ideal 3-15 tool range.

    Completeness4/5

    The interaction surface is strong: click, type, hover, key press, form fill, select, drag-and-drop, scroll, wait, and element mapping. Minor gaps exist like file upload or iframe switching, but these are likely left to the base connector, so the extension's purpose is well covered.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      B
      maintenance
      Connects to the Firefox or Chromium browser you already use, on desktop or Android, so agents can navigate sites, read pages, click and fill forms, take screenshots, and extract structured data. It keeps session credentials inside the browser rather than copying them into agent configuration.
      49
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to control Chrome, Edge, Brave and other Chromium browsers through an extension and native messaging host, exposing a Claude-in-Chrome-compatible tool set for real clicks, typing, screenshots, accessibility-tree reading, page text, form filling, JavaScript execution, console and network inspection, file uploads and GIF recording. Agent sessions run in isolated tab groups with per-site permission prompts, activity logging and a global stop control.
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables coding agents to control the user's real Chrome or Firefox tabs, with their existing logins, to read pages, click, type, fill forms, take screenshots, inspect network traffic and run JavaScript. It works through a paired browser extension over a local WebSocket connection, so automation happens in the browser the user is actually looking at, including shadow DOM, cross-origin iframes, dialogs and single-page apps.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables an AI agent to drive the user's actual Microsoft Edge or Chrome profile through a browser extension using tab-scoped CDP, preserving existing cookies and logins without Selenium, Playwright, or a remote debugging port. Exposes tools for listing tabs, reading cookies, evaluating JavaScript, sending raw CDP commands, batching operations, clicking, typing, uploading files, capturing screenshots, and adjusting content settings.
      MIT