AIEndpoint and WebMCP are two halves of one loop.
Your /.well-known/ai manifest answers "which site can do this?" before an
agent navigates; WebMCP answers "what can I do on this page?" after it
arrives.
AIEndpoint finds the right website. WebMCP operates it.
Overview
WebMCP is an emerging browser standard: a page registers structured tools via
document.modelContext.registerTool(...), and an in-browser agent (Chrome
149+ behind a flag, or the ChatGPT desktop browser) can call them directly
instead of guessing at your UI.
AIEndpoint connects to it in three places:
- Your manifest can declare WebMCP support, so agents know your site is operable before they open it.
@aiendpoint/webmcppromotes your manifest's capabilities into live WebMCP tools - names, descriptions, and input schemas derived from what you already published.- The registry detects support at validation time, shows a ⚡ WebMCP badge, and lets agents filter for operable sites.
Declare support
Add one key to your manifest's meta object (the spec's extension point):
{
"aiendpoint": "1.0",
"service": { "name": "DemoWeather", "description": "..." },
"capabilities": [ ... ],
"meta": {
"last_updated": "2026-09-01",
"webmcp": "true"
}
}
Agents reading your manifest see it immediately, and the registry validator
records it. Even without the declaration, the validator also scans your
homepage for the WebMCP API surface (modelContext, registerTool(...))
as a fallback heuristic.
The adapter
@aiendpoint/webmcp turns the capabilities you already declared into page
tools. You supply one explicit handler per capability - nothing is exposed
that you did not wire up.
<script src="/static/aiendpoint-webmcp.iife.js"></script>
<script>
AIEndpointWebMCP.registerAiEndpointTools({
specUrl: "/.well-known/ai",
handlers: {
current_weather: async (input) => {
const data = await loadCity(input.city);
updateWeatherCard(data); // drive the UI the human is watching
return data;
},
},
});
</script>
Or as an ES module in a bundled app:
import { registerAiEndpointTools } from "@aiendpoint/webmcp";
registerAiEndpointTools({ specUrl: "/.well-known/ai", handlers: { ... } });
What the adapter does for you:
- Parses the spec's compact parameter notation
(
"string, required -- city name") into JSON SchemainputSchemawith types and required lists - Probes every known API surface (
document.modelContext,navigator.modelContext, legacy entry points), preferringregisterToolwithAbortSignalcleanup - Keeps a page-wide tool union on
provideContext-only runtimes so independent components never clobber each other - Normalizes tool input (runtimes pass parsed objects or raw JSON strings)
See it live: weather.aiendpoint.dev - the badge in the corner reports registered tools, and agent calls update the weather card on screen.
The WebMCP badge
Services detected as WebMCP-capable get a ⚡ WebMCP badge on the services directory, next to the verified badge. Detection happens at registration and validation time:
meta.webmcpis"true"in the manifest (authoritative), or- the homepage HTML references the WebMCP API surface (heuristic)
For agents
The list API accepts webmcp=true:
curl "https://api.aiendpoint.dev/api/services?q=weather&webmcp=true"
And on aiendpoint.dev itself, the find_services WebMCP tool accepts
webmcp_only: true - so an in-browser agent can ask the registry for sites
it will be able to operate after navigating, closing the discovery-to-
execution loop in one session.
Browser support
- Chrome 149+ with
chrome://flags/#enable-webmcp-testingenabled - ChatGPT desktop app built-in browser
- Diagnostics: /webmcp/ping registers a single
pingtool and reports exactly which API surface your browser exposes
The API surface is still evolving; the adapter is deliberately defensive and degrades to a no-op in unsupported browsers.