智能体
vercel.com ·
@Vercel News
mcp-handler 现已支持 WebMCP
Vercel 的 mcp-handler 新增对 WebMCP 的实验性支持。WebMCP 是面向浏览器内 agent 暴露工具的拟议 Web 标准。开发者只需添加一个 script 标签,即可让现有 MCP 工具在网页中可用;脚本会将这些工具注册到页面,并以已登录用户身份把每次调用代理回 MCP 服务器,从而无需浏览器端 OAuth 流程即可使用需认证的工具。需升级至 mcp-handler@2.2.0。
AI推荐理由 Vercel 官方 changelog 宣布 mcp-handler 实验性支持 WebMCP 标准,允许通过单个 script 标签将现有 MCP 工具暴露给浏览器内 agent,并以登录用户身份代理调用,免去浏览器端 OAuth 流程。信息具体、来源可信,对 Agent 与开发工具有实际价值,但属实验性功能,需升级至 mcp-handler@2.2.0。
72
正文
`mcp-handler` now has experimental support for [WebMCP](https://github.com/webmachinelearning/webmcp), the proposed web standard for exposing tools to in-browser agents. Add a single script tag to your site, and your existing MCP tools become available there too.
Opt tools in by adding them to the `experimental_webMcp` object:
Then load the script from your MCP endpoint with the `?webmcp-script` parameter:
The script registers those tools with the page and proxies each call back to your MCP server as the signed-in user, so authenticated tools work without a browser-side OAuth flow.
Upgrade to `mcp-handler@2.2.0` and read the [documentation](https://github.com/vercel/mcp-handler/blob/main/docs/WEBMCP.md) to get started.
[Read more](https://vercel.com/changelog/webmcp-mcp-handler)