# Cloudflare agents 0.31.0 adds internal hostnames for browser runs

published: 2026-10-27T14:05:31.610Z
topic: frameworks
source: https://github.com/cloudflare/agents/releases/tag/agents%400.31.0
url: https://aiagentnews.io/stories/cloudflare-agents-0-31-0-adds-internal-hostnames-for-browser-runs

Cloudflare's agents package 0.31.0 lets developers route browser requests for up to eight internal hostnames to their agent instead of the public internet. The release also makes the MCP SDK packages optional and changes how browserTool runs model code.

Version 0.31.0 of the agents package adds internalHosts to browserRun(), which accepts up to eight hostnames. Requests from the browser to those hostnames go to the agent rather than the internet, so a model can open a dev server, a workspace folder or another Worker from the same browser it uses for the web. Each host is served by a fetch function on the agent or by another Worker.

A host can also be given a target schema, which lets the model pick what it serves through browser.assignHost(), such as a container port or a workspace folder. Without a target, a host always serves the same thing. browserTool now runs the model's code in its own Dynamic Worker, stops it from outside if it overruns its timeout, and can no longer close the browser or create Live View links.

@modelcontextprotocol/sdk and @modelcontextprotocol/server are now optional peer dependencies, so apps that do not serve MCP no longer install them. The ai-sdk and pi-ai model entry points are no longer experimental. createBrowserTools, createBrowserRuntime and BrowserConnector are deprecated in favour of browserTool.

## Why it matters if you build agents

Projects that serve MCP or use agents/x402 or agents/experimental/webmcp must add the MCP packages to package.json at the versions the release lists, or builds fail with an unresolved import. Projects that use browserTool should remove the ctx option and update any prompts that mention cdp.send to browser.cdp. Browser-driving agents can now reach local dev servers and workspace folders through the same browser session.
