WebMCP — Making Websites Agent-Friendly
Starting with Chrome 146, websites can expose structured tools to AI agents through the navigator.modelContext API — a standard known as WebMCP (Web Model Context Protocol). We implemented it on currentlabs.dev, and here's what we learned.
What Is WebMCP?
WebMCP lets websites declare tools that AI agents can discover and call. Think of it as an API for AI, but embedded directly in the browser page instead of requiring a separate backend endpoint.
A tool declaration looks like this:
navigator.modelContext.addTool({
name: 'get_products',
description: 'Get info about Current Labs products',
inputSchema: {
type: 'object',
properties: {
product: {
type: 'string',
enum: ['current', 'figma-plugin'],
},
},
},
execute: async (input) => {
// Return structured data
return { products: [...] }
},
})
When an AI agent visits the page, it can discover available tools via navigator.modelContext and call them just like any other tool in its toolkit.
What We Exposed
On currentlabs.dev, we registered three tools:
sign_up_early_adopter— Lets an agent sign up an email for launch notifications. The execute function writes directly to our Firebase backend.get_products— Returns structured data about our products (Current platform, Figma plugin) including features, pricing, status, and URLs.get_company_info— Returns company details, mission, social links, and contact information.
Discovery
For tools to be useful, agents need to find them. WebMCP supports two discovery mechanisms:
Runtime discovery via
navigator.modelContext— available when the agent is actively browsing the page.Static discovery via
/.well-known/model-context.json— a manifest file that agents can fetch without loading the page. This is similar to howrobots.txtworks for crawlers.
We also added tool documentation to our llms.txt file, which serves as a human-and-AI-readable overview of the site.
Why This Matters
The web is evolving from a place where humans browse to a place where both humans and AI agents operate. WebMCP is one of the first standards that takes this seriously.
For site owners, it means you can provide AI agents with structured, reliable ways to interact with your content — instead of relying on brittle scraping or screen reading.
For AI agents, it means websites become services with well-defined interfaces, not just blobs of HTML to parse.
Implementation Tips
If you're thinking about adding WebMCP to your site:
- Start small. Two or three read-only tools are enough to be useful. You can always add more later.
- Write clear descriptions. The tool descriptions are what the AI agent uses to decide whether and how to call your tool. Be specific.
- Include a static manifest. The
/.well-known/model-context.jsonfile lets agents discover your tools without JavaScript execution. - Test with real agents. Try asking an AI assistant to interact with your site and see what happens. The feedback loop is fast and revealing.
We're excited about where WebMCP is heading, and we'll continue to expand the tools available on currentlabs.dev. If you're building with WebMCP too, reach out — we'd love to compare notes.