Developers · preview

One goal in. A verified page out.

Use MeshSurfer from Python, or give your existing agent a browser through the Model Context Protocol. APIs below reflect the current preview and may change before general availability.

Python SDK

Create an agent with a starting URL and a goal, then iterate over its steps. Each state includes elapsed time, status, and the latest decision.

  run.py
from meshsurfer import Agent

with Agent(
    "https://www.example-travel.com/flights",
    "Find one-way flights from Zurich to London on September 20, 2026, "
    "for one adult in economy. Stop when matching flight options are visible.",
) as agent:
    for state in agent.run():
        print(state["elapsed_ms"], state["status"])

The same policy runs any task. Change the URL and the goal; nothing else.

Agent tools over MCP

Let any MCP client (coding assistants, IDE agents, your own harness) drive a browser. The calling agent breaks the work into narrow goals; MeshSurfer executes each one with the same loop.

calling agent ──goal──▶ meshsurfer-mcp ──▶ decision loop ──CDP──▶ browser tab
      ▲                                         │
      └──── actions + page text + elements ─────┘   (caller verifies)
ToolArgumentsWhat it does
browser_dogoal, url | session_idRuns one goal until DONE, BLOCKED, or an error
browser_observesession_idRe-reads the page without acting
browser_closesession_idCloses the tab

Pass url to open a new tab, or session_id to continue in an existing one with fresh history and budgets. Invalid input (non-HTTP URLs, unknown sessions, too many tabs) returns a tool error and opens nothing.

  mcp config
{
  "mcpServers": {
    "meshsurfer": {
      "command": "meshsurfer-mcp"
    }
  }
}

Result shape

FieldMeaning
session_idPass to later calls to keep using this tab
statusdone, blocked, or error
url, titleThe final page
elapsed_msFirst decision to last observation
model_calls{"decisions": n, "text": n}
actionsExecuted actions: operation, element label, typed text, whether the page changed
page_textVisible page text (up to 6,000 chars)
elementsIndexed element table, e.g. [3] combobox Where to? · London
done is a claim, not proof. Check url, page_text and elements against your goal before relying on the outcome.

Bring your models

MeshSurfer uses two models, both reached over HTTP:

  • Decision model: a structured-choice model that answers the operation and target heads. Use our hosted endpoint, a compatible model router, an edge inference provider, or a self-hosted server.
  • Text model: any OpenAI-compatible /chat/completions endpoint. Small, fast, non-reasoning models work best. JSON mode can be disabled for engines that don't support it; replies are still validated before anything is typed.

Keys stay in the server process. A key is only ever sent to the host it was configured for, and self-hosted endpoints without a key receive no Authorization header. Provider errors name the URL that failed, and no action is executed.

Best practices

  • One narrow goal per call. Chain them on a session: search, then open a result, then set a filter.
  • Verify after every call. Read the final URL and elements yourself.
  • After an error, observe first. Actions in the result already ran and are never retried automatically.
  • Treat blocked as a signal to switch tools for pages outside the DOM reader (canvas, iframes, uploads).
  • Raise your client's tool timeout for long goals. Each goal is budgeted at 60 actions and 120 decisions, and stops after three no-op actions in a row.

Request preview access →