@browsa/mcp 0.11.0 → 0.13.0

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
@@ -214,7 +214,7 @@ Everything else from 0.5 is in groups you turn on with `BROWSA_MCP_TOOLS` (comma
214
214
  | `cdp` | `start_browser`, `stop_browser` (a CDP address, to drive the browser from your own code) |
215
215
  | `captcha_page` | `detect_captcha`, `solve_captcha_on_page`, `captcha_allowance`: captcha solving for a browser of your own, [below](#captchas-in-your-own-browser) |
216
216
  | `captcha` | `solve_captcha_task` (Browsa's captcha API, for pages outside a Browsa browser; the answer says what the solve cost), `list_captcha_types` (every type with its parameters, price and measured pass rate), `report_captcha_result` (tell Browsa whether the site took a solution; an incorrect report refunds that solve once, within limits: within 15 minutes of the solve, and a capped share of the workspace's solves of the last 24 hours. The answer's `refunded` says whether it did) |
217
- | `profiles` | `list_profiles`, `create_profile`, `open_profile`, `close_profile`, `update_profile`, `delete_profile`, `profile_runs`: [saved profiles](#saved-profiles) |
217
+ | `profiles` | `list_profiles`, `create_profile`, `open_profile`, `close_profile`, `update_profile`, `delete_profile`, `profile_runs`, `clone_profile`, `bulk_profiles`, `profile_cookies`, `import_profile_cookies`, `list_extensions`, `add_extension`: [saved profiles](#saved-profiles) |
218
218
  | `admin` | `credits`, `list_browsers`, `list_identities`, `proxy_network`, `list_llm_keys`, `list_models` |
219
219
  | `all` | every group |
220
220
 
@@ -226,19 +226,25 @@ A tool name works too (`BROWSA_MCP_TOOLS=run_task,credits`). A leading `-` takes
226
226
 
227
227
  ### Saved profiles
228
228
 
229
- A saved profile is a browser that keeps its cookies, logins and fingerprint between sessions: log in once, and every later browser on it starts logged in. The seven tools are in the `profiles` group, so they are not in the default ten (`BROWSA_MCP_TOOLS=profiles`).
229
+ A saved profile is a browser that keeps its cookies, logins and fingerprint between sessions: log in once, and every later browser on it starts logged in. The thirteen tools are in the `profiles` group, so they are not in the default ten (`BROWSA_MCP_TOOLS=profiles`).
230
230
 
231
231
  | Tool | Does |
232
232
  |---|---|
233
- | `list_profiles` | Saved profiles: `profile_id`, `name`, `notes`, `status`, `open_session` |
234
- | `create_profile` | Create one (`name`, `notes`, `country`, `os_type`, `captcha`, `proxy`) and open its first browser; charged on creation and every 30 days |
235
- | `open_profile` | Open a browser on it (`start_url`, `ttl`, `idle_timeout`, `country`); returns `cdp_http`, `cdp_url`, `live_url` |
233
+ | `list_profiles` | Saved profiles: `profile_id`, `name`, `notes`, `tags`, `favorite`, `exit_setting`, `status`, `open_session`. Filters: `tag`, `favorite`, `include_deleted`, `limit` |
234
+ | `create_profile` | Create one (`name`, `notes`, `tags`, `favorite`, `country`, `os_type`, `captcha`, `proxy`, `timezone`, `languages`, `startup`, `extensions`) and open its first browser; charged on creation and every 30 days |
235
+ | `open_profile` | Open a browser on it (`start_url`, `ttl`, `idle_timeout`, `country`, `restart`); returns `cdp_http`, `cdp_url`, `live_url`. A browser on a saved profile is $0.10 an hour, billed per minute; unused time is refunded when it closes. If one is already open, that browser is returned and nothing is charged (`restart: true` opens a new one) |
236
236
  | `close_profile` | Stop its open browser and save the cookies; the profile stays |
237
- | `update_profile` | Set `name`, `notes` or both; `""` clears |
237
+ | `update_profile` | Set `name`, `notes`, `tags` (replaces the list), `favorite`, `location` (`{network, country}`, `{proxy_id}`, `{none: true}` or `{country}`) or settings: `start_page`, `screen_resolution`, `webrtc_mode`, `geolocation_mode`, `geolocation_data`, `media_devices_mode`, `port_scan_protection`, `captcha`, `timezone`, `languages`, `startup`, `extensions`. Location and settings need no open browser and apply from the next open; the operating system can't be changed; `""` clears name and notes |
238
+ | `clone_profile` | A new profile with the settings of another (`name`, `tags`; `proxy` or `proxy_id` only when the source's exit cannot be copied); new fingerprint, empty, charged like `create_profile` |
239
+ | `bulk_profiles` | `ids` (1 to 50) and `action`: `close`, `delete`, `tag`, `untag` (with `tags`), `favorite`, `unfavorite`; one result per id |
240
+ | `profile_cookies` | The cookies of its open browser (`domain` filters); needs an open browser |
241
+ | `import_profile_cookies` | Set cookies in its open browser from `cookies` (a list) or `netscape` (cookies.txt text); skipped ones are listed with a reason |
242
+ | `list_extensions` | The workspace's extension library |
243
+ | `add_extension` | Add one from a Chrome Web Store address (`store_url`); attach it with `update_profile` (`extensions`, up to 5). Sites that look for extensions can see it |
238
244
  | `delete_profile` | Delete it for good, with its cookies |
239
245
  | `profile_runs` | Its browser sessions, newest first, with `cost_usd` |
240
246
 
241
- `list_identities` (admin group) is the older name for `list_profiles` and keeps working. Pass a profile's id to `run_task` or `start_browser` as `profile_id` to run on it.
247
+ Errors keep the API's `code`: `SESSION_OPEN` (close the browser first), `EXIT_CHANGING` (retry in a few seconds), `PROXY_NOT_COPYABLE`, `NOT_A_SAVED_PROFILE`, `NO_OPEN_SESSION`, `SETTING_FIXED`, `EXTENSION_NOT_FOUND`, `EXTENSION_LIMIT`. A timezone or language that does not match the exit country can look unusual to a site; leave them on automatic unless you need them. `list_identities` (admin group) is the older name for `list_profiles` and keeps working. Pass a profile's id to `run_task` or `start_browser` as `profile_id` to run on it.
242
248
 
243
249
  ### What the tool list costs
244
250
 
@@ -254,9 +260,9 @@ The tool definitions a client loads before the first message, per setting. Token
254
260
  | `schedules` | `schedules,-core` | 2 | 505 |
255
261
  | `webhooks` | `webhooks,-core` | 3 | 281 |
256
262
  | `cdp` | `cdp,-core` | 2 | 795 |
257
- | `profiles` | `profiles,-core` | 7 | 1,272 |
263
+ | `profiles` | `profiles,-core` | 13 | 3,546 |
258
264
  | `admin` | `admin,-core` | 6 | 640 |
259
- | everything | `all` | 44 | 8,852 |
265
+ | everything | `all` | 50 | 11,126 |
260
266
 
261
267
  A group adds its row to the default's 1,903. Prompts are fetched only when picked and add nothing. The annotations are about 200 of the default's tokens (0.8.0 listed the same nine tools in 1,244).
262
268
 
@@ -265,8 +271,8 @@ A group adds its row to the default's 1,903. Prompts are fetched only when picke
265
271
  | Hint | Tools |
266
272
  |---|---|
267
273
  | Read-only (`readOnlyHint: true`): changes nothing, spends nothing | `observe`, `read`, `screenshot`, `secrets`, `get_job`, `list_job_files`, `list_robots`, `get_robot_run`, `list_schedules`, `list_webhooks`, `list_captcha_types`, `detect_captcha`, `captcha_allowance`, `credits`, `list_browsers`, `list_identities`, `list_profiles`, `profile_runs`, `proxy_network`, `list_llm_keys`, `list_models` |
268
- | Can change something for good (`destructiveHint: true`) | `act`, `flow`, `run_task`, `run_robot` (the page decides what a click does), `close`, `stop_browser`, `close_profile`, `delete_profile`, `cancel_job`, `delete_webhook` |
269
- | Writes, not destructive | `open`, `handoff`, `respond_to_job`, `create_schedule`, `create_webhook`, `start_browser`, `create_profile`, `open_profile`, `update_profile`, `solve_captcha_task`, `solve_captcha_on_page`, `report_captcha_result` |
274
+ | Can change something for good (`destructiveHint: true`) | `act`, `flow`, `run_task`, `run_robot` (the page decides what a click does), `close`, `stop_browser`, `close_profile`, `delete_profile`, `bulk_profiles`, `cancel_job`, `delete_webhook` |
275
+ | Writes, not destructive | `open`, `handoff`, `respond_to_job`, `create_schedule`, `create_webhook`, `start_browser`, `create_profile`, `open_profile`, `update_profile`, `clone_profile`, `solve_captcha_task`, `solve_captcha_on_page`, `report_captcha_result` |
270
276
 
271
277
  `detect_captcha` and `captcha_allowance` also say `openWorldHint: false`: they run inside the server process and make no request.
272
278
 
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.11.0";
685
+ var VERSION = "0.13.0";
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(/\/+$/, "");
@@ -740,7 +740,7 @@ var GROUPS = {
740
740
  cdp: ["start_browser", "stop_browser"],
741
741
  captcha: ["solve_captcha_task", "list_captcha_types", "report_captcha_result"],
742
742
  captcha_page: ["detect_captcha", "solve_captcha_on_page", "captcha_allowance"],
743
- profiles: ["list_profiles", "create_profile", "open_profile", "close_profile", "update_profile", "delete_profile", "profile_runs"],
743
+ profiles: ["list_profiles", "create_profile", "open_profile", "close_profile", "update_profile", "delete_profile", "profile_runs", "clone_profile", "bulk_profiles", "profile_cookies", "import_profile_cookies", "list_extensions", "add_extension"],
744
744
  admin: ["credits", "list_browsers", "list_identities", "proxy_network", "list_llm_keys", "list_models"]
745
745
  };
746
746
  var CORE_TOOLS = ["open", "observe", "act", "read", "screenshot", "secrets", "handoff", "flow", "close", "fetch_page"];
@@ -1826,9 +1826,15 @@ var ANNOTATIONS = {
1826
1826
  create_profile: write("Create a saved profile"),
1827
1827
  open_profile: write("Open a saved profile"),
1828
1828
  close_profile: destructive("Close a profile's browser", { idempotentHint: true }),
1829
- update_profile: write("Rename a saved profile", { idempotentHint: true }),
1829
+ update_profile: write("Change a saved profile", { idempotentHint: true }),
1830
+ clone_profile: write("Clone a saved profile"),
1831
+ bulk_profiles: destructive("Act on several profiles"),
1830
1832
  delete_profile: destructive("Delete a saved profile", { idempotentHint: true }),
1831
1833
  profile_runs: read("A profile's sessions"),
1834
+ profile_cookies: read("Read a profile's cookies"),
1835
+ import_profile_cookies: write("Set cookies in a profile"),
1836
+ list_extensions: read("List extensions"),
1837
+ add_extension: write("Add an extension"),
1832
1838
  proxy_network: read("Proxy network"),
1833
1839
  list_llm_keys: read("List saved LLM keys"),
1834
1840
  list_models: read("List models")
@@ -3710,17 +3716,62 @@ var PROFILE_TOOLS = [
3710
3716
  "close_profile",
3711
3717
  "update_profile",
3712
3718
  "delete_profile",
3713
- "profile_runs"
3719
+ "profile_runs",
3720
+ "clone_profile",
3721
+ "bulk_profiles",
3722
+ "profile_cookies",
3723
+ "import_profile_cookies",
3724
+ "list_extensions",
3725
+ "add_extension"
3714
3726
  ];
3727
+ var TIMEZONE = {
3728
+ type: "string",
3729
+ description: 'An IANA timezone such as "Europe/Berlin", or "auto" (default) to follow the exit country. One that does not match the exit country can look unusual to a site.'
3730
+ };
3731
+ var LANGUAGES = {
3732
+ type: "array",
3733
+ items: { type: "string" },
3734
+ maxItems: 6,
3735
+ description: '1 to 6 language tags, most preferred first, e.g. ["de-DE", "de", "en"]. [] (default) follows the exit country; a mismatch can look unusual to a site.'
3736
+ };
3737
+ var STARTUP = {
3738
+ type: "string",
3739
+ enum: ["start_page", "restore"],
3740
+ description: '"start_page" (default) or "restore": reopen the tabs of the last session (up to 10).'
3741
+ };
3742
+ var EXTENSIONS = {
3743
+ type: "array",
3744
+ items: { type: "string" },
3745
+ maxItems: 5,
3746
+ description: "Extension ids from list_extensions, loaded at the next open. Replaces the list; [] removes them all. Sites that look for extensions can see them."
3747
+ };
3748
+ var TAGS = {
3749
+ type: "array",
3750
+ items: { type: "string" },
3751
+ maxItems: 10,
3752
+ description: "Tags: at most 10, each 1 to 24 characters, no commas."
3753
+ };
3754
+ var LOCATION = {
3755
+ type: "object",
3756
+ description: `Where the profile's next browser leaves from. One of: {"network": "datacenter" or "residential", "country": "de"} (Browsa's proxy network), {"proxy_id": "px_..."} (a saved proxy), {"none": true} (no proxy), or {"country": "de"} alone (a new country on the proxy network). Only while no browser is open on the profile (409 SESSION_OPEN otherwise: close_profile first); it applies from the next open_profile.`,
3757
+ properties: {
3758
+ network: { type: "string", enum: ["datacenter", "residential"] },
3759
+ country: { type: "string", description: 'ISO-2, e.g. "de".' },
3760
+ proxy_id: { type: "string" },
3761
+ none: { type: "boolean", description: "true: no proxy." }
3762
+ }
3763
+ };
3715
3764
  var profileTools = [
3716
3765
  {
3717
3766
  name: "list_profiles",
3718
- description: "List saved profiles: browsers that keep cookies, logins and a fingerprint between sessions. Each row has id, name, notes, status and open_session (null when no browser is open on it). Pass the id to open_profile, or to run_task as profile_id. Free.",
3767
+ description: "List saved profiles: browsers that keep cookies, logins and a fingerprint between sessions. Each row has id, name, notes, tags, favorite, exit_setting, status and open_session (null when no browser is open on it). Pass the id to open_profile, or to run_task as profile_id. Free.",
3719
3768
  inputSchema: {
3720
3769
  type: "object",
3721
3770
  properties: {
3722
3771
  include_deleted: { type: "boolean", description: "Also list deleted profiles. Default false." },
3723
- limit: { type: "integer", description: "1 to 200. Default 50." }
3772
+ limit: { type: "integer", description: "1 to 200. Default 50." },
3773
+ tag: { type: "string", description: "Only profiles carrying this tag." },
3774
+ favorite: { type: "boolean", description: "true: only favorites; false: only the others." }
3724
3775
  }
3725
3776
  }
3726
3777
  },
@@ -3732,9 +3783,15 @@ var profileTools = [
3732
3783
  properties: {
3733
3784
  name: { type: "string", description: "A name for the profile, up to 80 characters." },
3734
3785
  notes: { type: "string", description: "Free text about it, up to 1500 characters." },
3786
+ tags: TAGS,
3787
+ favorite: { type: "boolean", description: "Star the profile." },
3735
3788
  country: { type: "string", description: 'ISO-2 country, e.g. "us". Takes effect only with a proxy.' },
3736
3789
  os_type: { type: "string", description: 'Operating system the browser presents, e.g. "linux", "macos", "windows".' },
3737
3790
  captcha: { type: "string", enum: ["auto", "off"], description: '"auto" (default): Browsa solves captcha widgets in this browser by itself, charged per solve. "off": it never touches the browser.' },
3791
+ timezone: TIMEZONE,
3792
+ languages: LANGUAGES,
3793
+ startup: STARTUP,
3794
+ extensions: EXTENSIONS,
3738
3795
  proxy: {
3739
3796
  type: "object",
3740
3797
  description: `Your own proxy (host and port, or server) or a tier of Browsa's built-in network: {"network": "datacenter"} or {"network": "residential", "country": "us"}. The profile keeps it for every later session.`
@@ -3744,7 +3801,7 @@ var profileTools = [
3744
3801
  },
3745
3802
  {
3746
3803
  name: "open_profile",
3747
- description: "Open a new browser on a saved profile, with its cookies and logins. Billed per started hour. Returns the browser's cdp_http, cdp_url and live_url. Call close_profile when you are done.",
3804
+ description: "Open a browser on a saved profile, with its cookies and logins. Billed per minute; unused time is refunded when it closes. If a browser is already open on the profile, that browser is returned as it is and nothing is charged (restart: true closes it and opens a new one). Returns the browser's cdp_http (the address to connect a CDP client to), cdp_url and live_url. If the profile's location is being changed, it answers EXIT_CHANGING: retry in a few seconds. Call close_profile when you are done.",
3748
3805
  inputSchema: {
3749
3806
  type: "object",
3750
3807
  required: ["profile_id"],
@@ -3753,7 +3810,8 @@ var profileTools = [
3753
3810
  start_url: { type: "string", description: "The page the browser opens on." },
3754
3811
  ttl: { type: "string", description: 'How long to keep it, e.g. "30m", "8h" (up to 24h). Default 1h.' },
3755
3812
  idle_timeout: { type: "string", description: 'Stop after this long with nothing connected, e.g. "10m"; "off" = never.' },
3756
- country: { type: "string", description: 'ISO-2 country, e.g. "us".' }
3813
+ country: { type: "string", description: 'ISO-2 country, e.g. "us".' },
3814
+ restart: { type: "boolean", description: "Close the browser already open on the profile and open a new one (charged). Default false." }
3757
3815
  }
3758
3816
  }
3759
3817
  },
@@ -3764,14 +3822,29 @@ var profileTools = [
3764
3822
  },
3765
3823
  {
3766
3824
  name: "update_profile",
3767
- description: "Rename a saved profile or change its notes. Send name, notes or both: a field you leave out stays as it is, and an empty string clears it. Free.",
3825
+ description: "Change a saved profile: name, notes, tags (replaces the whole list; [] clears it), favorite, location (where its next browser leaves from), or its settings: start_page, screen, webrtc, geolocation, media devices, port scan protection, captcha, timezone, languages, startup, extensions. A field you leave out stays as it is, and an empty string clears name or notes. Location and settings need no open browser (409 SESSION_OPEN otherwise) and apply from the next open_profile. The operating system can't be changed (SETTING_FIXED). Free.",
3768
3826
  inputSchema: {
3769
3827
  type: "object",
3770
3828
  required: ["profile_id"],
3771
3829
  properties: {
3772
3830
  profile_id: ID,
3773
3831
  name: { type: "string", description: "New name, up to 80 characters." },
3774
- notes: { type: "string", description: "New notes, up to 1500 characters." }
3832
+ notes: { type: "string", description: "New notes, up to 1500 characters." },
3833
+ tags: TAGS,
3834
+ favorite: { type: "boolean", description: "Star or unstar the profile." },
3835
+ location: LOCATION,
3836
+ start_page: { type: "string", description: 'The page a new browser opens on; "" clears it.' },
3837
+ screen_resolution: { type: "string", description: '"1366x768", "mobile-iphone" or "mobile-android-pixel"; "" for the default.' },
3838
+ webrtc_mode: { type: "string", enum: ["masked", "real", "disabled", ""] },
3839
+ geolocation_mode: { type: "string", enum: ["prompt", "allow", "block", ""] },
3840
+ geolocation_data: { type: "string", description: '"lat,lng", e.g. "52.52,13.40"; "" for the default.' },
3841
+ media_devices_mode: { type: "string", enum: ["masked", "real", ""] },
3842
+ port_scan_protection: { type: "string", enum: ["masked", "real", ""] },
3843
+ captcha: { type: "string", enum: ["auto", "off"] },
3844
+ timezone: TIMEZONE,
3845
+ languages: LANGUAGES,
3846
+ startup: STARTUP,
3847
+ extensions: EXTENSIONS
3775
3848
  }
3776
3849
  }
3777
3850
  },
@@ -3788,6 +3861,70 @@ var profileTools = [
3788
3861
  required: ["profile_id"],
3789
3862
  properties: { profile_id: ID, limit: { type: "integer", description: "1 to 200. Default 50." } }
3790
3863
  }
3864
+ },
3865
+ {
3866
+ name: "clone_profile",
3867
+ description: "Make a new saved profile with the settings of another (OS, browser, screen, country, proxy network and country, and its tags unless you send tags). It gets a new fingerprint and starts empty: no cookies, logins or notes. It opens its first browser and is charged like create_profile. A source on your own inline proxy cannot be copied (PROXY_NOT_COPYABLE): send proxy or proxy_id. Call close_profile when you are done with the browser.",
3868
+ inputSchema: {
3869
+ type: "object",
3870
+ required: ["profile_id"],
3871
+ properties: {
3872
+ profile_id: ID,
3873
+ name: { type: "string", description: `Name of the copy, up to 80 characters. Default: the source's name plus " (copy)".` },
3874
+ tags: TAGS,
3875
+ proxy: { type: "object", nullable: true, description: "Only for a source whose exit cannot be copied: the copy's proxy, as on create_profile; null for none." },
3876
+ proxy_id: { type: "string", description: "Only for a source whose exit cannot be copied: a saved proxy." }
3877
+ }
3878
+ }
3879
+ },
3880
+ {
3881
+ name: "bulk_profiles",
3882
+ description: "One action on 1 to 50 saved profiles: close (their open browsers), delete (for good), tag or untag (need tags), favorite or unfavorite. Each id is handled on its own; the answer has one result per id (ok, or an error code such as NOT_FOUND). There is no bulk open.",
3883
+ inputSchema: {
3884
+ type: "object",
3885
+ required: ["ids", "action"],
3886
+ properties: {
3887
+ ids: { type: "array", items: { type: "string" }, minItems: 1, maxItems: 50, description: "Profile ids." },
3888
+ action: { type: "string", enum: ["close", "delete", "tag", "untag", "favorite", "unfavorite"] },
3889
+ tags: TAGS
3890
+ }
3891
+ }
3892
+ },
3893
+ {
3894
+ name: "profile_cookies",
3895
+ description: "Read the cookies of the browser open on a saved profile (name, value, domain, path, expires, http_only, secure, same_site). Needs an open browser (NO_OPEN_SESSION: open_profile first). The values are secrets: do not repeat them. Free.",
3896
+ inputSchema: {
3897
+ type: "object",
3898
+ required: ["profile_id"],
3899
+ properties: { profile_id: ID, domain: { type: "string", description: 'Only this domain and its subdomains, e.g. "example.com".' } }
3900
+ }
3901
+ },
3902
+ {
3903
+ name: "import_profile_cookies",
3904
+ description: "Set cookies in the browser open on a saved profile. Send cookies (a list: this API's shape or a browser cookie export) or netscape (the text of a cookies.txt file). At most 5000 cookies and 4 MB. Unusable cookies are skipped and listed with a reason; the rest are set. They are saved with the profile when its browser closes. Needs an open browser (NO_OPEN_SESSION). Free.",
3905
+ inputSchema: {
3906
+ type: "object",
3907
+ required: ["profile_id"],
3908
+ properties: {
3909
+ profile_id: ID,
3910
+ cookies: { type: "array", items: { type: "object" }, maxItems: 5e3, description: "Cookies to set." },
3911
+ netscape: { type: "string", description: "The content of a cookies.txt file. Use this or cookies." }
3912
+ }
3913
+ }
3914
+ },
3915
+ {
3916
+ name: "list_extensions",
3917
+ description: "List the workspace's extension library (id, name, version): Chrome extensions a saved profile can load. Attach them with update_profile (extensions). Free.",
3918
+ inputSchema: { type: "object", properties: {} }
3919
+ },
3920
+ {
3921
+ name: "add_extension",
3922
+ description: "Add a Chrome extension to the workspace library from a Chrome Web Store address. At most 20. Attach it to a profile with update_profile (extensions); it loads at the next open_profile. Sites that look for extensions can see it, and it may open its own welcome tab when the browser starts. Free.",
3923
+ inputSchema: {
3924
+ type: "object",
3925
+ required: ["store_url"],
3926
+ properties: { store_url: { type: "string", description: "The extension's Chrome Web Store address (.../detail/<name>/<id>)." } }
3927
+ }
3791
3928
  }
3792
3929
  ];
3793
3930
  function ok2(payload) {
@@ -3802,6 +3939,14 @@ function profileView(a) {
3802
3939
  profile_id: a.id,
3803
3940
  name: a.name ?? a.persona ?? "",
3804
3941
  notes: a.notes ?? "",
3942
+ ...a.tags != null ? { tags: a.tags } : {},
3943
+ ...a.favorite != null ? { favorite: a.favorite } : {},
3944
+ ...a.exit_setting != null ? { exit_setting: a.exit_setting } : {},
3945
+ ...a.timezone != null ? { timezone: a.timezone } : {},
3946
+ ...a.languages != null ? { languages: a.languages } : {},
3947
+ ...a.startup != null ? { startup: a.startup } : {},
3948
+ ...a.extensions != null ? { extensions: a.extensions } : {},
3949
+ ...a.last_tabs != null ? { last_tabs: a.last_tabs } : {},
3805
3950
  status: a.status,
3806
3951
  open_session: a.open_session ?? null,
3807
3952
  created_at: a.created_at
@@ -3821,25 +3966,28 @@ function browserView(a) {
3821
3966
  }
3822
3967
  async function callProfiles(name, args) {
3823
3968
  try {
3824
- if (name !== "list_profiles" && name !== "create_profile" && !args.profile_id) return fail2("profile_id is required");
3969
+ if (!["list_profiles", "create_profile", "bulk_profiles", "list_extensions", "add_extension"].includes(name) && !args.profile_id) return fail2("profile_id is required");
3825
3970
  switch (name) {
3826
3971
  case "list_profiles": {
3827
3972
  const q = new URLSearchParams();
3828
3973
  if (Number(args.limit) > 0) q.set("limit", String(Math.floor(Number(args.limit))));
3829
3974
  if (args.include_deleted === true) q.set("include_deleted", "true");
3975
+ if (typeof args.tag === "string" && args.tag) q.set("tag", args.tag);
3976
+ if (typeof args.favorite === "boolean") q.set("favorite", String(args.favorite));
3830
3977
  const s = q.toString();
3831
3978
  const body = await apiGet(`/v1/profiles${s ? `?${s}` : ""}`);
3832
3979
  return ok2({ profiles: (body?.agents ?? []).map(profileView) });
3833
3980
  }
3834
3981
  case "create_profile": {
3835
3982
  const body = {};
3836
- for (const k of ["name", "notes", "country", "os_type", "captcha", "proxy"]) if (args[k] != null) body[k] = args[k];
3983
+ for (const k of ["name", "notes", "tags", "favorite", "country", "os_type", "captcha", "proxy", "timezone", "languages", "startup", "extensions"]) if (args[k] != null) body[k] = args[k];
3837
3984
  return ok2(browserView(await apiPost("/v1/profiles", body)));
3838
3985
  }
3839
3986
  case "open_profile": {
3840
3987
  const body = {};
3841
3988
  if (args.start_url != null) body.initial_url = args.start_url;
3842
3989
  for (const k of ["ttl", "idle_timeout", "country"]) if (args[k] != null) body[k] = args[k];
3990
+ if (args.restart === true) body.restart = true;
3843
3991
  return ok2(browserView(await apiPost(`/v1/profiles/${seg(args.profile_id)}/sessions`, body)));
3844
3992
  }
3845
3993
  case "close_profile": {
@@ -3854,9 +4002,59 @@ async function callProfiles(name, args) {
3854
4002
  const body = {};
3855
4003
  if (typeof args.name === "string") body.name = args.name;
3856
4004
  if (typeof args.notes === "string") body.notes = args.notes;
3857
- if (!Object.keys(body).length) return fail2("send name, notes or both");
4005
+ if (Array.isArray(args.tags)) body.tags = args.tags;
4006
+ if (typeof args.favorite === "boolean") body.favorite = args.favorite;
4007
+ const loc = args.location;
4008
+ if (loc && typeof loc === "object") {
4009
+ if (loc.none === true) body.proxy = null;
4010
+ else if (typeof loc.proxy_id === "string") body.proxy_id = loc.proxy_id;
4011
+ else if (typeof loc.network === "string") body.proxy = { network: loc.network, ...typeof loc.country === "string" ? { country: loc.country } : {} };
4012
+ else if (typeof loc.country === "string") body.country = loc.country;
4013
+ else return fail2("location needs network, proxy_id, none or country");
4014
+ }
4015
+ if (typeof args.start_page === "string") body.initial_url = args.start_page;
4016
+ for (const k of ["screen_resolution", "webrtc_mode", "geolocation_mode", "geolocation_data", "media_devices_mode", "port_scan_protection", "captcha", "timezone", "startup"]) {
4017
+ if (typeof args[k] === "string") body[k] = args[k];
4018
+ }
4019
+ if (Array.isArray(args.languages)) body.languages = args.languages;
4020
+ if (Array.isArray(args.extensions)) body.extensions = args.extensions;
4021
+ if (!Object.keys(body).length) return fail2("send name, notes, tags, favorite or location, or a setting");
3858
4022
  return ok2(profileView(await apiPatch(`/v1/profiles/${seg(args.profile_id)}`, body)));
3859
4023
  }
4024
+ case "clone_profile": {
4025
+ const body = {};
4026
+ for (const k of ["name", "tags", "proxy", "proxy_id"]) if (args[k] !== void 0) body[k] = args[k];
4027
+ return ok2(browserView(await apiPost(`/v1/profiles/${seg(args.profile_id)}/clone`, body)));
4028
+ }
4029
+ case "bulk_profiles": {
4030
+ if (!Array.isArray(args.ids) || !args.ids.length) return fail2("ids is required (1 to 50 profile ids)");
4031
+ if (!args.action) return fail2("action is required");
4032
+ const body = { ids: args.ids, action: args.action };
4033
+ if (Array.isArray(args.tags)) body.tags = args.tags;
4034
+ const r = await apiPost("/v1/profiles/bulk", body);
4035
+ return ok2({ results: r?.results ?? [] });
4036
+ }
4037
+ case "profile_cookies": {
4038
+ const q = typeof args.domain === "string" && args.domain ? `?domain=${encodeURIComponent(args.domain)}` : "";
4039
+ const r = await apiGet(`/v1/profiles/${seg(args.profile_id)}/cookies${q}`);
4040
+ return ok2({ cookies: r?.cookies ?? [], count: r?.count ?? (r?.cookies ?? []).length });
4041
+ }
4042
+ case "import_profile_cookies": {
4043
+ const hasList = Array.isArray(args.cookies);
4044
+ const hasText = typeof args.netscape === "string" && args.netscape !== "";
4045
+ if (hasList === hasText) return fail2("send cookies (a list) or netscape (cookies.txt text), not both");
4046
+ const body = hasList ? { cookies: args.cookies } : { format: "netscape", text: args.netscape };
4047
+ const r = await apiPost(`/v1/profiles/${seg(args.profile_id)}/cookies`, body);
4048
+ return ok2({ imported: r?.imported ?? 0, skipped: r?.skipped ?? [] });
4049
+ }
4050
+ case "list_extensions": {
4051
+ const r = await apiGet("/v1/extensions");
4052
+ return ok2({ extensions: r?.extensions ?? [] });
4053
+ }
4054
+ case "add_extension": {
4055
+ if (typeof args.store_url !== "string" || !args.store_url) return fail2("store_url is required");
4056
+ return ok2(await apiPost("/v1/extensions", { store_url: args.store_url }));
4057
+ }
3860
4058
  case "delete_profile":
3861
4059
  await apiDelete(`/v1/profiles/${seg(args.profile_id)}`);
3862
4060
  return ok2({ deleted: args.profile_id });
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.11.0",
5
+ "version": "0.13.0",
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.11.0",
3
+ "version": "0.13.0",
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",