Skip to main content
WebMCP works with any framework. Use Chrome DevTools MCP for the best development experience, then explore our production-ready examples.

Development workflow

Use Chrome DevTools MCP for a powerful AI-driven development loop:
1

Install Chrome DevTools MCP

claude mcp add chrome-devtools npx @mcp-b/chrome-devtools-mcp@latest
2

Start your dev server

pnpm dev
3

Ask your AI to build and test tools

The AI can write tool code, navigate to your page, discover tools via list_webmcp_tools, and test them with call_webmcp_tool - all in a tight feedback loop.
This is TDD for AI - agents build and verify their own tools in real-time.

Production examples

Clone any example to get started immediately:
git clone https://github.com/WebMCP-org/examples.git
cd examples/<framework>
pnpm install && pnpm dev

The pattern

All frameworks follow the same approach:
  1. Import @mcp-b/global to add navigator.modelContext
  2. Call registerTool() in your mount lifecycle
  3. Call unregister() in your unmount lifecycle
FrameworkMountUnmountExample
ReactuseWebMCP() hookautomaticView
Vue 3onMountedonUnmountedCommunity
Nuxt 3onMounted + import.meta.clientonUnmountedCommunity
SvelteonMountonDestroyView
AngularngOnInitngOnDestroyView
Rails/StimulusconnectdisconnectView
Phoenix LiveViewmounteddestroyedView

React users

Use @mcp-b/react-webmcp instead of @mcp-b/global - it handles lifecycle automatically and provides Zod validation.

Framework-specific guides