Oriel — AI & technology worth noticing, every day.

A Minimal WebMCP Demo in Chrome: Typed, Tested Headless, and Driven by an Agent

Post · https://dev.to/gde/a-minimal-webmcp-demo-in-chrome-typed-tested-headless-and-driven-by-an-agent-109e

One static page registers four WebMCP tools. A type check, a headless Chrome test and Google's webmcp-evals smoke runner verify them with no model and no API key. Driven by webmcp-extension with Gemini, the agent made every expected tool call in 20 of 20 conversations and quoted the page's own count.

First seen by Oriel on .

AI summary

The article walks through building and validating a small WebMCP to-do page in Chrome, then shows an agent completing scripted tasks through its registered tools.

  • The roughly 95-line page exposes three imperative tools and one HTML form tool; list_todos returns a filtered item count and is marked read-only.
  • webmcp-types 0.2.1 checks imperative handlers against their input schemas, while the form API needs declarations for SubmitEvent.agentInvoked and respondWith.
  • Headless Puppeteer tests pass 4/4, and webmcp-evals smoke tests pass 5/5 without a model or API key.
  • Using Gemini through webmcp-extension, the agent made every expected tool call in 20 of 20 conversations and quoted the computed open-item count in all five counting answers.
  • Chrome 158 returns readOnly rather than readOnlyHint, parses JSON output into objects, and exposes thrown messages through exception.description; denied write prompts prevented writes while read-only calls still ran.

#webmcp #chrome #puppeteer #llm agents

Generated by gpt-5.6-sol. Check the original for details.

Metric trends

Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained

Reactions

Total public reactions reported by the source; distinct from points and likes.

  • DEV Community: 34, latest observation ; +24 over observed period since

Comments

Comment count reported by the source.

  • DEV Community: 21, latest observation ; +19 over observed period since

Aliases

SourceExternal IDURL
DEV Community5147322https://dev.to/gde/a-minimal-webmcp-demo-in-chrome-typed-tested-headless-and-driven-by-an-agent-109e Read discussion