https://andreinwald.github.io/webmcp-demo
Prerequisites:
- Google Chrome version 146 or higher
- Enable "WebMCP" in chrome://flags
- Browser extension to call actions chromewebstore
Actions registered in DemoStore.tsx
Example:
useRegisterMCP({
name: "add_to_cart",
description: "Add an item to the shopping cart",
inputSchema: {
type: "object",
properties: {
id: {
type: "number",
description: "The ID of the item to add to the cart"
}
},
required: ["id"]
},
execute: ({ id }: { id: number }) => {
showAlert("add_to_cart called")
addToCart(id)
return `Successfully added item ${id} to cart`
}
})Read more:
