@browsa/mcp 0.3.0 → 0.3.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 +5 -2
- package/dist/server.js +14 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ MCP (Model Context Protocol) server for [Browsa](https://browsa.io): turn any LL
|
|
|
16
16
|
Most "AI agent" setups stop at the LLM. We give the LLM a real browser. Through MCP, Claude can now:
|
|
17
17
|
- Navigate, fill forms, click, scroll, scrape
|
|
18
18
|
- Return results as structured JSON
|
|
19
|
-
- Use your own HTTP or SOCKS5 proxy per browser
|
|
19
|
+
- Use your own HTTP or SOCKS5 proxy per browser, or a tier of Browsa's built-in network where it is on (see `proxy_network`)
|
|
20
20
|
- Stay logged in across calls via persistent identities
|
|
21
21
|
|
|
22
22
|
No code from you: just configure Claude Desktop (or Cursor / Cline / Zed) once, and ask in natural language.
|
|
@@ -100,18 +100,21 @@ Hosted tiers need no LLM key and add a flat number of credits per task. Which mo
|
|
|
100
100
|
|
|
101
101
|
`reasoning` is `"low"`, `"medium"` or `"high"`; leave it out for the tier's or the provider's default. Ask in plain language, for example: *"Use browsa-smart with high reasoning to compare the pricing pages of these three sites."*
|
|
102
102
|
|
|
103
|
+
`run_task` and `get_job` results carry `status` and `outcome`. `status: completed` only means the run ended; `outcome: failed` with it means the agent finished but could not do the task, and `outcome_message` and `final_result` say why. `signals` lists what was seen on the way (a bot check, a proxy failure) when there is any.
|
|
104
|
+
|
|
103
105
|
When the job has them, `run_task` and `get_job` results include `usage` (`input_tokens`, `output_tokens`, `cache_read_tokens`, `cache_write_tokens`, `requests`), `llm_tier`, `reasoning` (the level that was applied) and `llm_cost_usd`. `llm_cost_usd` is an estimate from public list prices for runs with your own key; it is `null` when unknown and always `null` for hosted runs, which are paid in credits.
|
|
104
106
|
|
|
105
107
|
## Tools exposed
|
|
106
108
|
|
|
107
109
|
| Tool | What |
|
|
108
110
|
|---|---|
|
|
109
|
-
| `run_task` | Run a browser-driven task. Returns final result
|
|
111
|
+
| `run_task` | Run a browser-driven task. Returns the final result, `outcome` and steps. Optional `llm`, `reasoning`, `llm_key_id`. |
|
|
110
112
|
| `get_job` | Poll a long-running task. Optional server-side `wait_seconds`. |
|
|
111
113
|
| `cancel_job` | Cancel a running task. |
|
|
112
114
|
| `respond_to_job` | Answer an `input_required` prompt (CAPTCHA, decision). |
|
|
113
115
|
| `start_browser` | Start a real cloud browser and get its CDP URL, to drive yourself with Playwright or Puppeteer. |
|
|
114
116
|
| `stop_browser` | Stop a browser from `start_browser` and release it. |
|
|
117
|
+
| `proxy_network` | Whether Browsa's built-in proxy network is on, its tiers, countries and price. Read-only and free. |
|
|
115
118
|
| `observe` | Read the page of a browser from `start_browser` as compact text with element ids. No Playwright needed. |
|
|
116
119
|
| `act` | One action in that browser (click, type, press, select, scroll, navigate, wait and more); returns what changed. |
|
|
117
120
|
| `list_browsers` | List this workspace's browsers and their status. |
|
package/dist/server.js
CHANGED
|
@@ -26,7 +26,7 @@ var client = new Client({
|
|
|
26
26
|
...BASE_URL ? { baseUrl: BASE_URL } : {}
|
|
27
27
|
});
|
|
28
28
|
var server = new Server(
|
|
29
|
-
{ name: "browsa", version: "0.3.
|
|
29
|
+
{ name: "browsa", version: "0.3.1" },
|
|
30
30
|
{ capabilities: { tools: {} } }
|
|
31
31
|
);
|
|
32
32
|
var REASONING_PROP = {
|
|
@@ -37,7 +37,7 @@ var REASONING_PROP = {
|
|
|
37
37
|
var tools = [
|
|
38
38
|
{
|
|
39
39
|
name: "run_task",
|
|
40
|
-
description: "Run a browser-driven AI task on a fresh real Chromium burner. Returns the final result, total steps
|
|
40
|
+
description: "Run a browser-driven AI task on a fresh real Chromium burner. Returns the final result, the outcome and the total steps. `status: completed` only means the run ended: read `outcome`. `outcome: failed` with `status: completed` means the agent finished but could not do the task, and `final_result` says what stopped it. Use this when the user asks for anything web-shaped: scrape, fill, click, extract, login, place an order, search, summarize a page, etc. The browser is a real macOS-Chrome-fingerprinted Chromium with built-in CAPTCHA solving (Turnstile, hCaptcha, reCAPTCHA, ALTCHA, FunCaptcha) and behavioral humanization. Default timeout: 10 minutes.",
|
|
41
41
|
inputSchema: {
|
|
42
42
|
type: "object",
|
|
43
43
|
required: ["task"],
|
|
@@ -377,7 +377,7 @@ function llmKeyError(e, choice) {
|
|
|
377
377
|
async function proxyNetwork() {
|
|
378
378
|
const base = (BASE_URL || "https://browsa.io").replace(/\/+$/, "");
|
|
379
379
|
const resp = await fetch(`${base}/v1/proxy-network`, {
|
|
380
|
-
headers: { "X-API-Key": API_KEY, Accept: "application/json", "User-Agent": "browsa-mcp/0.3.
|
|
380
|
+
headers: { "X-API-Key": API_KEY, Accept: "application/json", "User-Agent": "browsa-mcp/0.3.1" }
|
|
381
381
|
});
|
|
382
382
|
const body = await resp.json().catch(() => ({}));
|
|
383
383
|
if (resp.status === 404) return { enabled: false, tiers: [] };
|
|
@@ -402,7 +402,7 @@ function proxyUsage(raw) {
|
|
|
402
402
|
async function apiGet(path) {
|
|
403
403
|
const base = (BASE_URL || "https://browsa.io").replace(/\/+$/, "");
|
|
404
404
|
const resp = await fetch(`${base}${path}`, {
|
|
405
|
-
headers: { "X-API-Key": API_KEY, Accept: "application/json", "User-Agent": "browsa-mcp/0.3.
|
|
405
|
+
headers: { "X-API-Key": API_KEY, Accept: "application/json", "User-Agent": "browsa-mcp/0.3.1" }
|
|
406
406
|
});
|
|
407
407
|
const body = await resp.json().catch(() => ({}));
|
|
408
408
|
if (!resp.ok) {
|
|
@@ -418,7 +418,7 @@ async function apiPost(path, payload, timeoutMs = 9e4) {
|
|
|
418
418
|
"X-API-Key": API_KEY,
|
|
419
419
|
Accept: "application/json",
|
|
420
420
|
"Content-Type": "application/json",
|
|
421
|
-
"User-Agent": "browsa-mcp/0.3.
|
|
421
|
+
"User-Agent": "browsa-mcp/0.3.1"
|
|
422
422
|
},
|
|
423
423
|
body: JSON.stringify(payload),
|
|
424
424
|
signal: AbortSignal.timeout(timeoutMs)
|
|
@@ -452,6 +452,13 @@ async function listModels() {
|
|
|
452
452
|
const body = await apiGet("/v1/models");
|
|
453
453
|
return { hosted: body?.hosted ?? [], own_key: body?.own_key ?? {} };
|
|
454
454
|
}
|
|
455
|
+
function outcomeFields(job) {
|
|
456
|
+
return {
|
|
457
|
+
outcome: job.outcome,
|
|
458
|
+
outcome_message: job.outcomeMessage,
|
|
459
|
+
...job.signals && job.signals.length ? { signals: job.signals } : {}
|
|
460
|
+
};
|
|
461
|
+
}
|
|
455
462
|
function llmResultFields(job) {
|
|
456
463
|
const r = job.raw?.result;
|
|
457
464
|
if (!r || typeof r !== "object") return {};
|
|
@@ -506,6 +513,7 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
506
513
|
...fellBack ? { note: HOSTED_FALLBACK_TASK_NOTE, llm: "browsa" } : {},
|
|
507
514
|
job_id: job.id,
|
|
508
515
|
status: job.status,
|
|
516
|
+
...outcomeFields(job),
|
|
509
517
|
steps: `${job.stepCount}/${job.progressTotal}`,
|
|
510
518
|
live_url: job.liveUrl,
|
|
511
519
|
credits_charged: job.creditsCharged,
|
|
@@ -523,6 +531,7 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
523
531
|
return ok({
|
|
524
532
|
job_id: job.id,
|
|
525
533
|
status: job.status,
|
|
534
|
+
...outcomeFields(job),
|
|
526
535
|
steps: `${job.stepCount}/${job.progressTotal}`,
|
|
527
536
|
live_url: job.liveUrl,
|
|
528
537
|
input_question: job.inputQuestion,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@browsa/mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"mcpName": "io.browsa/browsa",
|
|
5
5
|
"description": "MCP server for Browsa: drive real cloud browsers from Claude Desktop, Cursor, Cline, and any MCP-compatible client",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
45
|
-
"browsa": "^0.3.
|
|
45
|
+
"browsa": "^0.3.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^20",
|