AI2Web
An MCP server for Claude and ChatGPT that discovers AI-ready websites and acts on them. It fronts the AI2Web Discovery Network with three tools: find_sites, describe_site, and call_site_action. Actions are approval-gated and SSRF-guarded, and no site needs to adopt anything, Claude and ChatGPT already allow third-party MCP connectors. Install: npx @ai2web/connector.
README
<div align="center"> <a href="https://ai2web.dev"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ai2web-foundation/.github/main/profile/ai2web-logo-white.svg"> <img alt="AI2Web" src="https://raw.githubusercontent.com/ai2web-foundation/.github/main/profile/ai2web-logo-black.svg" width="200"> </picture> </a> </div>
AI2Web JavaScript/TypeScript framework (@ai2web/*)
The reference framework for the AI2Web protocol. Describe your website's capabilities once; generate the manifest, routes, and adapters.
TypeScript, JavaScript, or React. The packages are authored in TypeScript but published as standard ESM JavaScript with bundled type declarations, so they run unchanged in plain JS. @ai2web/react adds hooks and an embeddable badge for React apps, and a framework-free <ai2w-badge> web component works in any HTML page with no build step. See examples/.
Packages
| Package | Status | Purpose |
|---|---|---|
@ai2web/core |
✅ scaffolded | Types, capability model, fluent manifest builder, validation + AI Readiness scoring, discovery client, export projections (toLlmsTxt / toAgentJson, RFC-0015), and the shared executeOperation guard (RFC-0006 §3: approval by risk tier, same-origin credentials, SSRF) that every adapter routes through. |
@ai2web/validator |
✅ scaffolded | ai2web validate <url> CLI → per-capability report + AI Readiness Score + tier. |
@ai2web/server |
✅ scaffolded | Framework-agnostic /ai2w, /ai2w/*, negotiation and action route handler, plus multi-surface projections (/llms.txt, /.well-known/agent.json, RFC-0015); Cloudflare Workers and Node adapters. |
@ai2web/mcp-bridge |
✅ scaffolded | Expose declared capabilities as an MCP server (usable in Claude/ChatGPT today). |
@ai2web/graphql-adapter |
✅ scaffolded | Project the declared model as a GraphQL schema (SDL + resolvers); GET actions become Query fields, writes become Mutations. |
@ai2web/acp-adapter |
✅ scaffolded | Drive a site's advertised ACP checkout transport (RFC-0005 Profile 1); the payment step stays approval-gated. |
@ai2web/ap2-adapter |
✅ scaffolded | Drive a site's advertised AP2 (Agent Payments Protocol) merchant transport: create a signed Cart Mandate, settle a Payment Mandate; the payment step stays approval-gated. |
@ai2web/nlweb-adapter |
✅ scaffolded | Query a site's advertised NLWeb (nlweb.ai) ask endpoint in natural language; routes through the shared guarded, SSRF-checked executor. |
@ai2web/openapi-adapter |
✅ scaffolded | Describe the declared actions as an OpenAPI 3.1 document; auth becomes security, risk/approval become x-ai2w-* extensions. |
@ai2web/connector |
✅ scaffolded | Agent-side connector: one MCP server that fronts the Discovery Network and acts on sites. |
@ai2web/react |
✅ scaffolded | React bindings: useDiscover / useValidate / useNegotiate hooks and an embeddable <Ai2wBadge>. React is an optional peer dependency. |
@ai2web/hono |
✅ scaffolded | Hono middleware: app.use("*", ai2w({ manifest, actions })) serves every AI2Web route and passes the rest through. Edge-native (Workers/Bun/Deno). |
@ai2web/astro |
✅ scaffolded | Astro integration (auto-wires the routes) + a createAi2wRoute endpoint factory. Serves from your manifest under SSR/hybrid output. |
@ai2web/nuxt |
✅ scaffolded | Nuxt module: add "@ai2web/nuxt" and point it at your config module; it registers the Nitro server routes for every AI2Web path. |
The executing adapters (MCP, GraphQL, ACP) derive their surface from the same manifest and run through the one executeOperation in @ai2web/core, so none can expose an undeclared capability or drift on the security contract; the OpenAPI adapter is descriptive but likewise describes only declared actions and preserves their auth/risk semantics. Conformance is enforced in CI by scripts/adapter-conformance.ts (MCP), scripts/adapter-graphql-acp.ts (GraphQL + ACP), and scripts/adapter-openapi.ts (OpenAPI).
Try the validator now (zero-dependency)
Before the TypeScript build, a runnable mirror lives at scripts/validate.mjs:
node scripts/validate.mjs ../ai2web-spec/examples/ecommerce.json # → AI Readiness Score 100/100
node scripts/validate.mjs https://some-site.com # fetches /ai2w with well-known fallback
Describe a site once (builder)
import { ai2web } from "@ai2web/core";
const manifest = ai2web({ name: "Example Store", url: "https://example.com", type: "ecommerce" })
.capability("content")
.capability("commerce", { endpoint: "/ai2w/products", checkout: true })
.transports({ mcp: { enabled: true, endpoint: "/ai2w/mcp" }, rest: { enabled: true, base: "/ai2w" } })
.auth({ methods: ["none", "oauth2"], oauth2: { pkce: true, scopes: ["read_products", "checkout"] } })
.consent({ requires_user_approval_for: ["purchase", "payment"] })
.events({ endpoint: "/ai2w/events", types: ["order.shipped", "price.drop"] })
.build();
Build (once dependencies are installed)
npm install
npm run build # tsc --build across workspaces
Licence
MIT.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。