WebMCP
Let browser AI agents call site tools through WebMCP, including site search, article reads, category listings and source lookup.
WebMCP is a draft from the W3C Web Machine Learning Community Group (not yet a standard, and the API is still changing). The SDK's WebMCP module registers site tools for AI agents in supporting browsers with strict feature detection and version guards.
Enable
Turn it on under Sites → SDK setup → WebMCP and pick the tools. On startup the SDK runs:
const ctx = document.modelContext ?? navigator.modelContext;
if (ctx && typeof ctx.registerTool === 'function') {
ctx.registerTool({
name: 'site_search',
description: 'Search articles on this site',
inputSchema: { type: 'object', properties: { q: { type: 'string' } }, required: ['q'] },
execute: async ({ q }) => geo.tools.search(q),
});
}Unsupported browsers see no side effects.
Built-in tools
| Tool | Description | Read-only |
|---|---|---|
site_search | Site search returning title, summary and URL | yes |
get_article | Read an article body by slug | yes |
list_by_category | List articles in a category | yes |
get_source | Look up the source site and original link of a piece | yes |
contact | Submit the contact form (v1.1, requires user confirmation) | no |
Tool descriptions can be overridden per language in the console; each tool can limit parameter ranges and rate.
Security
- Only read-only tools are registered by default; write actions must be enabled explicitly and prompt the user on the page
- Tools return published content only, never drafts or personal data
exposedTorestricts calling origins, and tools can be switched off remotely from the console at any time
Cluster sites
Cluster sites enable the read-only tools by default so agents reading content also receive the source attribution.