Documentation / MCP HTTP and stdio

MCP HTTP and stdio

MCP exposes scoped native API tools and page tools from the local application. Discover the actual names and schemas through tools/list.

MCP 2026-07-28#

Use server/discover without initialize. Every request needs params._meta with io.modelcontextprotocol/protocolVersion and io.modelcontextprotocol/clientCapabilities. For HTTP, send matching MCP-Protocol-Version and Mcp-Method headers and accept both application/json and text/event-stream. tools/call also needs Mcp-Name with the tool name; resources/read needs the resource URI. The supplied stdio bridge adds these headers.

JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "server/discover",
  "params": {
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Successful responses include resultType:complete. Discovery, lists and resources have ttlMs:0 and cacheScope:private. Header mismatches return -32020; unsupported versions return -32022. GET and DELETE are not used by this revision.

SSE subscriptions#

resources/list exposes tabgecko://runtime with sufficient permissions. Open a modern subscriptions/listen request with notifications:{toolsListChanged:true,resourceSubscriptions:["tabgecko://runtime"]} and the same metadata. The first notification acknowledges the accepted subset; its subscriptionId matches the request ID. Updates are sampled once per second and signal that the resource should be read again. Reconnect by opening a new subscription and reading the current state. This is not an audit event history.

Older clients can use the Mcp-Session-Id returned by initialize for GET SSE, resources/subscribe, resources/unsubscribe and DELETE. Up to 128 sent events are retained per session; Last-Event-ID can resume known events. HTTP 409 requires a fresh state read. Events are not collected while disconnected. Both stdio bridges forward subscriptions and reconnect the legacy event channel.

HTTP transport#

For older protocol revisions, use the displayed native base address plus /mcp. Send Authorization: Bearer and Content-Type: application/json. Advertise Accept: application/json, text/event-stream. Initialize with your supported protocol version, clientInfo and capabilities; follow with notifications/initialized. After negotiation send MCP-Protocol-Version with subsequent HTTP requests.

JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2025-11-25",
    "capabilities": {},
    "clientInfo": {
      "name": "example-local-client",
      "version": "1.0"
    }
  }
}
Three separate HTTP requests, or three stdio lines
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/list"}
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get_profiles","arguments":{"limit":1}}}

Older clients can use 2025-11-25, 2025-06-18, 2025-03-26 and 2024-11-05. Revision 2026-07-28 uses the per-request contract described above. Inspect the server’s initialize result; do not assume your requested version was selected. Use single messages rather than HTTP batches for current clients.

Node.js stdio bridge#

Node.js 22+
node tabgecko.mjs mcp

Download tabgecko.mjs, configure your MCP client to execute Node.js with the absolute path to that file and argument mcp. Supply ADBR_API_TOKEN and optionally ADBR_API_URL in the child process environment. Do not paste a shell command into a JSON args entry. Standard output is reserved for newline-delimited JSON-RPC.

Process configuration fragment, client-specific wrapper omitted
{
  "command": "node",
  "args": [
    "<ABSOLUTE_PATH_TO_tabgecko.mjs>",
    "mcp"
  ],
  "env": {
    "ADBR_API_URL": "http://127.0.0.1:47300",
    "ADBR_API_TOKEN": "<LOCAL_MCP_TOKEN>"
  }
}

Client configuration formats differ. Map this process definition to your client’s documented MCP configuration. The CLI does not start the desktop or install a kernel. An explicit URL selects the intended instance; otherwise local runtime metadata is used.

Access from another computer#

The desktop API listens only on loopback. It cannot be reached directly from another LAN or the Internet. Keep TabGecko running and signed in on its own computer. A trusted second computer can use an authenticated SSH local forward, optionally over a private VPN; the example assumes an SSH service is already configured and reachable on the TabGecko computer. Bind the client side to 127.0.0.1 and forward the same port shown in TabGecko, because the API validates the Host header. Then use http://127.0.0.1:/mcp in the remote MCP client with a separate scoped token. A VPN alone does not make the loopback listener reachable. Do not expose the API on 0.0.0.0 or forward it through a public reverse proxy. Hosted clients without a tunnel cannot connect directly, and this local endpoint does not offer hosted OAuth discovery.

Run on the remote client computer
ssh -N -L 127.0.0.1:<PORT>:127.0.0.1:<PORT> USER@TABGECKO_COMPUTER

API tools and page tools#

Generated API tools use a method prefix, such as get_profiles and post_profiles_id_start. Path/query arguments are direct properties; a JSON request body is nested under body. tools/list only includes tools allowed by the token. Do not infer permissions from a tool name or readOnlyHint alone.

JSON
{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "tools/call",
  "params": {
    "name": "post_profiles_id_start",
    "arguments": {
      "id": "PROFILE_ID",
      "body": {}
    }
  }
}

page_list, page_open, page_navigate, page_text, page_html, page_screenshot, page_click, page_type, page_press_key and page_evaluate act on a running profile. Resolve profile_id (or supported profile_no) and target_id explicitly. With multiple tabs, target_id is required; no active tab is guessed. Read the returned schema before each new tool family; page_evaluate executes code in the page and is not a read-only promise.

