Practical AI logo

Practical AI

Archives
Log in
Subscribe
September 3, 2026

WebMCP: three tools that make a Rails app agent-ready

This week I wire WebMCP into a production Rails app so a browser agent can call three page-level tools instead of guessing at the UI. Plus what OpenAI's Codex demo gets right about tool descriptions, Shopify's tiny-model flywheel, and the open-source pipeline editor behind it.

This week's video

A browser agent landing on your web app today has two options. It can parse your DOM and guess what the markup means, or it can drive the page from screenshots. Both are slow, both burn tokens, and both break the day you ship a redesign. The usual fix is to build a separate MCP server for agents, which means hosting it, versioning it, building OAuth for it, and re-implementing session state your frontend already has.

WebMCP is a proposed browser API that removes that middle layer. The page registers typed tools with document.modelContext.registerTool, the browser holds the registry, and a browser-integrated agent calls them by name and schema. Each tool's execute callback runs in the page, in the user's existing session, so the human and the agent are looking at the same screen.

In the video I wire this into CreatorSignal, a production Rails app of mine that validates YouTube video ideas. Three tools: list the signed-in user's channels (read-only), submit a video idea (the same code path the form uses), and poll the async validation job. Then I hand the whole workflow to Codex and let it submit the idea for this exact video and read back the Go, Refine, or Kill verdict. The Rails backend still owns auth, ownership checks, quotas, and validation. WebMCP removes one integration layer. It does not move the security boundary.

WebMCP: How to Make Your Site Agent-Ready Without the Middleware

Watch the video →

Resources mentioned:

  • WebMCP draft spec (a Draft Community Group Report, not a W3C Standard)
  • WebMCP repo and explainer
  • Chrome WebMCP origin trial
  • Chrome's agent-ready developer toolkit
  • CreatorSignal

The written companion

The blog post goes deeper on the parts the video moves through quickly: the four-part anatomy of a tool, why readOnlyHint and untrustedContentHint matter, and the five questions I ask per capability to decide between WebMCP, a dedicated MCP server, or both. It also has the status table (Chrome 149+ origin trial, ChatGPT's desktop browser and Codex shipping "Site tools" since August 25, Shopify's storefront tools on by default since August 5) and the caveats I'd weigh before building on a moving proposal.

Read: WebMCP: Make Your Site Agent-Ready Without a Separate MCP Server →


The model is the customer

OpenAI's launch demo for WebMCP in Codex is two minutes long and worth the time. Eric Provencher builds a 3D modeling site that Codex can drive. His framing: "Codex is your customer. It's the one using the tools, not the user."

Three of the four parts of a WebMCP tool (name, description, input schema) exist for the model to read, not the user. A description you'd write for API docs is not the same as one a model can act on. The model needs to know when to reach for the tool, what the side effects are, and what it gets back. The polling tool in my demo only works because the submit tool's description says validation is async and returns an id to check on.

Provencher's advice is to dogfood with the agent that will use the tools. Run a real task, ask the agent what confused it, trim the toolset, and rewrite descriptions until it stops taking detours. He also registers a feedback tool so Codex can flag problems as it works. That's the cheapest eval loop you'll ever build for a tool surface. The customer tells you what's wrong in plain English.

Watch: Build agent-ready sites with WebMCP (OpenAI, 2 min) →


Curated Links & Tools

Tobi Lütke on Shopify's tiny-model flywheel — Shopify enabled WebMCP on every Liquid storefront last month. This week Tobi posted the other end of the same bet: a fine-tuned Qwen3.5-0.8B beating GPT-5.6-sol at xhigh reasoning on a judge-scored buyer-profile task. The chart is the interesting part. The 0.8B student went from 75.3 to 84.6 in one week (July 23 to July 30) as the training set grew from 29K to 54K samples, passing the frontier teacher at 83.0. The system prompt went from 9.1K tokens written out to 1.1K gist tokens, and throughput went from 2M to 72M profiles a day on 100 H100s. The model isn't the asset here. The flywheel is: a judge grounded in human labels, a frontier teacher generating samples, and a loop that retrains as production data comes in. Shopify has published the methodology in its Model Optimization Flywheel talk at ICML and the gisting write-up. If you have one narrow, high-volume task with a frontier model in the hot path, this is the playbook for getting it out.

Tangle — Shopify ML's open-source visual pipeline editor, built on Alexey Volkov's Cloud Pipelines backend. Drag-and-drop graphs of containerized components in any language, with content-based execution caching so a pipeline re-run only recomputes what changed. It's the unglamorous half of a flywheel like the one above: the plumbing that turns "retrain weekly on new production samples" from a notebook someone runs by hand into a pipeline anyone on the team can clone and run. There's a live playground if you want to try it before installing anything.


Quick Hits

  • The WebMCP Challenge closes September 3 at 1:00 pm PDT. OpenAI's hackathon, co-sponsored by Google Chrome, Cloudflare, Vercel, Shopify, Render, and Netlify. $35K across ten winners, and over 6,000 participants registered. Even if you don't submit, the submissions will be the largest collection of non-trivial WebMCP tool designs anywhere.
  • claude-code-workflows 2026.08.27 — codebase-readiness v1.8.0 now detects and scores regression-aware quality gates, assigning a Gate Maturity Level from L0 to L4. Top-band credit requires CI that blocks new debt, not report-only tooling. agent-ready v1.5.0 adds a quality-gates mode that installs report, check, and baseline commands with merge-base-aware CI. Baselines require a written reason and a human --approve. Agents never bless debt. This is Greg Wilson's "own the check" from last issue, made installable. Release notes →

Which capability in your app would you expose to an agent first, and would you reach for WebMCP, an MCP server, or both? Reply and tell me.

If you're working out how your product should meet AI agents, whether that's WebMCP tools, an MCP server, or the service layer that backs both, that's the architecture decision I help teams make. Here's how I help →

Damian

Don't miss what's next. Subscribe to Practical AI:
Older → Scheduling a Mastra agent: the model writes the report, code posts it

Add a comment:

Posting this comment will subscribe you to this newsletter with the email address you enter.
Website
YouTube
Twitter
Powered by Buttondown, the easiest way to start and grow your newsletter.