Use WebMCP to build sites that work better with AI agents.

WebMCP APIs

What is WebMCP and why should you care?

Read the doc

Define WebMCP tools with standard JavaScript to execute site-specific functions, such as form input and site navigation.

Read the doc

Transform your standard HTML forms into WebMCP tools by adding annotations.

Read the doc

Together, WebMCP and MCP help agents accomplish personalized tasks on behalf of human users.

Read the doc

How WebMCP works

In just three steps, your site tells agents exactly what they can do.
Step 1

Your site declares the actions an agent can take, as WebMCP tools. Each tool has a name, description, and JSON schema.

// Imperative API
document.modelContext.registerTool({
  name: "bookSlot",
  title: "Book a consultation slot",
  description: "Reserve a 30-minute consultation.",
  inputSchema: {
    type: "object",
    properties: {
      date:  { type