@browsa/mcp 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,7 +12,7 @@
12
12
  [![npm version](https://img.shields.io/npm/v/@browsa/mcp.svg)](https://www.npmjs.com/package/@browsa/mcp)
13
13
  [![CI](https://github.com/browsa-io/browsa/actions/workflows/ci.yml/badge.svg)](https://github.com/browsa-io/browsa/actions/workflows/ci.yml)
14
14
 
15
- You need a Browsa API key: create one at [app.browsa.io/dashboard/keys](https://app.browsa.io/dashboard/keys) and replace `agt_live_...` below with it. New accounts get 100 free credits after email verification, no card.
15
+ You need a Browsa API key: create one at [app.browsa.io/dashboard/keys](https://app.browsa.io/dashboard/keys) and replace `agt_live_...` below with it. New accounts get $3 of free credits after email verification, no card.
16
16
 
17
17
  ## Install
18
18
 
@@ -199,6 +199,8 @@ flow {op: "run", name: "book-search", params: {query: "travel"}}
199
199
  - The server writes no files. Screenshots and page text come back inline; state (open browsers, a flow being recorded, captcha spend) is kept in memory.
200
200
  - Live links are single use and expire.
201
201
 
202
+ `start_browser` (group `cdp`) takes `captcha: "off"` to keep Browsa from solving captchas in that browser; by default a solved captcha is charged per solve.
203
+
202
204
  ## More tools (optional groups)
203
205
 
204
206
  Everything else from 0.5 is in groups you turn on with `BROWSA_MCP_TOOLS` (comma separated) or the argument `--tools=...`:
package/dist/server.js CHANGED
@@ -682,7 +682,7 @@ var catalogue_snapshot_default = {
682
682
  import { BrowsaError } from "browsa";
683
683
 
684
684
  // src/config.ts
685
- var VERSION = "0.10.0";
685
+ var VERSION = "0.10.1";
686
686
  var USER_AGENT = `browsa-mcp/${VERSION}`;
687
687
  var API_KEY = process.env.BROWSA_API_KEY?.trim() || void 0;
688
688
  var BASE_URL = (process.env.BROWSA_BASE_URL || "https://browsa.io").replace(/\/+$/, "");
@@ -2952,6 +2952,7 @@ var legacyTools = [
2952
2952
  idle_timeout: { type: "string", description: 'Stop after this long with nothing connected, e.g. "10m"; "off" = never.' },
2953
2953
  country: { type: "string", description: 'ISO-2 country, e.g. "us". Takes effect only with a proxy.' },
2954
2954
  os_type: { type: "string", description: 'Operating system the browser presents, e.g. "macos", "windows".' },
2955
+ captcha: { type: "string", enum: ["auto", "off"], description: '"auto" (default): Browsa solves a captcha widget in this browser by itself while you drive it, charged per solve. "off": it never touches the browser.' },
2955
2956
  profile_id: {
2956
2957
  type: "string",
2957
2958
  description: "Reuse a saved identity (see list_identities) so the browser starts with its cookies and logins."
@@ -3241,7 +3242,24 @@ async function proxyNetwork() {
3241
3242
  }
3242
3243
  function proxyUsage(raw) {
3243
3244
  if (!raw || typeof raw.proxy_network !== "string" || !raw.proxy_network) return {};
3244
- return { proxy_network: raw.proxy_network, proxy_bytes: raw.proxy_bytes ?? 0, proxy_credits: raw.proxy_credits ?? 0 };
3245
+ return {
3246
+ proxy_network: raw.proxy_network,
3247
+ proxy_bytes: raw.proxy_bytes ?? 0,
3248
+ proxy_credits: raw.proxy_credits ?? 0,
3249
+ ...typeof raw.proxy_credits_usd === "string" ? { proxy_credits_usd: raw.proxy_credits_usd } : {}
3250
+ };
3251
+ }
3252
+ function settledFields(raw) {
3253
+ if (!raw || typeof raw !== "object") return {};
3254
+ const r = raw.result && typeof raw.result === "object" ? raw.result : {};
3255
+ const captcha = Array.isArray(raw.captcha) ? raw.captcha : Array.isArray(r.captcha) ? r.captcha : void 0;
3256
+ return {
3257
+ ...raw.exit && typeof raw.exit === "object" ? { exit: raw.exit } : {},
3258
+ ...typeof raw.credits_refunded_usd === "string" ? { credits_refunded_usd: raw.credits_refunded_usd } : {},
3259
+ ...typeof raw.net_charged_usd === "string" ? { net_charged_usd: raw.net_charged_usd } : {},
3260
+ ...captcha && captcha.length ? { captcha } : {},
3261
+ ...typeof r.captcha_message === "string" ? { captcha_message: r.captcha_message } : {}
3262
+ };
3245
3263
  }
3246
3264
  async function listModels() {
3247
3265
  const body = await apiGet("/v1/models");
@@ -3489,6 +3507,7 @@ async function callLegacy(name, args) {
3489
3507
  credits_charged: job.creditsCharged,
3490
3508
  ...typeof job.raw?.credits_charged_usd === "string" ? { credits_charged_usd: job.raw.credits_charged_usd } : {},
3491
3509
  ...proxyUsage(job.raw),
3510
+ ...settledFields(job.raw),
3492
3511
  llm_key_masked: job.raw?.llm_key_masked,
3493
3512
  llm_key_source: job.raw?.llm_key_source,
3494
3513
  ...llmResultFields(job),
@@ -3513,7 +3532,8 @@ async function callLegacy(name, args) {
3513
3532
  final_result: job.finalResult,
3514
3533
  error: job.errorMessage,
3515
3534
  error_code: job.errorCode,
3516
- ...proxyUsage(job.raw)
3535
+ ...proxyUsage(job.raw),
3536
+ ...settledFields(job.raw)
3517
3537
  });
3518
3538
  }
3519
3539
  case "cancel_job": {
@@ -3531,7 +3551,8 @@ async function callLegacy(name, args) {
3531
3551
  country: args.country ?? DEFAULT_COUNTRY2,
3532
3552
  osType: args.os_type,
3533
3553
  agent_id: args.profile_id,
3534
- proxy: args.proxy
3554
+ proxy: args.proxy,
3555
+ captcha: args.captcha
3535
3556
  });
3536
3557
  return ok({
3537
3558
  browser_id: a.id,
@@ -3545,6 +3566,7 @@ async function callLegacy(name, args) {
3545
3566
  credits_charged: a.cost_credits,
3546
3567
  ...typeof a.cost_usd === "string" ? { cost_usd: a.cost_usd } : {},
3547
3568
  ...proxyUsage(a),
3569
+ ...settledFields(a),
3548
3570
  egress: args.proxy?.network ? `Browsa ${args.proxy.network} proxy network` : args.proxy ? "your proxy" : "Browsa's data-center IP",
3549
3571
  note: "Call stop_browser with this browser_id when you are done."
3550
3572
  });
package/manifest.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "manifest_version": "0.2",
3
3
  "name": "browsa",
4
4
  "display_name": "Browsa",
5
- "version": "0.10.0",
5
+ "version": "0.10.1",
6
6
  "description": "Cloud browsers for AI agents, and captcha solving for a browser of your own.",
7
7
  "long_description": "Browsa gives a model a real cloud browser (Phantom): it reads the page as compact text, acts with real input, types saved secrets it never sees, hands over to a person when a check needs one, and replays what it did with no model calls. For agents that drive their own browser, the captcha tools find the captcha in a page's HTML locally and return a solution with the step to apply it in that browser.",
8
8
  "author": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browsa/mcp",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "mcpName": "io.browsa/browsa",
5
5
  "description": "MCP server for Browsa: real cloud browsers (Phantom) for Claude, Cursor, VS Code and any MCP client, and captcha solving for a browser of your own",
6
6
  "license": "MIT",