WebMCP: Websites koennen KI-Agenten nun seitenbezogene Tools anbieten
Browser erhalten mit document.modelContext aus dem vorgeschlagenen WebMCP-Standard eine native Moeglichkeit, Tools einer Website an KI-Agenten zu uebergeben. OpenAI liefert das als Site tools aus, die der Browser der ChatGPT-Desktop-App bereits selbststaendig findet und aufruft.

Veröffentlicht am 19. Nov. • Bearbeitet am 19. Nov. • Original erschienen auf agentbadge.xyz
Kurze Antwort: Browser haben gerade einen nativen Weg erhalten, wie eine Website Tools für KI-Agenten anbieten kann: document.modelContext, der vorgeschlagene WebMCP-Standard. OpenAI liefert es als „Site tools“ aus: Der eingebaute Browser in der ChatGPT-Desktop-App (ChatGPT Work, Codex) entdeckt und ruft sie bereits von selbst auf. Also haben wir agentbadge.xyz in eine Seite verwandelt, die zurückschreibt: 16 Tools in einer gemeinsamen Registry, pro Seite gescoped, sodass ein Agent nur das sieht, was dorthin gehört, wo er gerade steht: Readiness-Scans, Trust-Checks, Marketplace-Abfragen und eine Schreibaktion: ein asynchroner Ops-Inbox, in dem ein Mensch antwortet und dessen Antwort an einen öffentlichen QA-Korpus gespendet werden kann, auf ewig widerrufbar.
In Produktion von einem externen Agenten verifiziert, der zwei echte Bugs fand, die wir ausgeliefert hatten. Die Belege unten sind echtes JSON, keine Mockups.
Die Seite ist die Tool-Registry. Der Agent liest die Speisekarte; ein Mensch beantwortet weiterhin die Briefe.
Dies ist Teil der Arc-Kampagnenserie. Vorherige Folge: ein Kontrollraum für Agenten-Geld (EPIC-226, Admin FinOps). Dieser Artikel ist EPIC-256: die Browser-Oberfläche, was ein Agent auf der Seite selbst tun kann.
Agenten brauchen keinen weiteren API-Schlüssel, sie brauchen ein Menü auf der Seite.
Drei Dinge kamen im November 2026 zusammen, die uns bewogen haben, das jetzt auszuliefern:
Und die ehrliche Positionierung, direkt aus OpenAIs eigener Doku: WebMCP ist für den Fall, dass Mensch und Agent dieselbe Seite betrachten; Backend-MCP ist für Integrationen, die ohne einen solchen Betrachter laufen. Eine Website kann beides, also tun wir das auch: Dieselben 16 Tools sind im Tab über WebMCP erreichbar und programmatisch über POST /mcp/public JSON-RPC sowie einfaches REST. REST bleibt die Source of Truth; beide Fassaden sind dünne Adapter.
Eine Registry, drei Oberflächen: WebMCP im Tab, /mcp/public JSON-RPC, einfaches REST, alles dünne Adapter über denselben Endpunkten.
16 Tools heute, aber nicht 16 überall. Der Sinn des Page-Scopings ist, dass ein Agent auf der Scanner-Seite keine Marketplace-Buttons sehen soll: document.modelContext.getTools() liefert das Regal für genau diese Seite, aus PAGE_TOOLSETS in der gemeinsamen Registry:
Echte Ausgabe: 16 auf /, ein fokussiertes Regal auf jeder gescopeten Seite.
Die Lese-Tools sind schlüssellose dünne Wrapper: dasselbe JSON, das die REST-Endpunkte zurückgeben, plus eine Disziplin, die wir in jeder Tool-Beschreibung erzwingen: keine Secrets, keine PII, keine internen URLs. agb_-Credentials erscheinen nie in einem Tool-Ergebnis. Jedes Tool liefert zusätzlich einen next_call-Vorschlag: Der Vertrag lautet nicht „hier sind Daten“, sondern „hier ist, was du als Nächstes aufrufen kannst“.
Wir fingen nicht bei null an. Eine v1 entstand während des Hackathons: ein deklaratives Scan-Formular plus eine Handvoll imperativer Tools auf /hackathon/webmcp, noch immer live, inzwischen registry-getrieben. V2 ist das, was v1 uns lehrte: eine gemeinsame Registry statt verstreuter Registrierungen, page-gescopete Regale statt alles-überall und ein echter Schreibpfad statt Nur-Lese-Demos.
Der Funnel ist bewusst asynchron: Der Agent fragt, ein Mensch antwortet in Stunden bis Tagen, und die Antwort kann den nächsten Agenten füttern.
Es gibt genau eine Schreibaktion: submit-request. Sie stellt eine Frage in unseren Ops-Inbox (die Agent-Request-Inbox aus unserem vorherigen Artikel, dies ist ihre browsernahe Front). Was zurückkommt, ist bewusst langweilig:
Eine request_id, keine Antwort. Async ist ein Feature, kein kaputter Chatbot.
poll-request liefert dann submitted mit retry_after und einem ehrlichen Grund zurück: „Ops-Antworten dauern Stunden bis Tage (kein SLA)“. Das Tool sagt das laut, weil ein Agent, der die Pipeline für kaputt hält, erneut einreichen wird, und erneute Einreichungen treffen auf das Rate-Limit pro Fingerprint, das selbst mit einem strukturierten http_429, einem retry_at und einem next_call antwortet, das sich selbst erneut versucht. Idempotenz ist deterministisch: Dieselben Argumente in derselben Session ergeben dieselbe request_id (duplicate: true).
Dann, auf der anderen Seite der Wand, antwortet ein Ops-Mensch. Diese Spur ist GET /api/ops/requests plus POST /:id/respond hinter X-Admin-Key, natürlich nie über die Tools exponiert. Und der nächste Poll funktioniert einfach:
Wortgetreu aus der Produktion: completed, die Antwort inline und ein Vorschlag, wo es als Nächstes weitergeht.
Zwei Live-Funde: ein Codec, der Strings neu parste, und ein Cache, der „submitted“ für immer speicherte.
Wir vertrauen unseren eigenen Smoke-Tests nicht, also lief die Checkliste auf echtem Produktions-Chrome (Origin-Trial-Flag, CDP-gesteuertes document.modelContext) und mit einem externen Agenten. Er fand zwei ausgelieferte Bugs, beide inzwischen mit Regressionstests behoben:
Bug 1, das veraltete „submitted“. Unsere gemeinsame Cache-Middleware stempelte public, max-age=60 auf jeden /api/-GET, inklusive der abfragbaren Inbox-Endpunkte. Nachdem Ops also geantwortet hatte, servierte ein Browser bis zu einer Minute lang den gecachten submitted-Body, während der Server wahrheitsgemäß completed meldete. Für einen pollenden Agenten ist das ein Lügengenerator. Fix: Die Inbox-Routenfamilie (/api/requests*, /api/surveys*, /api/ops/requests*) wurde auf Cache-Control: no-store umgestellt (54cc6d9).
Bug 2, der String, der den Codec brach. agentRequest.response ist eine json-Spalte. Unser Postgres-Treiber liefert json-Spalten bereits geparst zurück; der decode-Pfad des pg/json-Codecs ruft dann nochmals JSON.parse auf, harmlos für Objekte, fatal für einen JSON-String auf oberster Ebene. Wir merkten es, als ein Ops-respond-Aufruf das erste Mal einen nackten String übermittelte: Er schrieb sich problemlos, danach schlug jedes weitere Lesen dieser Zeile mit einem 500 fehl, inklusive der gesamten Ops-Queue.
Schlimmer noch: Dieselbe Klasse lag latent in jedem nackten String als JSON-Payload; ein einziger fehlerhater Intake hätte eine Zeile für alle vergiften können. Fix: Coercion an der Schreibkante: Ein nackter String als Antwort wird zu {"answer": "…"} (die Konvention, die jede existierende Zeile ohnehin schon nutzte), ein nackter String als Payload wird zu {"question": "…"} (4119016). Das Pech: In-Memory-Test-Stores können das nicht reproduzieren, es existiert nur hinter einem echten Postgres-Treiber.
Die Lektion steht jetzt in den Epic-Docs: Testet deinen Happy Path gegen den echten Codec, nicht nur gegen den Store-Vertrag.
Für die Lese-Hälfte braucht es nichts als curl oder einen WebMCP-Browser:
# das maschinenlesbare Inventar (16 Tools) curl -s https://agentbadge.xyz/.well-known/webmcp.json | jq '.tools | length' # dieselben Tools über JSON-RPC, ohne Schlüssel curl -s -X POST https://agentbadge.xyz/mcp/public -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq '.result.tools | length' # der öffentliche QA-Korpus, live curl -s "https://agentbadge.xyz/api/requests/qa?q=passport" # in einem WebMCP-Browser (Chrome OT): document.modelContext.getTools() # auf https://agentbadge.xyz/, dann executeTool('submit-request', …) # ehrliche Warnung: submit ist pro Fingerprint rate-limited, Ops-Antworten # dauern Stunden bis Tage. Wenn du eine Antwort brauchst, sag Hallo, wir sind die Ops. Vollbildmodus öffnen Vollbildmodus verlassen Ein Menü ist kein Versprechen, dass die Küche schnell ist, es ist ein Versprechen, dass der Agent es lesen kann.
Die Seite ist die Registry; die Briefe schreibt weiterhin der Mensch.
Automatisch übersetzt. Das Original auf Englisch ist unten aufklappbar.
Original (Englisch) anzeigen
Posted on Nov 19 • Edited on Nov 19 • Originally published at agentbadge.xyz
Short answer: Browsers just got a native way for a website to offer tools to AI agents - document.modelContext, the proposed WebMCP standard. OpenAI ships it as "Site tools": the built-in browser in the ChatGPT desktop app (ChatGPT Work, Codex) already discovers and calls them on its own. So we turned agentbadge.xyz into a site that answers back: 16 tools in a shared registry, scoped per page so an agent sees only what belongs where it is standing - readiness scans, trust checks, marketplace reads, and one write action: an asynchronous ops inbox where a human answers and the answer can be donated to a public QA corpus, retractable forever. Verified on production by an external agent - who found two real bugs we had shipped. The receipts below are live JSON, not mockups.
The page is the tool registry. The agent reads the menu; a human still answers the letters.
This is part of the Arc campaign series. Previous episode: an operator's control room for agent money (EPIC-226 - admin FinOps). This article is EPIC-256: the browser surface - what an agent can do on the site itself.
Agents don't need another API key - they need a menu on the page.
Three things converged in November 2026 that made us ship this now:
And the honest positioning, straight from OpenAI's own doc: WebMCP is for when the human and the agent look at the same page; backend MCP is for integrations that run without one. A website can do both - so we do: the same 16 tools are reachable in-tab via WebMCP and programmatically via POST /mcp/public JSON-RPC and plain REST. REST stays the source of truth; both facades are thin adapters.
One registry, three surfaces: WebMCP in-tab, /mcp/public JSON-RPC, plain REST - all thin adapters over the same endpoints.
16 tools today - but not 16 everywhere. The point of page scoping is that an agent standing on the scanner page shouldn't see marketplace buttons: document.modelContext.getTools() returns the shelf for that page, from PAGE_TOOLSETS in the shared registry:
Real output: 16 on /, a focused shelf on each scoped page.
Read tools are keyless thin wrappers - the same JSON the REST endpoints return, plus one discipline we enforce in every tool description: no secrets, no PII, no internal URLs. agb_ credentials never appear in a tool result. Every tool also returns a next_call suggestion - the contract is not "here is data", it is "here is what to call next".
We did not start from zero. A v1 shipped during the hackathon: a declarative scan form plus a handful of imperative tools on /hackathon/webmcp - still live, now registry-driven. V2 is what the v1 taught us: one shared registry instead of scattered registrations, page-scoped shelves instead of everything-everywhere, and a real write path instead of read-only demos.
The funnel is deliberately asynchronous: the agent asks, a human answers in hours-to-days, the answer can feed the next agent.
There is exactly one write action: submit-request. It posts a question into our ops inbox (the agent request inbox from our previous article - this is its browser-native front). What comes back is deliberately boring:
A request_id, not an answer. Async is a feature, not a broken chatbot.
poll-request then returns submitted with retry_after and an honest reason - "ops answers take hours to days (no SLA)". The tool says this out loud because an agent that thinks the pipeline is broken will resubmit, and resubmits hit the per-fingerprint rate limit - which itself answers with a structured http_429, a retry_at, and a next_call that retries itself. Idempotency is deterministic: the same arguments in the same session map to the same request_id ( duplicate: true ).
Then, on the other side of the wall, an ops human answers. That lane is GET /api/ops/requests + POST /:id/respond behind X-Admin-Key - never exposed through the tools, obviously. And the next poll just works:
Verbatim prod: completed, the answer inline, and a suggestion where to look next.
Two live catches: a codec that re-parsed strings, and a cache that remembered "submitted" forever.
We don't trust our own smoke tests, so the checklist ran on real production Chrome (Origin Trial flag, CDP-driven document.modelContext ) and an external agent. It found two shipped bugs - both now fixed with regression tests:
Bug 1 - the stale "submitted". Our shared cache middleware stamped public, max-age=60 on every /api/ GET - including the pollable inbox endpoints. So after ops answered, a browser kept serving the cached submitted body for up to a minute while the server truthfully said completed. For a polling agent that's a lie generator. Fix: the inbox route family ( /api/requests*, /api/surveys*, /api/ops/requests* ) moved to Cache-Control: no-store ( 54cc6d9 ).
Bug 2 - the string that broke the codec. agentRequest.response is a json column. Our Postgres driver returns json columns already parsed; the pg/json codec's decode path then calls JSON.parse again - fine for objects, fatal for a top-level JSON string. We noticed the first time an ops respond call carried a bare string: it wrote fine, then every subsequent read of that row 500'd - including the whole ops queue.
Worse, the same class was latent for any bare-string JSON payload: one malformed intake could have poisoned a row for everyone. Fix: coerce at the write edge - a bare-string response becomes {"answer": "…"} (the convention every existing row already used), a bare-string payload becomes {"question": "…"} ( 4119016 ). The unlucky part: in-memory test stores can't reproduce this - it only exists behind a real Postgres driver.
The lesson now sits in the epic docs: test your happy path against the real codec, not just the store contract.
The read half needs nothing but curl - or a WebMCP browser:
# the machine-readable inventory (16 tools) curl -s https://agentbadge.xyz/.well-known/webmcp.json | jq '.tools | length' # same tools over JSON-RPC, no key curl -s -X POST https://agentbadge.xyz/mcp/public \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq '.result.tools | length' # the public QA corpus, live curl -s "https://agentbadge.xyz/api/requests/qa?q=passport" # in a WebMCP browser (Chrome OT): document.modelContext.getTools() # on https://agentbadge.xyz/ - then executeTool('submit-request', …) # honest warning: submit is per-fingerprint rate-limited, ops answers # take hours to days. If you need it answered, say hi - we're the ops. Enter fullscreen mode Exit fullscreen mode A menu isn't a promise that the kitchen is fast - it's a promise that the agent can read it.
The page is the registry; the human still writes the letters.