> Documentation index: https://developer.chrome.com/docs/ai/llms.txt

![](http://developer.chrome.com/static/docs/ai/images/hero-sm.png)

### Agent-friendly websites

Use WebMCP to build sites that work better with AI agents. [Get started](http://developer.chrome.com/docs/ai/webmcp.md.txt) [Join the origin trial](https://developer.chrome.com/origintrials/#/register_trial/4163014905550602241)

## WebMCP APIs

[](http://developer.chrome.com/docs/ai/webmcp.md.txt)

### [Overview](http://developer.chrome.com/docs/ai/webmcp.md.txt)

What is WebMCP and why should you care?

[Read the doc](https://developer.chrome.com/docs/ai/webmcp.md.txt)
[](http://developer.chrome.com/docs/ai/webmcp/imperative-api.md.txt)

### [Imperative API](http://developer.chrome.com/docs/ai/webmcp/imperative-api.md.txt)

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

[Read the doc](https://developer.chrome.com/docs/ai/webmcp/imperative-api.md.txt)
[](http://developer.chrome.com/docs/ai/webmcp/declarative-api.md.txt)

### [Declarative API](http://developer.chrome.com/docs/ai/webmcp/declarative-api.md.txt)

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

[Read the doc](https://developer.chrome.com/docs/ai/webmcp/declarative-api.md.txt)
[](http://developer.chrome.com/docs/ai/webmcp/compare-mcp.md.txt)

### [WebMCP and MCP](http://developer.chrome.com/docs/ai/webmcp/compare-mcp.md.txt)

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

[Read the doc](https://developer.chrome.com/docs/ai/webmcp/compare-mcp.md.txt)

## How WebMCP works

In just three steps, your site tells agents exactly what they can do. [Discover the Imperative API](http://developer.chrome.com/docs/ai/webmcp/imperative-api.md.txt) Step 1

### Your site registers tools

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

```javascript
// Imperative API
document.modelContext.registerTool({
  name: "bookSlot",
  title: "Book a consultation slot",
  description: "Reserve a 30-minute consultation.",
  inputSchema: {
    type: "object",
    properties: {
      date:  { type: "string", format: "date" },
      time:  { type: "string" },
      name:  { type: "string" },
      email: { type: "string", format: "email" }
    },
    required: ["date", "time", "name", "email"]
  },
  annotations: { readOnlyHint: false },
  execute: async (input, client) => {
    return await api.book(input);
  }
});
```
Step 2

### The browser exposes them

The browser collects and presents these tools to the user's WebMCP-aware agent, alongside the page's URL, title, and origin permission scope.
![Your site speaks to the browser, which translates for the agent.](https://developer.chrome.com/static/docs/ai/agents/images/webmcp-horizontal-600.jpg) Step 3

### The agent takes fast, reliable action

The agent sees a contract, supplies structured arguments, and your code does the rest. The user stays in the loop for permission and confirmation. It's faster, more reliable than actuation.

```bash
// the agent's view
{
  "tool": "bookSlot",
  "arguments": {
    "date": "2026-07-31",
    "time": "14:00",
    "name": "Jerry Jones",
    "email": "jerry.jones@example.com"
  }
}
```

## Optimize your site for agents

Create secure tools that match your user's needs and your site's capabilities. [](http://developer.chrome.com/docs/ai/webmcp/use-cases.md.txt)

### [When to use WebMCP](http://developer.chrome.com/docs/ai/webmcp/use-cases.md.txt)

Read examples from a user and agent's perspective to understand what WebMCP tools to support a critical user journey (CUJ).

[Read the doc](https://developer.chrome.com/docs/ai/webmcp/use-cases.md.txt)
[](http://developer.chrome.com/docs/ai/webmcp/best-practices.md.txt)

### [Plan your WebMCP strategy](http://developer.chrome.com/docs/ai/webmcp/best-practices.md.txt)

Just as you'd do for any software application, your first step should be to plan your tool strategy.

[Read the doc](https://developer.chrome.com/docs/ai/webmcp/best-practices.md.txt)
[](http://developer.chrome.com/docs/ai/webmcp/build-tools.md.txt)

### [Build effective tools](http://developer.chrome.com/docs/ai/webmcp/build-tools.md.txt)

Learn how you can define and build WebMCP tools that are useful for your website or web application.

[Read the doc](https://developer.chrome.com/docs/ai/webmcp/build-tools.md.txt)
[](http://developer.chrome.com/docs/ai/webmcp/secure-tools.md.txt)

### [WebMCP tool security](http://developer.chrome.com/docs/ai/webmcp/secure-tools.md.txt)

Read our early guidance on security for those building tools with WebMCP.

[Read the doc](https://developer.chrome.com/docs/ai/webmcp/secure-tools.md.txt)
[](http://developer.chrome.com/docs/ai/webmcp/evals.md.txt)

### [WebMCP evals](http://developer.chrome.com/docs/ai/webmcp/evals.md.txt)

Before releasing WebMCP tools, test to confirm agents understand when to call the tool, how to execute it, and what answers are acceptable.

<br />

[Read the doc](https://developer.chrome.com/docs/ai/webmcp/evals.md.txt)

## Build with AI agents

### Modern web guidance

Use Modern Web Guidance with your favorite AI coding agents, so you can access web best practices in your preferred workflow.

```bash
npx modern-web-guidance@latest install
```
[Read the docs](http://developer.chrome.com/docs/modern-web-guidance.md.txt)

### Build extensions with coding agents

Use Modern Web Guidance to build extensiopns faster, with the help of coding agents. [Read the doc](http://developer.chrome.com/docs/extensions/ai/build-with-ai.md.txt)

## Safety considerations for agent developers

Agent developers must design protections against malicious text from untrusted content. We identify some security techniques relevant to agents using WebMCP. [Read our guidance](http://developer.chrome.com/docs/agents/security.md.txt) ![](http://developer.chrome.com/static/docs/ai/agents/images/gemini_inchrome.jpg)

### Meet Gemini in Chrome

AI assistance, right in your browser. Get key takeaways, clarify concepts, and find answers based on the context of your open tabs.

Gemini works across your Google apps to help you power through your day.
[Discover Gemini in Chrome](https://gemini.google/overview/gemini-in-chrome/)

## Introducing AI agents

[web.dev](https://web.dev/explore/ai)

### [What are AI agents?](https://web.dev/articles/ai-agents)

Understand the basics and definitions of the various emerging technologies, often referred to as AI. [Read the doc](https://web.dev/articles/ai-agents) [web.dev](https://web.dev/explore/ai)

### [Build agent-friendly websites](https://web.dev/articles/ai-agent-site-ux)

As web practitioners, it's critical that we build new technology thoughtfully and responsibly. [Read the doc](https://web.dev/articles/ai-agent-site-ux) [web.dev](https://web.dev/learn/ai/)

### [Learn AI](https://web.dev/learn/ai)

Build a foundation of knowledge about AI to add features to your websites and web applications. [Take the course](https://web.dev/learn/ai)