Daily Tech Briefing
AI 科技速览

每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。

AI 快讯
HackerNoon AI · 2026/7/28 22:23:34
What Exactly Is WebMCP?

What Exactly Is WebMCP?

AI 中文解读
WebMCP这项新技术,相当于给AI装上了“网站遥控器”——与其让AI像人类一样费力阅读页面猜功能,网站自己就能主动告诉AI“我能做什么,需要你输入什么”。以前AI访问网页时,得靠分析像素、代码结构甚至截图来理解一个搜索框该怎么用,这就像让机器人从零学习使用一台新设备,很容易因为页面布局变化就“死机”。现在,网站可以为AI单独提供一个“产品说明书”:注册好清晰的动作指令,比如“搜索文章”、需要什么样的关键词、返回什么样的结果。AI调用时就像按按钮一样简单直接,而人类用户看到的还是原来的漂亮界面,互不干扰。这项技术目前还是实验性质,但已经在Chrome浏览器中测试。未来你可能不会直接感受到它的存在,但背后帮你订票、查资料、处理表格的AI助手会变得可靠得多——它们不再因为网页改了个按钮颜色就“犯迷糊”,执行任务的出错率会大幅下降。
Discover AnythingSignupWrite New StoryWhat Exactly Is WebMCP?byChudi NnorukambyChudi Nnorukam|@chudinnorukamFounder & Software Developer at CitabilitySoftware developer building AI visibility tools. Founder of citability.dev. Writing at chudi.dev.SubscribeJuly 28th, 2026TLDR ‘digital web abstract’ by HackerNoon AI Image GeneratorYour browser does not support the audio element.Speed1xVoiceDr. One Ms. Hacker byChudi Nnorukam@chudinnorukambyChudi Nnorukam|@chudinnorukamFounder & Software Developer at CitabilitySoftware developer building AI visibility tools. Founder of citability.dev. Writing at chudi.dev.SubscribeStory's CredibilitybyChudi Nnorukam|@chudinnorukamFounder & Software Developer at CitabilitySoftware developer building AI visibility tools. Founder of citability.dev. Writing at chudi.dev.SubscribeStory's CredibilityWebMCP is an experimental browser API that lets a website expose structured tools to AI agents through document.modelContext. Instead of reverse-engineering a page from pixels, DOM structure, and click targets, an agent can discover named actions with typed inputs and invoke them through the browser. The current specification is a Draft Community Group Report dated July 21, 2026. That status matters: WebMCP is a serious proposal with a Chrome origin trial, but it is not a finished W3C standard or a stable cross-browser feature.The Problem WebMCP Tries to Solve A human can look at a search form, infer what it does, enter a query, and interpret the results. An AI agent has to reconstruct the same interaction from markup, accessibility data, screenshots, or browser automation. That reconstruction is brittle. A changed label, hidden control, or asynchronous state transition can break the flow. WebMCP gives the page a second interface for the same capability: The human gets the normal visual interface. The agent gets a named tool, a description, a JSON Schema input contract, and a structured result. The website keeps its existing validation, authentication, and business logic. This is progressive enhancement for agent interaction. The visual page remains the product; WebMCP adds a browser-mediated action surface.How the Imperative API Works The imperative API registers a JavaScript tool on document.modelContext: if (document.modelContext) { const controller = new AbortController(); await document.modelContext.registerTool( { name: 'search_posts', title: 'Search posts', description: 'Search published posts by keyword and return up to five matches.', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'The topic or phrase to search for.' } }, required: ['query'] }, annotations: { readOnlyHint: true, untrustedContentHint: false }, async execute({ query }) { return JSON.stringify(searchLocalIndex(query).slice(0, 5)); } }, { signal: controller.signal } ); // Abort when the tool should no longer be available. // controller.abort(); } The page controls the implementation. The browser controls discovery and invocation. The current draft defines getTools() and a toolchange event for in-page discovery. Chrome's origin-trial documentation also exposes executeTool() so an in-page agent can invoke a discovered tool. Registration is dynamic. Passing an AbortSignal lets the page remove a tool when its route, state, or component changes. That is safer than leaving an action registered after the corresponding interface has disappeared. Cross-origin access is closed by default. A page must explicitly expose a tool to secure origins with the exposedTo registration option, and a caller must request tools from those origins. Cross-origin iframes also require the tools Permissions Policy.The Declarative API Turns Forms Into Tools Chrome's origin-trial documentation also defines a declarative path for HTML forms: <for
分享
阅读原文