Chrome DevTools in a profile#

When tools/list includes devtools_take_snapshot, start a Chromium profile with API control and choose a target_id from page_list. The tools run on that device through the same TabGecko MCP connection. No Chrome installation, additional server configuration or admin token is required for page diagnostics.

tools/call
{
  "name": "devtools_take_snapshot",
  "arguments": {
    "profile_id": "PROFILE_ID",
    "target_id": "TARGET_ID"
  }
}

Use the uid beside the field or button in the returned accessibility snapshot. Keep the same target_id for the next call, including when two tabs show the same URL. Snapshot, request and console IDs belong to the current DevTools session.

tools/call
{
  "name": "devtools_fill_form",
  "arguments": {
    "profile_id": "PROFILE_ID",
    "target_id": "TARGET_ID",
    "elements": [
      {
        "uid": "UID_FROM_SNAPSHOT",
        "value": "Bonn"
      }
    ]
  }
}

After an interaction, inspect devtools_list_console_messages and devtools_list_network_requests. Open one message or request by its ID. devtools_get_css_styles shows which CSS declarations win and where they are defined. A performance trace measures the page during navigation or interaction. A Lighthouse audit reports accessibility, best practices and SEO findings.

Use devtools_workspace to locate reports and test files for your profile and access identity. File arguments are relative to this directory. devtools_write_fixture creates new files of up to 256 KiB. devtools_read_artifact returns Base64 chunks and next_offset for a remote client. For a network mock, supply a response file from this directory. Close the worker with devtools_disconnect. It also closes on profile stop or after 15 idle minutes.

Available DevTools operations#

These operations come from the bundled Chrome DevTools MCP. Each name below uses the devtools_ prefix. Search list_mcp_tools for that prefix and read the precise input schema with describe_mcp_tool. The running installation and the token determine which operations the client can use.

AreaTool names after devtools_
Inputclick click_at drag fill fill_form handle_dialog hover press_key type_text upload_file
Navigationclose_page list_pages navigate_page new_page select_page wait_for
Emulationemulate resize_page
Performanceperformance_analyze_insight performance_start_trace performance_stop_trace
Networkget_network_request list_network_requests
Network mocksmock_network remove_network_mock
Debuggingevaluate_script get_console_message get_css_styles lighthouse_audit list_console_messages screencast_start screencast_stop set_logpoints take_screenshot take_snapshot
Memoryanalyze_heapsnapshot_contexts close_heapsnapshot compare_heapsnapshots get_heapsnapshot_class_nodes get_heapsnapshot_details get_heapsnapshot_dominators get_heapsnapshot_duplicate_strings get_heapsnapshot_edges get_heapsnapshot_object_details get_heapsnapshot_retainers get_heapsnapshot_retaining_paths get_heapsnapshot_summary query_heapsnapshot_objects take_heapsnapshot
Extensionsinstall_extension list_extensions reload_extension trigger_extension_action uninstall_extension
Page developer toolsexecute_3p_developer_tool list_3p_developer_tools
WebMCPexecute_webmcp_tool list_webmcp_tools
WebAuthnconfigure_webauthn

Firefox uses the native page_* tools. PWA operating-system actions require a direct Chrome pipe and are unavailable through this connection. For a WebMCP development profile, enable WebMCP and DevToolsWebMCPSupport in the Chromium launch options and open a page that registers tools. Changes to managed extensions go through the TabGecko library. For unpacked extensions in your DevTools workspace, use a development profile started with --enable-unsafe-extension-debugging and an access token with extension permissions. To evaluate a service worker, pass its serviceWorkerId from devtools_list_pages and omit target_id. If the profile enters manual review, hand control to the user.

Native page actions on both engines#

page_press_key supports shortcuts such as Ctrl+A or Meta+A on macOS. page_wait_for accepts either a CSS selector and state, or text as a list of alternatives. page_double_click, page_activate, page_history and page_handle_dialog operate on the specified tab. page_upload accepts stored TabGecko upload references. page_screenshot supports an element selector, PNG or JPEG, and JPEG quality.

Hover, drag and iframe clicks#

From version 0.5.70, page_hover moves the pointer over selector. page_drag drags selector to target_selector in the same document; duration_ms is 100–5000 (default 500). page_iframe_click clicks selector inside iframe_selector. Optional frames lists parent-frame selectors from outermost to innermost; at most 16 levels including iframe_selector. Chromium and Firefox support nested and cross-origin frames. Missing, hidden, disabled or covered targets fail explicitly. With multiple tabs, target_id is required. These actions retain runtime-control permissions, cancellation and manual-review protection. From version 0.5.72, native drag data and copy/move settings are preserved across horizontal and nested scrolling. A cancelled drag returns automation.drag_cancelled; a rejected native drop returns automation.drop_rejected. Read the resulting page state to verify the application outcome.

Browser controls#

