WebMCP Compatibility

WebMCP (Web Model Context Protocol) is a W3C Community Group specification for how websites expose capabilities to browser-based AI agents. aixa.js was designed with WebMCP alignment in mind — we use the same tool schema format and event model so that migration is seamless when browsers ship native support.

This is a reference page. Most users don't need to care about WebMCP. aixa.js works today in all modern browsers with no flags required.

Spec Status

Until browsers ship native WebMCP, aixa.js provides a production-ready polyfill that works in all modern browsers today.

Compatibility Table

The table below maps WebMCP concepts to their aixa.js equivalents:

WebMCP Feature Native API aixa.js Equivalent
Tool registration navigator.mcp.registerTool() aixa.registerTool() / aixa.registerSearch() / aixa.registerAction()
Declarative HTML <meta name="mcp-tool"> elements Auto-inference engine (aixa.inferTools()) — scans the DOM and auto-generates tool schemas
JSON Schema params JSON Schema inputSchema Identical JSON Schema format for tool parameters
Read-only hints risk: "safe" annotation riskLevel: "SAFE" on tool registration — identical semantics
HITL interaction WebMCP confirmation flow Built-in HITL modal via createHITLManager() — rendered in-page for user approval
Transport Browser-native message channel Custom DOM events (aixa:tool:invoke, aixa:tool:result) plus direct function calls

Migration Path

When browsers ship native WebMCP support, aixa.js is designed to detect it and delegate to the native API automatically. Here's what that means for you:

// Your code stays the same — forever
aixa.registerTool({
  name: 'search_catalog',
  description: 'Search the product catalog',
  parameters: [
    { name: 'q', type: 'string' },
  ],
  handler: async ({ q }) => { /* ... */ },
});

// aixa.js handles the rest:
// - Today: uses custom DOM events and direct calls
// - Future: delegates to navigator.mcp.registerTool() when available

Beyond the Spec

WebMCP defines the minimum viable protocol. aixa.js adds several capabilities that the current WebMCP draft does not address:

Capability What it does Why WebMCP doesn't cover it
Auto-inference engine Scans your existing HTML (forms, search inputs, filters) and automatically generates tool schemas — no registration code needed. WebMCP requires explicit registration. Auto-inference is a higher-level convenience.
HITL modal UI A pre-built, accessible modal that prompts users to approve or deny high-risk agent actions. WebMCP defines the protocol but not the UI. aixa.js ships the full UX.
Prompt injection sanitization Automatic sanitization of agent-provided input to prevent prompt injection attacks. Security is out of scope for the WebMCP spec.
Plugin architecture Reusable, publishable plugin packages (@aixa/plugin-*) for common use cases like e-commerce, booking, and knowledge bases. WebMCP is a protocol spec, not an ecosystem.
E-commerce templates Ready-made parameter schemas and handlers for retail, real estate, and travel verticals. Domain-specific templates are out of scope.

Even after WebMCP ships, these higher-level features remain valuable — they're not meant to be replaced by the browser, they're meant to be built on top of it.