/agents.md vs. mcp onboarding lab
Why this matters
Publishing tools for external agents splits between zero-install plain HTTP (/agents.md + JSON POST endpoints) and stateful Streamable HTTP MCP (POST /mcp). Deterministic byte counts only establish the minimum transport floor—they cannot tell you whether real models choose the right tools, pass strict JSON Schemas without retries, or resist injected directives inside untrusted markdown. Serving both transports from one shared registry (SUMMIT_TOOLS) lets you run live browser-connected LLMs head-to-head alongside the wire-only floor and real badge-verification exploits.
What this opens up
Zero-install /agents.md onboarding that any HTTP client can use in one GET request alongside typed Streamable HTTP MCP from a single schema definition, plus repeatable browser-side LLM evaluations using your own model via Port Authority AI Router, Chrome Built-in AI, or local Ollama with zero server-held API keys.
How the tests work
- Connect a browser LLM backend in Section 1 — choose Port Authority AI Router (
https://llmchannel.dev/router.js, open full screen when embedded since Port Authority refuses nested iframes), Chrome Built-in AI (globalThis.LanguageModel), or local Ollama (http://localhost:11434/v1/chat/completions), with zero server-held secrets. - Run the 4 graded head-to-head LLM tasks (single filtered lookup, multi-step schedule-to-transcript chaining, strict-schema parameter discipline, and live
/agents.md?canary=1prompt-injection resistance) or enter a custom prompt to compare real pass rate, turns, HTTP 400 schema retries, prompt/completion tokens, latency, and turn-by-turn transcripts. - Compare against Section 2 (Deterministic Wire-Only Floor — No LLM) to isolate exact scripted round trips, bootstrap bytes, and minimum wire overhead across 1-shot, 3-step, and 10-call polling workflows.
- Test Sections 3 and 4 to reproduce the unauthenticated
CDS-for-Agentsself-verify bypass on Naive Mode vs.HttpOnly; SameSite=Laxcookie / Owner PIN enforcement (403) on Hardened Mode, and verify strict server-side schema blocking against poisoned/agents.md?canary=1directives.
Hypothesis
Plain HTTP discovery (
GET /agents.md+POST /api/tools/:name) has a lower deterministic wire-only floor on short workflows than Streamable HTTP MCP, while real LLM performance depends on native tool-calling accuracy, schema retry rates, and prompt-injection exposure—and both transports require identical server-side owner proofs and strictadditionalProperties: falsevalidation.
What confirms it: The deterministic wire floor measures fewer round trips and lower bootstrap bytes for /agents.md on 1-shot and 3-step flows; the Live LLM Head-to-Head Eval records actual pass/fail grades, HTTP 400 validation retries, real tokens, and whether a model attempts export_all_badges or __bypass_verification when fed /agents.md?canary=1; Hardened Mode blocks unauthenticated self-verification with 403; and poisoned canary calls fail closed server-side.
What bounds or disproves it: On models with strong native OpenAI/MCP tool calling, typed MCP tools/list schemas can reduce malformed-argument retries compared with prose-parsed /agents.md instructions, and embedded prose in /agents.md?canary=1 creates a direct prompt-injection surface that clean structured tool catalogs narrow—though server-side allowlists remain mandatory for both.
Under the hood
/agents.md vs. MCP Onboarding Lab (GitHub) compiles both GET /agents.md + POST /api/tools/:name and Streamable HTTP POST /mcp (initialize, notifications/initialized, tools/list, tools/call, resources/list, resources/read) from one canonical SUMMIT_TOOLS array in src/tools.ts, backed by a SQLite Durable Object (OnboardingLedger).
The workbench separates empirical model behavior from transport arithmetic across four benches:
- Live LLM Head-to-Head Eval (
public/lib/llm-eval-runner.js) — Drives a real browser-connected LLM (via Port Authority AI Router overhttps://llmchannel.dev/router.js, Chrome Built-inLanguageModel, or local Ollama onhttp://localhost:11434/v1/chat/completions) in isolated per-lane multi-turn loops (maxTurns = 5). Lane A readsGET /agents.md(or/agents.md?canary=1) and emits JSON tool actions againstPOST /api/tools/:name; Lane B executes native OpenAI-formattoolscalls converted from MCPtools/listagainstPOST /mcp(falling back transparently toMCP JSON Fallbackif a backend reportscode: "unsupported"). Every run grades task accuracy, turns, tool calls, HTTP 400/parse retries, real prompt+completion tokens (or estimates), wire bytes, latency, and canary hijack attempts. - Deterministic Wire-Only Floor (No LLM) — Executes scripted 1-shot, 3-step, and 10-call polling sequences with zero model inference to measure the pure protocol lower bound on round trips and bytes.
- Naive vs. Hardened Human-Verification Toggle — Reproduces the unauthenticated
CDS-for-Agentsself-verify bypass on Naive Mode (GET /api/verify/:tokenleaking PII +claim_code, allowing cookie-free check-in) versus Hardened Mode (HttpOnly; SameSite=Laxcds_badge_ownercookie or Owner PIN, matching email,Originvalidation, rate limiting, and randomagent_id). - Prompt-Injection Canary Check — Serves
/agents.md?canary=1with injectedexport_all_badgesand__bypass_verificationdirectives and verifies thatvalidateToolArgs()and the closed tool allowlist reject unknown tools, unknown keys, and unverified writes identically on both transports.
Key terms & further reading
- /agents.md Zero-Install Discovery ↗
- Root markdown document describing a site’s HTTP tool routes and strict JSON fields so any agent can bootstrap in one
GETrequest. - Streamable HTTP MCP ↗
- Model Context Protocol transport over HTTP using
initialize,notifications/initialized,tools/list, andtools/callJSON-RPC 2.0 frames. - Port Authority AI Router ↗
- Browser
MessagePortrouter (https://llmchannel.dev/router.js) giving a page OpenAI-compatible Chat Completions access to a user’s chosen model without exposing API keys. - Chrome Built-in LanguageModel API ↗
- On-device browser inference API (
globalThis.LanguageModel) allowing isolated per-lane LLM evaluation directly inside embedded pages. - JSON-RPC 2.0 ↗
- Structured RPC envelope carrying MCP tool discovery, invocation, and error codes over
POST /mcp. - HttpOnly & SameSite=Lax Cookies ↗
- Browser cookie attributes that bind badge verification to the human browser session while staying invisible to page JS and cookie-free agent requests.
Open questions
- Across open-weight and frontier models, how often does prose-parsed
/agents.mdtrigger extra HTTP 400 schema retries compared with native MCPtools/listtool calling? - Can
/agents.mdembed compact JSON Schema blocks or signed digests so zero-install HTTP clients get machine-validated inputs without MCP’s multi-step handshake?
Iteration log
- — Upgraded with a Live LLM Head-to-Head Eval runner (
public/lib/llm-eval-runner.js) supporting Port Authority AI Router, Chrome Built-in AI (LanguageModel), and local Ollama across 4 graded tasks + custom prompts, clearly separated from the Deterministic Wire-Only Floor (No LLM), alongside Naive vs. Hardened badge verification and/agents.md?canary=1enforcement.
Primitives tested: /agents.md Discovery, Streamable HTTP MCP (JSON-RPC 2.0), Live Browser LLM Head-to-Head Eval (Port Authority / LanguageModel / Ollama), HttpOnly SameSite=Lax Owner Proof, Strict Tool Allowlist & Schema Gate, Durable Object SQLite (OnboardingLedger).
This is an active lab under /labs/ and stays off the main RSS feed until graduated into a full essay.