@ai-sdk/mcp 2.0.104 Adds Browser WebMCP Tools Support and Tool Validation
The @ai-sdk/mcp library update introduces an experimental transport for browser WebMCP tools, exports relevant browser types, and adds new tooling for MCP definition validation and model-facing tool creation.
What changed?
The @ai-sdk/mcp 2.0.104 release adds Experimental_WebMCPTransport, enabling discovery and invocation of browser-side WebMCP tools via createMCPClient. This transport supports operation cancellation, frame-aware tool aliases, and structured results. The patch also exports browser API types as Experimental_WebMCPModelContext and Experimental_WebMCPTool. Additionally, createMCPTools was introduced, allowing validation of forwarded MCP definitions and creation of model-facing tools without an executable function. The update also modifies error reporting for invalid MCP App resource URI metadata to use MCPClientError, preserving details of the original validation error.
Why does it matter to an everyday developer?
Developers integrating AI toolchains into web applications can now directly discover and invoke browser-hosted tools using the MCP client. This reduces friction when building complex, interactive AI workflows in the browser by supporting structured communication, context-aware tool aliases, and cancellation scenarios. The ability to define and validate model-facing tools without immediate execution logic also makes it easier to build robust, interoperable toolchains across client and server boundaries. Error handling is improved with clearer metadata validation reporting.
What can the developer do now?
Developers can use Experimental_WebMCPTransport to discover and call WebMCP tools from their browser environment through createMCPClient, leveraging new capabilities such as cancellation and structured result handling. They can also export and use browser-specific types for improved type safety. With createMCPTools, it is now possible to validate MCP definitions and create tool schemas for use with models before implementation of actual execution logic. Developers should also be aware that invalid resource URIs will trigger clear client errors, aiding debugging.

