WebMCP: Make Your Site Callable by AI Agents (With Working Code)
Описание и применение
WebMCP позволяет веб‑страницам объявлять типизированные инструменты, которые AI‑агенты могут вызывать напрямую, устраняя необходимость угадывать элементы DOM.
Задача
AI agents currently interact with web pages by guessing DOM elements, leading to fragile and error‑prone automation.
Результат
WebMCP enables precise, typed interactions between AI agents and web pages, reducing fragility and improving reliability.
Рабочий процесс
- 1. Include WebMCP script in the page.
- 2. Obtain document.modelContext (or navigator.modelContext for older previews).
- 3. Call registerTool with name, description, inputSchema, annotations, and execute function.
- 4. Agent calls executeTool with appropriate arguments.
- 5. Tool performs server request or DOM manipulation and returns result.
Доказательства
WebMCP is a proposal to skip the guessing. Your page tells the browser: "here are the actions I support, here's the JSON Schema for each one, call this function."
Chrome's team announced an early preview in February 2026, the spec is being developed at the W3C with Microsoft involved, and Chrome's docs were last updated in May 2026.
From Chrome's imperative API docs, document.modelContext gives you: registerTool(tool, options?)
- Дата записи: 2026-10-20T06:41:31.239Z