page_wait_for waits for a selector state: visible, hidden, attached or detached. timeout_ms ranges from 0 to 120000; the default is 15000. page_select selects native HTML options using values:string[] and rejects unavailable or disabled values before changing the selection. page_scroll accepts x/y offsets or a selector. page_close always requires the exact target_id. These tools use the same profile permissions and manual-review protection as existing page tools. Inspect describe_mcp_tool to check availability in your installed version.

Structured errors and correlation#

Tool failures preserve their text and additionally expose structuredContent.error with code, message and details. The native request ID is available as structuredContent.request_id and result._meta["io.tabgecko/request_id"]; use get_audit with request_id to find recorded actions. It can differ from the outer MCP HTTP request ID. Not every read or failure writes an audit event. SDK exceptions preserve requestId in TypeScript, request_id in Python and RequestId in C#.

Explicit fingerprint changes#

Normal proxy updates preserve the fingerprint. To request a new identity, use patch_profiles_id with body.regenerate_fingerprint:true. This is separate from AdsPower random_ua, which is supported only during creation. Read the resulting profile after an edit.

Find tools and built-in help#

Use list_mcp_tools to search tool names and descriptions, optionally filter read_only and paginate with offset/limit. describe_mcp_tool returns the complete input schema and token scopes for a permitted tool. get_mcp_guide lists topics or returns a topic in English or German. These tools are available from version 0.5.12; discover the running server’s capabilities first.

JSON
{
  "jsonrpc": "2.0",
  "id": 5,
  "method": "tools/call",
  "params": {
    "name": "list_mcp_tools",
    "arguments": {
      "query": "automation",
      "limit": 10
    }
  }
}
JSON
{
  "jsonrpc": "2.0",
  "id": 6,
  "method": "tools/call",
  "params": {
    "name": "get_mcp_guide",
    "arguments": {
      "topic": "editing",
      "language": "en"
    }
  }
}

Check without executing#

post_automation_workflows_validate accepts body.workflow and optionally body.id for an existing workflow. It checks schema, JavaScript syntax, profile references, subworkflow cycles/depth and schedules without saving, opening browsers or executing code. Read warnings even when valid is true. This is not a simulation of remote pages, selectors, credentials or execution permissions. post_automation_test_run actually executes actions.

Atomic changes and revision conflicts#

Read get_automation_workflows_id for workflow and revision. Send that revision as expected_revision to patch_automation_workflows_id_steps. Edits use zero-based indices relative to the result of the previous edit. delete_count: 0 inserts; steps: [] removes. The complete batch is validated and committed atomically. Limits: 100 edits, 200 steps per intermediate/final state, at least one final step. On HTTP 409 automation.revision_conflict, reload and reconcile instead of blindly retrying. Existing running jobs keep their initial workflow snapshot. Reading and editing stored workflow values additionally requires secrets:read.

JSON
{
  "jsonrpc": "2.0",
  "id": 7,
  "method": "tools/call",
  "params": {
    "name": "patch_automation_workflows_id_steps",
    "arguments": {
      "id": "WORKFLOW_ID",
      "body": {
        "expected_revision": "REVISION_FROM_GET",
        "edits": [
          {
            "index": 0,
            "delete_count": 1,
            "steps": [
              {
                "action": "wait",
                "value": "100"
              }
            ]
          }
        ]
      }
    }
  }
}

Incremental execution logs#

get_automation_runs_id returns status and bounded event pages. Start with since: 0 and limit: 100, then use log.next as since. Drain log.has_more even after completion. Wait between polls while a run is active. Sequence numbers are stable and increasing; events contain state and diagnostics, not input values or variable contents. Only the last 1000 events are retained. log.truncated and first_available identify a gap; log.available is false for old runs without logs. Removed history returns 404. A cancellation request is asynchronous: continue observing until the final state. Abrupt shutdown may lose events not yet persisted.

JSON
{
  "jsonrpc": "2.0",
  "id": 8,
  "method": "tools/call",
  "params": {
    "name": "get_automation_runs_id",
    "arguments": {
      "id": "RUN_ID",
      "since": 0,
      "limit": 100
    }
  }
}

Errors and lifecycle limits#

The downloadable stdio bridge accepts one message per line, up to 1 MiB, and limits responses to 20 MiB. It allows eight concurrent requests with a 150-second default request deadline (ADBR_MCP_TIMEOUT_MS: 1000–600000 ms). EOF and blocked output have bounded shutdown handling. Initialize finishes before subsequent messages are forwarded; the negotiated version header is added automatically.

The server permits four event streams per token and 32 total. Token revocation, lost access or account changes close affected subscriptions. Modern stream closure requests cancellation of pending starts and page connections. Stdio clients use notifications/cancelled. Completed writes are not rolled back; background jobs require their own cancellation tool. Inspect JSON-RPC errors and result.isError and read state after interrupted writes. Modern subscriptions have no general request deadline.

Search for headless, MCP, cookies or an API endpoint.

↑ ↓ NavigateEnter OpenEsc Close