Development workflow
Use Chrome DevTools MCP for a powerful AI-driven development loop:1
Install Chrome DevTools MCP
2
Start your dev server
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:Vanilla JavaScript
Shopping cart with core WebMCP functionality
React
Task manager with
useWebMCP() hookSvelte
Svelte 5 with runes and actions
Angular
Note-taking app with Angular signals
Rails
Bookmarks manager with Stimulus controllers
Phoenix LiveView
Real-time sync with server-side state
The pattern
All frameworks follow the same approach:- Import
@mcp-b/globalto addnavigator.modelContext - Call
registerTool()in your mount lifecycle - Call
unregister()in your unmount lifecycle
React users
Use@mcp-b/react-webmcp instead of @mcp-b/global - it handles lifecycle automatically and provides Zod validation.
SPAs vs SSR frameworks
Using a plain SPA? If you’re building a client-side-only React, Vue, or Svelte app (without SSR), you don’t need to worry about server/client boundaries. Just register tools in your component lifecycle and you’re good to go.
navigator doesn’t exist on the server. Each framework has its own pattern for this - see the guides below.
Framework-specific guides
React
Next.js
SSR-safe patterns with App Router and Client Components
TanStack Start
Client-only patterns with lazy imports
Remix
Client-only patterns with ClientOnly and lazy imports
