Skip to main content
Server path: /browser-automation | Type: Embedded | PCID required: No AI-powered browser automation using natural language or Playwright code. Navigates, clicks, fills forms, extracts data, and downloads files. For a guided walkthrough, see the Browser Automation guide.

Tools

ToolDescription
operator_runStart a browser task using natural language
operator_run_continuePoll for Browser Operator completion
playwright_runRun Playwright JavaScript code in a cloud browser
playwright_run_continuePoll for Playwright completion
logins_listList saved browser login contexts

operator_run

Start a browser automation task using natural language. Returns immediately with a sessionId — poll with operator_run_continue until complete. Parameters:
ParameterTypeRequiredDefaultDescription
taskstringYesNatural language task description. Write as a single line. Be specific: include starting URL, action, target elements, and sample data.
cacheKeystringYesUnique 8-character alphanumeric string. Generate a new one each time you change the task.
modelstringNogoogle/gemini-3-flash-previewAI model. Options: google/gemini-3-flash-preview, google/gemini-2.5-flash, google/gemini-2.5-pro, openai/gpt-4o, openai/gpt-4o-mini, anthropic/claude-sonnet-4
agentModestringNohybridInteraction mode: dom (CSS selectors), hybrid (visual + DOM), cua (Computer Use Agent)
maxStepsnumberNo30Max actions the agent can take (1–100). Increase for complex multi-page tasks.
systemPromptstringNoRole/context for the agent (e.g. “You are filling out insurance forms”)
regionstringNous-west-2Server region: us-west-2, us-east-1, eu-central-1, ap-southeast-1
proxiesbooleanNofalseEnable residential proxies for sites that block datacenter IPs
advancedStealthbooleanNofalseAdvanced anti-detection measures
blockAdsbooleanNotrueBlock advertisements
solveCaptchasbooleanNotrueAutomatically solve CAPTCHAs
recordSessionbooleanNotrueEnable session recording for replay
viewportWidthnumberNo1288Browser viewport width in pixels
viewportHeightnumberNo711Browser viewport height in pixels
disableCachebooleanNofalseBypass caching and force fresh execution
cacheDurationDaysnumberNo7Cache expiration in days (1–30)
filesToUploadobject[]NoFiles for upload: [{ url: "https://...", fileName: "doc.pdf" }]
collectionIdstringNoFilestorage collection ID for output files
useContextServicestringNoSaved login context ID (from logins_list)
Response fields:
FieldTypeDescription
statusstring"RUNNING"
sessionIdstringSession ID for polling
collectionIdstringCollection ID for log/file access
buildIdstringBuild identifier
logFileNamestringLog file name for streaming
Example:
curl -s -X POST "https://mcp.app.pinkfish.ai/browser-automation" \
  -H "Authorization: Bearer $PINKFISH_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "browser-automation_operator_run",
      "arguments": {
        "task": "Navigate to https://news.ycombinator.com, extract the top 10 story titles with URLs, save as stories.json",
        "cacheKey": "hn8x2k4m",
        "model": "google/gemini-3-flash-preview",
        "agentMode": "hybrid",
        "maxSteps": 30,
        "blockAds": true,
        "solveCaptchas": true,
        "recordSession": true
      }
    },
    "id": 1
  }'
Response:
{
  "structuredContent": {
    "status": "RUNNING",
    "sessionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "collectionId": "coll_xyz789",
    "buildId": "agent-1234567890",
    "logFileName": "agent-1234567890.log"
  }
}

operator_run_continue

Poll for completion of a running Browser Operator task. Call every 3–5 seconds until status is "completed" or "failed". Parameters:
ParameterTypeRequiredDescription
sessionIdstringYesSession ID from operator_run
logFileNamestringNoLog file name from operator_run. Enables live log streaming.
collectionIdstringNoCollection ID from operator_run. Required with logFileName for log content.
Response fields (completed):
FieldTypeDescription
statusstring"completed", "failed", or "RUNNING"
sessionIdstringSession ID
resultstringTask completion summary
filesobject[]Output files. Each has fileName, size, url, mimeType, source.
logContentstringSession log (if logFileName was provided)
Example:
curl -s -X POST "https://mcp.app.pinkfish.ai/browser-automation" \
  -H "Authorization: Bearer $PINKFISH_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "browser-automation_operator_run_continue",
      "arguments": {
        "sessionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "collectionId": "coll_xyz789",
        "logFileName": "agent-1234567890.log"
      }
    },
    "id": 1
  }'
