webmcp-gen

Generate and validate WebMCP init scripts from manifest.json to JavaScript.

3.7k|235|Updated Oct 12, 2025
One-click install
npx skills add https://github.com/browserbase/skills --skill webmcp-gen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: webmcp-gen
Source: https://github.com/browserbase/skills/tree/main/skills/webmcp-gen
Command: npx skills add https://github.com/browserbase/skills --skill webmcp-gen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @browserbasehq/stagehand, and includes scripts (resource) components.

What problem does it solve?

This Skill simplifies the creation and validation of WebMCP (Web Model Container Protocol) init scripts for browser automation, enabling efficient development and testing of web-based tools.

Core Features & Use Cases

  • Manifest Creation: Write a manifest.json defining the tools to be registered with the browser's Model Context Protocol.
  • Compilation: Convert the manifest into a JavaScript init script (webmcp.init.js).
  • Validation: Test the script to ensure it properly registers tools and handles data without errors.
  • Use Case: If you have a website and want to create a WebMCP tool that captures a specific data stream, you can use this Skill to generate the necessary code and validate it.

Quick Start

Generate a WebMCP init script for a target URL and tool capability by running: node scripts/scaffold.mjs <domain>/<task> --url <url>

Frequently Asked Questions about webmcp-gen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a WebMCP init script for browser automation?

You create a WebMCP init script by defining a manifest.json with your tool capabilities and compiling it into webmcp.init.js using the scaffold script. The process requires Stagehand and the browse CLI for page exploration.

What is WebMCP and how does it work with browser tools?

WebMCP (Web Model Container Protocol) is a protocol that allows websites to register tools with the browser's Model Context Protocol. You author a manifest, compile it to JavaScript, and validate it to handle data streams without errors.

Do I need Stagehand to compile a WebMCP manifest?

Yes, Stagehand is a required dependency for compiling and validating WebMCP init scripts. You also need the browse CLI for page exploration, Node 18+, and Chrome/Chromium with WebMCP testing flags enabled.

What are the requirements to validate WebMCP init scripts?

Validating WebMCP init scripts requires Node 18+, Chrome or Chromium with WebMCP testing flags enabled, the Stagehand dependency, and the browse CLI. Validation tests that the script properly registers tools and handles data without errors.

Can I use WebMCP scripts to capture a specific data stream from a website?

Yes, you can use WebMCP scripts to capture a specific data stream from a website. You define the tool capability in a manifest, compile it to an init script, and validate that it registers and handles the stream without errors.