surfsky-mcp
v0.0.9MCP server for the Surfsky antidetect cloud browser: scrape, browse and automate bot-protected sites from any MCP host.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
surfsky_status Account status
Check the Surfsky account this server uses: credentials, plan limits, proxy quota, and the sessions this server owns (id, seconds idle, idle timeout). Starts no browser. Use it when a tool returns an auth, quota or plan_full error, or before starting parallel sessions to see how many the plan allows.
surfsky_session_start Start a session
Start a cloud browser session and return its session_id. The hosted server needs it before any browser tool. A local server needs it only for a saved profile, a proxy location, a fingerprint OS, a second browser in parallel, or a session of your own when other agents share the server; otherwise the browser tools share a default session. The session bills per minute until surfsky_session_stop or idle_timeout seconds without a tool call: stop it when the task is done. It opens on about:blank; call surfsky_navigate next. The result's live_url lets the user watch the browser and act in it: give it…
| Parameter | Type | Description |
|---|---|---|
arch | string | Fingerprint CPU architecture, with os. |
block_resources | array | Resource types not downloaded: faster and less proxy traffic, but screenshots and layout lose them. |
city | string | Proxy exit city, with country. |
country | string | Proxy exit country code, for example US. |
dialogs | string | Answer to alert, confirm and prompt dialogs: 'dismiss' (default) or 'accept'. Answered dialogs are reported in the next result. |
idle_timeout | integer | Seconds without a tool call before the server stops the session (default 300). |
os | string | Fingerprint operating system. Not with profile_uuid. |
os_version | string | Fingerprint OS version, with os. |
profile_uuid | string | Saved profile to load: its cookies and logins come with it and are saved back on a normal stop. Only a uuid the user gave you. Not with os, os_version or arch. |
proxy | string | Omit for the account default. 'premium': residential pool; 'mobile': mobile pool; 'shared': free pool, tests only; or your own proxy URL (user:pass@host:port), then without country, region and city. |
region | string | Proxy exit state or region, with country. |
surfsky_session_stop Stop a session
Stop a session and its billing. Use it when a task is done, or to clean up a leaked session found with surfsky_session_list. Safe to repeat. A saved profile's cookies and logins are stored on a normal stop. Stopping the default session is fine: the next browser tool call starts a fresh one.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | The session to stop: any session id on the account. |
surfsky_session_list List sessions
List the account's running sessions: session_id, profile_uuid, started_at, active_seconds, whether this server started it (owned) and whether it is this server's default. Use it to find leaked sessions to stop.
surfsky_snapshot Snapshot elements
List the visible interactive elements (links, buttons, inputs, selects) and headings of the active tab as '[@N] role "name"' rows, with value, checked, options and disabled where present, and href for links that share a name; @N is a target for surfsky_act. Refs belong to this tab and URL: after a navigation an old ref fails with stale_ref. find narrows the list without renumbering. Iframe and shadow-root contents are not listed; they appear as '[--] iframe ... (content not reachable)'. For the page text use surfsky_read.
| Parameter | Type | Description |
|---|---|---|
details | boolean | Add every link's href and each row's CSS selector. |
find | string | Case-insensitive substring matched against each element's role, name, href and CSS selector; a|b matches either. |
interactive_only | boolean | List only elements that can be acted on, without headings. |
limit | integer | Maximum rows (default 500); the result says how many more matched. |
session_id | string | Session from surfsky_session_start; omit for the current one. |
surfsky_read Read page
Read the active tab as markdown (default), plain text, cleaned html or a list of links. Use it after surfsky_navigate or surfsky_act to get the page's text; for a URL that needs no clicks or login, surfsky_scrape does the same without a session. selector restricts the output to one element; with limit, to the first N matches, for repeated items like result cards. Content longer than max_chars is cut at a line boundary with a marker: raise max_chars or pass selector for the rest.
| Parameter | Type | Description |
|---|---|---|
format | string | 'markdown' (default), 'text' (rendered innerText; ignores only_main_content), 'html' (without scripts and styles) or 'links' (absolute, deduplicated, in document order). |
limit | integer | With selector: read the first N matching elements (at most 100) as separate items. |
max_chars | integer | Cut each text after this many characters (default 10000, at most 200000). |
only_main_content | boolean | Keep the main or article content; drop navigation, headers, footers, asides and forms. |
selector | string | CSS selector, @N from a snapshot of this page, or text=words (the first visible element whose name contains the words). No XPath. |
session_id | string | Session from surfsky_session_start; omit for the current one. |
surfsky_screenshot Screenshot
Capture the active tab as an image: the viewport as JPEG, or PNG for the full page or one element (selector). Take one only when the user asks for an image or the answer depends on how the page looks: a layout, a chart, or a captcha or canvas the text tools cannot read. Not to check that an action worked: its result already carries the page state. For what can be clicked use surfsky_snapshot; for content, surfsky_read.
| Parameter | Type | Description |
|---|---|---|
full_page | boolean | Capture the whole scrollable page as PNG instead of the viewport. |
selector | string | CSS selector, @N from a snapshot of this page, or text=words (the first visible element whose name contains the words). No XPath. |
session_id | string | Session from surfsky_session_start; omit for the current one. |
surfsky_evaluate Evaluate JavaScript
Run JavaScript in the active tab and return its JSON result: an expression, or a function called with args; a returned promise is awaited, so an async function can poll for a condition. Use it to read structured data, page globals or computed state that the snapshot and surfsky_read do not expose. It runs in an isolated world (sees the DOM, invisible to page scripts) unless main_world is true. Do not click or set values here: that fires synthetic events bot detection flags and skips the site's handlers; input goes through surfsky_act. Results over 30000 characters are cut.
| Parameter | Type | Description |
|---|---|---|
expression * | string | A JavaScript expression, or a function (arrow or function keyword) that receives args. |
args | array | JSON values passed to the function as arguments. |
main_world | boolean | Run in the page's main world (its globals; the page can observe the call) instead of the isolated world. |
session_id | string | Session from surfsky_session_start; omit for the current one. |
surfsky_act Act on the page
Perform input on the active tab with human-like mouse and keyboard, then return the page state (url, navigated, changed) and a fresh snapshot with @N refs. Use it for every click, form entry and keypress; pass steps to run a known sequence (fill a form, then submit) in one call. Actions: click, dblclick, hover (target); fill (target, text: replaces the value); type (target, text: appends keystrokes; target '@focused' types into the focused element without clicking); press (key); select (target, value); scroll (target scrolls it into view, delta_y scrolls the page, neither scrolls most of a scr…
| Parameter | Type | Description |
|---|---|---|
action | string | The action to perform; or pass steps. |
delta_y | number | Pixels to scroll the page: positive down, negative up. |
key | string | Key for press: Enter, Tab, Escape, Backspace, ArrowDown, or a combination like Control+A. |
modifiers | array | Modifier keys held during click, dblclick or press. |
session_id | string | Session from surfsky_session_start; omit for the current one. |
snapshot | boolean | Include a snapshot of interactive elements (default true). |
steps | array | Up to 20 actions run in order, instead of action: objects with the same fields (action, target, text, key, value, modifiers, delta_y). After a step that changes the page, target by CSS selector or tex… |
target | string | CSS selector, @N from a snapshot of this page, or text=words (the first visible element whose name contains the words). No XPath. |
text | string | Text for fill or type. |
timeout | number | Seconds allowed per action, including finding the element (default 10, at most 30). |
value | string | Option for select: its value attribute or its visible label. |
surfsky_wait Wait for the page
Wait until the active tab meets a condition, then return its url and title. Use it for content that loads after an action or after a domcontentloaded navigation; actions settle on their own, so do not wait after every step. Several conditions are waited one after another, each with the full timeout; one not met in time fails with a timeout error and leaves the page as it is. For a condition only script can check, use surfsky_evaluate with an async function that polls.
| Parameter | Type | Description |
|---|---|---|
gone | boolean | With selector: wait until it is absent or has no layout box. |
seconds | number | Fixed sleep in seconds, after the other conditions. |
selector | string | Element to wait for: a CSS selector (also for elements that do not exist yet), or @N or text=words, which must resolve now. |
session_id | string | Session from surfsky_session_start; omit for the current one. |
text | string | String the page's visible text must contain. |
timeout | number | Seconds allowed per condition (default 30). |
url_contains | string | Substring the page URL must contain. |
surfsky_tab Manage tabs
Manage the tabs of a session: list (index, id, url, title, active), new (opens a tab and makes it active), switch, close. Use list then switch when a click opened a popup or a target=_blank link: the new page is another tab. Refs belong to a tab: take surfsky_snapshot after switching. The session's first tab cannot be closed; navigate it instead. The cloud allows five tabs per session.
| Parameter | Type | Description |
|---|---|---|
action * | string | list; new (optionally at url); switch (tab); close (tab, default the active one). |
session_id | string | Session from surfsky_session_start; omit for the current one. |
tab | string | Tab for switch or close: its index from the last list, or its id (a prefix is enough). |
url | string | For new: URL to open in the new tab. |
surfsky_scrape Scrape a URL
Fetch one URL and return it as markdown (default), cleaned html or links, with the final url, HTTP status and title. Use it whenever you only need to read a page: the Scraping API serves it from a pre-started browser behind a residential proxy and passes challenge pages and captchas, with no session to stop. profile_uuid, proxy, country, region, city or os start a throwaway browser for this call instead: slower, so pass them only when needed. For a page that needs clicks, a form or an interactive login, use surfsky_navigate and surfsky_act. A 200 with a short page may be a challenge page: read…
| Parameter | Type | Description |
|---|---|---|
url * | string | URL to fetch; https:// is added when missing. |
block_resources | array | Resource types not downloaded: faster and less proxy traffic, but screenshots and layout lose them. |
city | string | Proxy exit city, with country. |
country | string | Proxy exit country code, for example US. |
formats | array | Any of markdown, html, links, screenshot. Default: markdown; add screenshot only when the user asks for an image (viewport JPEG). |
max_chars | integer | Cut each text after this many characters (default 10000, at most 200000). |
only_main_content | boolean | Keep the main or article content; drop navigation, headers, footers, asides and forms. |
os | string | Fingerprint operating system. Not with profile_uuid. |
profile_uuid | string | Saved profile to load: its cookies and logins come with it and are saved back on a normal stop. Only a uuid the user gave you. Not with os, os_version or arch. |
proxy | string | Omit for the account default. 'premium': residential pool; 'mobile': mobile pool; 'shared': free pool, tests only; or your own proxy URL (user:pass@host:port), then without country, region and city. |
region | string | Proxy exit state or region, with country. |
timeout | number | Seconds to wait for the navigation (default 30). |
wait_for | string | CSS selector to wait for before reading, for content that appears after load. |
wait_until | string | Load state that ends the navigation: 'load' (default); 'domcontentloaded' (faster on heavy pages; then surfsky_wait for what you need); 'commit' (first response); 'networkidle' (busy pages never reach… |