#2238
feat(mcp): run one MCP tool with `mcp call`
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 onetools/calland prints its result as JSON, with the version in_meta.agentBrowserVersionso callers can detect a schema mismatch- Every tool is available unless
--toolslimits the call, since profiles only boundtools/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_DOMAINSblocks a disallowedopenwith 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: 0cargo test --test mcp_call_cli: 4 passed. MCP unit tests: 83 passed, including 3 new parse_mcp_call tests.
The latest updates on your projects. Learn more about Vercel for GitHub.