Inspiration
Preparing a quote as an Italian artisan (idraulico, elettricista, termotecnico) is a daily, high-stakes task: search the price catalog, type rows, check your margin, get the IVA right. It's tedious, error-prone, and the agent can't easily help without "guessing" through a table. We wanted an app where the artisan and an AI agent build the same quote together — agent does the tedious work, human stays in charge.
What it does
Cantiere Live is a WebMCP-powered quote editor for Italian tradespeople. A human artisan sets the client and the applicable IVA regime (4% / 10% / 22% / flat-rate), edits rows, and reviews margins. An AI agent (via ChatGPT's in-app browser or Chrome with WebMCP) operates the same quote through typed WebMCP tools: search_materials, get_line_items, add_line_item, update_line_item, remove_line_item, get_quote_summary, and a read-only suggest_improvement advisor. Every agent action applies live, is highlighted and auto-scrolled into view, and can be undone with one click. The Assistant activity panel explains every action in plain language — including what was asked and why it couldn't be done.
How we built it
A Next.js 14 / React / TypeScript app with Tailwind CSS. Tools are registered on document.modelContext.registerTool(...) (lib/webmcp-tools.ts), backed by a spec-compliant polyfill (lib/webmcp-polyfill.ts) so the app works in any browser. We implement granular permissions via real AbortSignal revocation, dynamic context-scoped registration, structured recoverable errors ({ code, error, recoverable, suggestions[] }), a user-facing activity feed (lib/activity-summary.ts), and per-line IVA with the Italian "beni di valore significativo" split (lib/vat.ts). We also expose a tool through the WebMCP Declarative API (a form the agent can pre-fill), demonstrating both APIs. Deployed on Vercel.
Challenges we ran into
Getting native WebMCP to activate on the deployed (HTTPS) origin — it's an Origin Trial, so the #enable-webmcp-testing flag alone isn't enough on Chrome Stable; we added the origin-trial token. Also making the activity log user-friendly (no tool names/JSON/timing) and ensuring the assistant is certain when a capability is turned off, instead of guessing from an error.
Accomplishments that we're proud of
- A complete, coherent product experience — not a proof of concept.
- Both WebMCP APIs (imperative + declarative) with genuine, non-trivial implementations.
- Granular permissions that really unregister tools from
document.modelContextviaAbortSignal. - Human-only finalization (
finalize_quoteis never a tool) + one-click undo. - Domain-accurate IVA per quote line (4/10/22% + significant-goods split + flat-rate).
What we learned
How WebMCP lets a web app declare structured tools so agents stop guessing, how Origin Trials gate native features on deployed origins, and how to design a human-in-the-loop experience that keeps the human in control without slowing the agent down.
What's next for Cantiere Live
More tools (batch discount, quote duplication), a quote history library the agent can search, deeper advisory capabilities (materials suggestion, margin coaching) and implement webMCP in our AiFatto app.
Built With
- ai-agent
- chrome
- html
- javascript
- next.js
- openai
- react
- tailwind-css
- typescript
- vercel
- w3c-webmcp
- webmcp
Log in or sign up for Devpost to join the conversation.