#2238

feat(mcp): run one MCP tool with `mcp call`

OpenRaillywants to merge intofrom

Problem

Runtimes that cannot keep a process open between tool calls, such as eve on serverless, cannot use the MCP tool surface. An eve spike on Vercel Sandbox showed a stdin agent-browser mcp per sandbox is never reused across tool calls (eve hands a new sandbox object per call) and leaks one process per call, so the eve extension keeps 21 hand-written tools instead.

Changes

  • agent-browser mcp call <tool> [<arguments-json> | -] [--tools <profiles>] runs one tools/call and prints its result as JSON, with the version in _meta.agentBrowserVersion so callers can detect a schema mismatch
  • Every tool is available unless --tools limits the call, since profiles only bound tools/list
  • Exit code 0 on success, 1 when the tool reports an error, 2 for an unknown tool or invalid arguments
  • Access settings come from the environment, as with the server: AGENT_BROWSER_ALLOWED_DOMAINS blocks a disallowed open with the same error as the CLI flag
  • Help, README, docs and the core skill document it

Visual proof

Local Chrome, one process per call, nothing left running:

open exit=0
snapshot ref=e1
click exit=0
get_url https://www.iana.org/help/example-domains
close exit=0
mcp processes left: 0

cargo test --test mcp_call_cli: 4 passed. MCP unit tests: 83 passed, including 3 new parse_mcp_call tests.

Activity

2
vercel[bot]2d ago

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated
agent-browser ReadyPreview, v0Oct 28, 2026 12:40am UTC
agent-browser-env-demo ReadyPreview, v0Oct 28, 2026 12:40am UTC