Response (completed):
{
  "structuredContent": {
    "status": "completed",
    "sessionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "result": "Successfully extracted top 10 stories from Hacker News",
    "files": [
      {
        "fileName": "stories.json",
        "mimeType": "application/json",
        "size": 2456,
        "url": "https://s3-signed-url/stories.json",
        "source": "extract"
      }
    ],
    "logContent": "Step 1: Navigating to https://news.ycombinator.com...\n..."
  }
}

playwright_run

Run Playwright JavaScript code in a remote cloud browser. A page variable is pre-configured — you don’t need to launch a browser. Returns immediately — poll with playwright_run_continue. Parameters:
ParameterTypeRequiredDescription
codestringYesPlaywright JavaScript code. page is pre-configured. Return { writeToCollection: true, fileName: "data.json", fileContent: "..." } to save files.
bindingDataobjectNoKey-value pairs injected into the code as variables. Must be an object, not a string.
buildIdstringNoFor predictable file naming. Files become {buildId}-filename.json.
collectionIdstringNoFilestorage collection ID for output files
useContextServicestringNoSaved login context ID (from logins_list)
Response fields:
FieldTypeDescription
statusstring"RUNNING"
sessionIdstringSession ID for polling
buildIdstringBuild identifier
collectionIdstringCollection ID
logFileNamestringLog file name
Example:
curl -s -X POST "https://mcp.app.pinkfish.ai/browser-automation" \
  -H "Authorization: Bearer $PINKFISH_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "browser-automation_playwright_run",
      "arguments": {
        "code": "await page.goto(\"https://news.ycombinator.com\");\nconst stories = await page.$$eval(\".titleline > a\", links => links.slice(0, 10).map((a, i) => ({ rank: i + 1, title: a.textContent, url: a.href })));\nreturn { writeToCollection: true, fileName: \"stories.json\", fileContent: JSON.stringify(stories, null, 2) };",
        "buildId": "hn-scrape-001"
      }
    },
    "id": 1
  }'

playwright_run_continue

Poll for completion of a running Playwright task. Call every 3–5 seconds until status is "completed" or "failed". Parameters:
ParameterTypeRequiredDescription
sessionIdstringYesSession ID from playwright_run
Response fields: Same structure as operator_run_continue, plus browserOutput (raw Playwright return value) and logs (Playwright console output). Example:
curl -s -X POST "https://mcp.app.pinkfish.ai/browser-automation" \
  -H "Authorization: Bearer $PINKFISH_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "browser-automation_playwright_run_continue",
      "arguments": { "sessionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }
    },
    "id": 1
  }'

logins_list

List saved browser login contexts. These are pre-authenticated sessions that can be reused with the useContextService parameter. Parameters: None Response fields:
FieldTypeDescription
countnumberNumber of saved contexts
contextsobject[]Array of login contexts
contexts[].idstringContext ID (use as useContextService)
contexts[].labelstringDisplay label
contexts[].servicestringService name (e.g. linkedin)
contexts[].loginUrlstringLogin URL
contexts[].statusstringContext status
contexts[].createdAtstringCreation timestamp
Example:
curl -s -X POST "https://mcp.app.pinkfish.ai/browser-automation" \
  -H "Authorization: Bearer $PINKFISH_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "browser-automation_logins_list",
      "arguments": {}
    },
    "id": 1
  }'
Response:
{
  "structuredContent": {
    "count": 1,
    "contexts": [
      {
        "id": "ctx_abc123",
        "label": "My LinkedIn",
        "service": "linkedin",
        "loginUrl": "https://www.linkedin.com/login",
        "status": "active",
        "createdAt": "2026-01-15T10:30:00Z"
      }
    ]
  }
}