Documentation · ai2w v0.2

Make your site understandable to every AI.

Describe your website once with a capability manifest at /ai2w. AI2Web exposes it across MCP, ACP, REST, GraphQL and more, with discovery, validation and a safe action model built in. This is the practical guide; normative detail lives in the specification.

Quick start

Three steps to AI-ready

  1. Publish a manifest at /ai2w - by hand, via an SDK, or the WordPress plugin.
  2. Add the discovery anchor at /.well-known/ai2w pointing to it.
  3. Validate + connect - score it, then add your /ai2w/mcp endpoint to any assistant.

Validate any site from the command line, or in the browser with the validator:

npx -p @ai2web/validator ai2web validate https://your-site.com
Install

Pick your language

Six SDKs plus a WordPress plugin, all producing the same manifest and scoring identically.

npm install @ai2web/core       # types, builder, validation, discovery
npm install @ai2web/server     # /ai2w route handler (Node + Cloudflare)
npm install @ai2web/mcp-bridge # expose your capabilities as an MCP server
The manifest

Describe your site once

Capabilities are a map of module → boolean | object. A boolean declares presence; an object adds detail such as an endpoint. Commerce is one module among equals - the model is not commerce-centric.

import { ai2web, validateManifest } from "@ai2web/core";

const manifest = ai2web({ name: "Northwind", url: "https://northwind.com", type: "ecommerce" })
  .capability("content")
  .capability("commerce", { endpoint: "/ai2w/products", checkout: true })
  .capability("search", { endpoint: "/ai2w/search" })
  .transports({ mcp: { enabled: true, endpoint: "/ai2w/mcp" }, rest: { enabled: true } })
  .auth({ methods: ["none", "oauth2"], oauth2: { pkce: true, scopes: ["checkout"] } })
  .consent({ requires_user_approval_for: ["purchase"] })
  .contact({ support: "[email protected]" })
  .build();

const { score, tier } = validateManifest(manifest); // 100, "Enterprise"
Serve it

One handler, every route

The SDK server handlers emit /ai2w, the well-known anchor, actions, and the /llms.txt + /.well-known/agent.json projections from a single manifest.

import { cloudflareHandler } from "@ai2web/server";

// One handler serves /ai2w, /.well-known/ai2w, actions, and the
// /llms.txt + /.well-known/agent.json projections from a single manifest.
export default cloudflareHandler({ manifest });
Discovery

Endpoints

GET  /.well-known/ai2w   discovery anchor (required) - carries or points to the manifest
GET  /ai2w               the capability manifest (recommended canonical endpoint)
GET  /ai2w/mcp           MCP transport for actions and tools
GET  /llms.txt           projection for llms.txt-aware agents
GET  /.well-known/agent.json  projection for agent.json-aware agents
POST /ai2w/negotiate     capability + transport negotiation

Discovery is read-only and safe: fetching a manifest never changes state. The /llms.txt and agent.json routes are projections of the same manifest, so agents that speak those formats work without parsing ai2w first, while /ai2w stays authoritative for execution.

Capability modules

The vocabulary

ModuleWhat it declaresSpec
contentReadable, structured content: articles, pages, docs, FAQsRFC-0008
searchA query interface over content and catalogRFC-0008
commerceProducts, cart, checkout, returns, inventoryRFC-0005
supportOrder tracking, returns, refunds, cancellations, issuesRFC-0007
actionsDeclared operations an agent can callRFC-0002
eventsSubscribable events (order shipped, price drop)RFC-0002
agentThe site's own AI agent (agent-to-agent)RFC-0004
identityLegal name, policies, support and security contactsSpec 4.3
extensionsNamespaced x-<vendor> extensionsRFC-0010
Actions & approval

Safe by construction

High-risk actions never auto-run. The flow is: discover → prepare → the site returns a preview → the user approves → execute → confirmation with an audit reference. In the reference adapters this is enforced in one shared executor, and a high-risk action previews even if a manifest tries to declare approval: false. Credentials are never sent cross-origin, and outbound targets are checked against an SSRF guard before every request.

Transports

One model, many protocols

The executing adapters - @ai2web/mcp-bridge, acp-adapter, graphql-adapter, openapi-adapter - all route through one guarded executor, so the approval, same-origin credential and SSRF rules hold uniformly across every transport.

Connect an assistant

Works with connectors today

An AI2Web MCP endpoint works with existing assistant connectors - no vendor needs to adopt ai2w first.

  • Claude: add your /ai2w/mcp URL as a custom connector, or claude mcp add --transport http in Claude Code.
  • ChatGPT: add the same endpoint via developer mode; Streamable HTTP is supported.
  • Grok: point it at the same /ai2w/mcp endpoint; xAI's API supports MCP servers.
  • Any MCP client: point it at /ai2w/mcp. The network connector fronts many sites at once.

Ready to check your site?

Get an AI Readiness score in seconds.

Scan your site
Discovery Network

Get listed, verified

The Discovery Network (directory.ai2web.dev) lets agents find your site without knowing its URL in advance. Every listing is verified server-side: the directory re-fetches your live /.well-known/ai2w, validates it, and requires the manifest's origin to match. Submitted data is never trusted, so the directory cannot be spammed with sites that are not really AI-ready. A periodic health check re-verifies each listing.

Three ways to get listed:

Scan your site at ai2web.dev/validator, then click "Add to directory".
The backend verifies your live manifest before listing - one click, no account.
Use the whole network

One endpoint, every site

You do not have to add each site's MCP endpoint one by one. Add the single network connector -connector.ai2web.dev/mcp - to your assistant and discover and use every AI-ready site through it. It exposes find_sites (search the directory), describe_site (read a site's capabilities and actions), and call_site_action (invoke an action, approval-gated for high-risk).

# Add the network connector once - then find + use any AI-ready site.
claude mcp add ai2web --transport http https://connector.ai2web.dev/mcp

# Or add https://connector.ai2web.dev/mcp as a custom connector in the Claude app.