Demo app showcasing how a Next.js app with oRPC backend can expose API routes as WebMCP tools, letting AI agents call them directly from the browser.
WebMCP is an emerging W3C Community Group specification that brings AI tool integration directly into the browser. This demo app shows how a Next.js application with an oRPC backend can expose its API routes as WebMCP tools — letting AI agents call them natively from within Chrome.
The project includes a reusable bridge package (orpc-webmcp) that automatically registers backend procedures as browser-accessible tools, with zero manual configuration per endpoint.
navigator.modelContext API in Chrome Canary (146+)Write type-safe backend procedures with oRPC and Zod schemas — standard API development, nothing WebMCP-specific.
The orpc-webmcp bridge automatically discovers all procedures and registers them as WebMCP tools via navigator.modelContext.
Any AI agent running in the browser (like Chrome's built-in AI) can discover and call your API endpoints as tools.
Tool calls are validated against Zod schemas, executed server-side via oRPC, and results returned to the agent — fully type-safe.
WebMCP works today in Chrome Canary with the built-in Gemini Nano model. Here's how to try it:
chrome://flags/#web-mcp and set it to Enabledgit clone https://github.com/Mark-Life/webMCP-example && cd webMCP-example && bun install && bun devhttp://localhost:3000 in Chrome Canary — the app automatically registers its tools via navigator.modelContextNo polyfills needed — the app uses the native navigator.modelContext API (Chrome 146+).
The demo task manager exposes five tools to AI agents:
apps/web/ — Next.js application with UI, server actions, and oRPC route handlerpackages/orpc-webmcp/ — Reusable bridge package with core logic and React hooksThe orpc-webmcp package is the core innovation — a generic adapter that:
navigator.modelContextThis means any oRPC application can become WebMCP-compatible by adding a single hook.



WebMCP Demo is an open-source project. It serves as both a reference implementation for the WebMCP specification and a starting point for building browser-native AI integrations.