# Cloudflare Agents SDK 0.31.0 adds internal hostnames to the browser and makes MCP packages optional

Canonical: https://theagenticweekly.com/news/cloudflare-agents-0-31-0 · Evidence: Reported · First seen: 2026-10-27 14:09 UTC · Source published: 2026-10-27 13:29 UTC · Brief published: 2026-10-27 14:12 UTC · Updated: 2026-10-27 14:12 UTC · Author: Agentic Weekly

> Cloudflare Agents SDK agents@0.31.0 (October 27, 2026) lets a Browser Run browser send requests for up to 8 internal hostnames to your agent instead of the internet, makes @modelcontextprotocol/sdk and @modelcontextprotocol/server optional peer dependencies that MCP users must now add themselves, and runs browserTool's model code in its own Dynamic Worker.

## What changed

- Internal hostnames: browserRun() accepts up to 8 hostnames as internalHosts, and requests to them are served by a fetch function on your agent or by another Worker, so the model can open a dev server or workspace folder in the same browser it uses for the web.
- With a target schema on a host, the model itself picks what the host serves through browser.assignHost(), such as a container port or a workspace folder.
- Breaking for MCP users: @modelcontextprotocol/sdk and @modelcontextprotocol/server are now optional peer dependencies; anyone using agents/mcp, agents/mcp/server, agents/x402 or agents/experimental/webmcp must add them (sdk 1.32.1, server 2.3.1) or builds fail.
- browserTool now runs the model's code in its own Dynamic Worker instead of on codemode, the model calls browser.cdp() instead of cdp.send(), and results carry a notice field in place of restarted, newTabs and calls.
- createBrowserTools, createBrowserRuntime, BrowserConnector and the Quick Action helpers are deprecated in favour of browserTool, while agents/models/ai-sdk and agents/models/pi-ai are no longer experimental.
- The companion @cloudflare/think 0.22.0 removes lazyWorkspace, exported by mistake in 0.21.0, and now needs @cloudflare/computer 0.8 as its peer.

## In the source's words

> "Until you do, builds fail with an unresolved import."
> (Cloudflare Agents agents@0.31.0 release notes, https://github.com/cloudflare/agents/releases/tag/agents%400.31.0)

## Early verdict

If you serve MCP from Cloudflare Agents, add the two MCP packages to package.json before upgrading; if you use browserTool, follow the three upgrade steps in the notes. (Basis: Based only on the agents@0.31.0 release notes; we have not run this version.)

## What we have not verified

- We did not run this release ourselves or test internal hostnames.
- The release notes do not say whether Browser Run pricing or limits change with internal hostnames.
- We did not check when the deprecated browser helpers will be removed; the notes give no date.

## Timeline

- Source published: 2026-10-27 13:29 UTC
- First seen by our watcher: 2026-10-27 14:09 UTC (via GitHub releases: cloudflare/agents), 40 minutes after the source's timestamp
- Brief published: 2026-10-27 14:12 UTC

## Sources

- [GitHub release: cloudflare/agents agents@0.31.0](https://github.com/cloudflare/agents/releases/tag/agents%400.31.0) (primary source) (fetched 2026-10-27)
- [GitHub release: cloudflare/agents @cloudflare/think@0.22.0](https://github.com/cloudflare/agents/releases/tag/%40cloudflare/think%400.22.0) (primary source) (fetched 2026-10-27)

## Related

- [OpenAI Agents SDK: verdict and setup guide](https://theagenticweekly.com/tools/openai-agents-sdk)
- [FastMCP: verdict and setup guide](https://theagenticweekly.com/tools/fastmcp)
- [All news briefs](https://theagenticweekly.com/news)
- [This week's releases](https://theagenticweekly.com/this-week)
- [New AI models this week](https://theagenticweekly.com/models/this-week)

## How to cite

Agentic Weekly, "Cloudflare Agents SDK 0.31.0 adds internal hostnames to the browser and makes MCP packages optional", published 2026-10-27 14:12 UTC, https://theagenticweekly.com/news/cloudflare-agents-0-31-0
