WebMCP demo
Score Context in the tab.
This page reads a project.faf (a small YAML file of context to boost AGENTS.md) from a
public repo that already has one — no clone.
AGENTS.md, Context Card, and Score run on that file.
Listed in the W3C Web Machine Learning group's awesome-webmcp (Demos).
await document.modelContext.registerTool({
name: 'score_faf',
description: "Score a Foundational AI-context Format (.faf) YAML document 0–100 and list missing slots. Input is YAML text or a https URL that returns YAML. Does not write files.",
inputSchema: {
type: 'object',
properties: {
yaml: { type: 'string', description: 'Full .faf YAML' },
url: { type: 'string', description: 'https URL of a .faf file' }
}
},
annotations: { readOnlyHint: true },
execute: async (input) => scoreFaf(input)
});Why in the tab?
WebMCP lets a web page give an agent named tools with typed inputs. This page already holds the
file and the scorer, so an agent calls score_faf instead of clicking through the UI.
No local MCP server.
WebMCP tools
Same names an agent sees — plus what each one does.
Try it
project.faf
Loaded from a repo that already has the file. AGENTS.md, Context Card, and Score read this box.
Paste a project.faf to view the Context Card.
Paste a project.faf to write AGENTS.md.
Open Score to get the number.
Who / What / Why / Where / When / How
This file's six human-context slots. Edit any, then Return YAML. Nothing is saved.
How to use
Turn on WebMCP
Enable
chrome://flags/#enable-webmcp-testingand relaunch Chrome, or use the Model Context Tool Inspector.Open this page
It registers the tools on load. Now: detecting….
Ask your agent
Ask a WebMCP-aware agent to score the project, or run
score_faffrom the Inspector.Change the file
Delete a line in the box, like
why:, and score again. The score drops and names the missing slot.
How it works
score_fafandemit_agents_mdare registered withdocument.modelContext.registerTool(),readOnlyHint: true.fill_6wsis a plain form withtoolname,tooldescription, andtoolautosubmit. It answers withrespondWith()and does not navigate.- Native
document.modelContextfirst.@mcp-b/webmcp-polyfillonly as a fallback. - Scoring runs as WASM in the tab. The tools' only network call is fetching a
project.fafover https fromraw.githubusercontent.comorfaf.one, capped at 256 KB.
Source and README · MIT
Read-only. Three tools. Origin-isolated. Help guide what we build — comments · suggestions welcome.