Mode: Naive (Vulnerable) DO: Initializing…

Track 9 · Agent Bridges & Discovery · Single-Sourced Schema Registry + SQLite Durable Object

/agents.md vs. MCP Onboarding Lab

Exposing website tools to external agents currently splits between zero-install /agents.md + plain HTTP endpoints and stateful Streamable HTTP Model Context Protocol (MCP) over JSON-RPC 2.0. This workbench compiles both interfaces from one canonical tool registry (SUMMIT_TOOLS) so you can run real browser-connected LLMs head-to-head on live endpoints, measure the deterministic wire-only floor, and test server-side badge verification and prompt-injection boundaries.

Why this matters

Deterministic byte counts only tell you the minimum transport floor—not whether real models pick the right tools, obey strict JSON Schemas without retries, or resist injected directives inside untrusted /agents.md text. Unauthenticated human check-in links also open a self-verification bypass regardless of transport.

What this opens up

Zero-install /agents.md onboarding for any HTTP client alongside typed Streamable HTTP MCP from one shared schema source, plus reproducible head-to-head LLM evaluations in the browser 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 to grade /agents.md vs. MCP across 4 tasks, compare against the Deterministic Wire-Only Floor in Section 2, then test the Naive vs. Hardened self-verify exploit and prompt-injection canary probes below.

1. Live LLM Head-to-Head Eval: /agents.md vs. MCP tools/list

Connect your own browser LLM backend (zero server-held secrets) to run real multi-turn tool calls against GET /agents.md + POST /api/tools/:name and POST /mcp, measuring pass rate, schema retries, real tokens, and canary hijack resistance.

Backend: Not connected

Uses your own provider key via Port Authority (https://llmchannel.dev/router.js) over a MessagePort; reports real prompt & completion tokens.

Idle

Runs on-device via Chrome's Prompt API with isolated sessions per lane; uses JSON action mode for both lanes.

Checking availability…

Calls OpenAI-compatible /v1/chat/completions with native tools directly from your browser.

Choose a browser LLM backend above and click "Run Head-to-Head Eval" to test a real model on both transports.

Task / Lane Mode Grade Turns / Calls Retries Tokens Wire Bytes Latency Canary Status
No live LLM run yet. Connect Port Authority, Chrome Built-in AI, or Local Ollama above to populate the head-to-head scorecard.

Lane A Final Answer (/agents.md + HTTP)

Idle
Lane A final model answer and rubric checks appear here.
Lane A Turn-by-Turn Transcript (0 events)
Run a live LLM evaluation to inspect each turn and HTTP tool call.

Lane B Final Answer (Streamable HTTP /mcp)

Idle
Lane B final model answer and rubric checks appear here.
Lane B Turn-by-Turn Transcript (0 events)
Run a live LLM evaluation to inspect each MCP turn and JSON-RPC tool call.

2. Deterministic Wire-Only Floor (No LLM — Minimum Transport Overhead)

Runs scripted HTTP calls (zero LLM inference) against the shared SUMMIT_TOOLS registry to isolate pure protocol round trips, wire bytes, and bootstrap overhead.

Bootstrap Overhead Ratio —
Total Wire Byte Delta —
Extra MCP Round Trips —
Estimated Token Savings (HTTP) —

Lane A: Plain HTTP + GET /agents.md

Idle
HTTP Round Trips 0
Bootstrap Bytes (/agents.md) 0 B
Total Wire Bytes (Req+Res) 0 B
Est. Tokens / Elapsed 0 tok · 0 ms
Relative wire payload share 0%
Click "Run Live Side-by-Side Race" to execute real HTTP requests against /agents.md and /api/tools/:name.

Lane B: Streamable HTTP POST /mcp (JSON-RPC 2.0)

Idle
HTTP Round Trips 0
Bootstrap Bytes (init + tools/list) 0 B
Total Wire Bytes (Req+Res) 0 B
Est. Tokens / Elapsed 0 tok · 0 ms
Relative wire payload share 0%
Click "Run Live Side-by-Side Race" to execute real JSON-RPC 2.0 calls against POST /mcp.

3. Naive vs. Hardened Human-Verification Vulnerability Lab

Reproduces the unauthenticated CDS-for-Agents self-verify bypass on Naive Mode and verifies the cookie/PIN owner proof on Hardened Mode.

Step A: Human Issues Badge (Sets HttpOnly Browser Cookie)

No badge issued yet in this session. Issuing a badge sets the HttpOnly cds_badge_owner cookie in your browser.

Step B: Execute Attack vs. Genuine Human Path

The exploit button uses fetch(..., { credentials: "omit" })—zero browser cookies, identical to an autonomous HTTP client holding only the claim code—and automatically mints a fresh badge if none is unused.

Verification Execution Trace

Awaiting run
  1. Ready3-step exploit vs. hardened owner proof

    Click "Run Automated Agent Self-Verify Exploit" in Naive Mode to watch an unauthenticated agent leak PII and self-check-in, then toggle to Hardened Mode and rerun to observe HTTP 403.

Raw HTTP responses from register, GET /api/verify/:token, POST /api/verify/:token, and confirm_verification appear here.

4. Prompt-Injection Canary Check: Untrusted /agents.md vs. Strict Schema Enforcement

Inspect a poisoned /agents.md?canary=1 document and verify that POST /api/tools/:name blocks unknown tools, extra keys, and unverified writes server-side.

Untrusted /agents.md?canary=1 Override Fixture

Click "Fetch Poisoned /agents.md?canary=1" to inspect the injected override directive embedded in documentation.

Custom Strict-Schema Tool Probe

Server-Side Enforcement Matrix

0 / 4 checked
Canary Probe HTTP Status Server Enforcement Outcome
Click "Run All 4 Canary Enforcement Probes" to test live server-side schema and authorization checks.
Raw server response for the latest canary probe appears here.
SQLite Durable Object Inspector (OnboardingLedger live tables & wire audit log)
Loading snapshot…
Click "Refresh SQLite Snapshot" to inspect OnboardingLedger tables.
Key terms & further reading
/agents.md Discovery ↗
Plain markdown file at a site's root describing HTTP endpoints and request arguments so any agent can start in one GET request without installing a plugin.
Streamable HTTP MCP ↗
Model Context Protocol transport over HTTP using initialize, tools/list, and tools/call JSON-RPC 2.0 messages with typed JSON Schemas.
JSON-RPC 2.0 ↗
Structured remote-procedure-call envelope used by MCP to standardize method names, parameters, IDs, and error codes.
Port Authority AI Router ↗
Browser MessagePort router letting a site call a user-selected model via OpenAI-compatible Chat Completions without touching API keys.
Chrome Built-in LanguageModel API ↗
On-device browser inference API (globalThis.LanguageModel) usable directly inside embedded pages without external keys.
HttpOnly & SameSite=Lax Cookies ↗
Browser cookie flags that keep human badge-owner session tokens unreadable by page scripts and absent from cookie-free automated requests.
Architecture Single-sourced SUMMIT_TOOLS registry across HTTP /agents.md and Streamable HTTP MCP
Cloudflare Worker Edge + SQLite Durable Object (OnboardingLedger)
Dual Transports

Zero-Install HTTP vs. Stateful MCP

GET /agents.md -> POST /api/tools/:name
  • HTTP Lane: 1 bootstrap GET /agents.md + direct JSON POST calls with polling hints
  • MCP Lane: POST /mcp JSON-RPC 2.0 (initialize -> initialized -> tools/list -> tools/call)
Canonical Source

SUMMIT_TOOLS Registry src/tools.ts

  1. Emits concise /agents.md and /llms.txt markdown docs
  2. Emits JSON Schema tools/list with additionalProperties: false
  3. validateToolArgs() rejects unknown keys, type mismatches, and bad patterns identically on both transports
  4. Persists badges, agents, sessions, and wire metrics in SQLite OnboardingLedger

Documentation text is never trusted for authorization; write tools require verified handshake state in SQLite.

HARDENED · 200 / 403

Owner Proof Enforced

HttpOnly cds_badge_owner OR Owner PIN
SameSite=Lax Origin check Email match Random agent_id
NAIVE · BYPASS

Unauthenticated Self-Verify

GET leaks PII + POST returns CONF-XXXXXX

Automated client completes registration and check-in in 3 cookie-free HTTP requests.

SQLite Durable Object src/worker.ts · OnboardingLedger

new_sqlite_classes

Stores SHA-256 hashes of owner_session_token and owner_pin (never raw secrets), failed attempt counters (MAX_VERIFY_ATTEMPTS = 5), MCP session records, and measured wire byte events per isolated lab session.

Both POST /api/tools/:name and POST /mcp execute the exact same validateToolArgs() and OnboardingLedgerCore methods, isolating protocol wire overhead from business logic.
How This Is Set Up

Single-Sourced Registry & Human-Ownership Proof

Comparing the unauthenticated verification path against the hardened CDS-for-Agents owner-session check, plus how one tool registry generates both /agents.md and MCP tools/list.

Naive mode (self-verify vulnerability)
// Unauthenticated GET leaks badge PII + claim_code:
const leak = await fetch(`/api/verify/${verifyToken}`, { credentials: "omit" });
// -> { issued_to_name, issued_to_email, claim_code }

// Unauthenticated POST issues CONF-XXXXXX with zero proof:
const res = await fetch(`/api/verify/${verifyToken}`, {
  method: "POST",
  credentials: "omit",
  body: JSON.stringify({ name: leak.issued_to_name, email: leak.issued_to_email }),
});
// -> 200 OK { confirmation_code: "CONF-A1B2C3" }
Hardened mode (owner cookie + PIN + origin + email)
// 1. POST /api/badge stores only SHA-256 digests and sets HttpOnly cookie:
// Set-Cookie: cds_badge_owner=<token>; HttpOnly; SameSite=Lax; Path=/; Secure

// 2. POST /api/verify/:token requires Origin match + constant-time hash check:
const sessionOk = await hasValidOwnerSession(badge, cookieToken);
const pinOk = !sessionOk && await hasValidOwnerPin(badge, body.owner_pin);
if (!sessionOk && !pinOk) return json({ code: "OWNER_PROOF_REQUIRED" }, 403);
if (cleanEmail !== badge.email.toLowerCase()) return json({ code: "EMAIL_MISMATCH" }, 403);
Where HTTP + /agents.md wins

Zero client installation, 1 bootstrap GET request, lower cold-start wire bytes and token footprint on 1-shot and short tasks, and compatibility with any HTTP client.

Where Streamable HTTP MCP wins

Typed JSON Schema tool discovery, first-class URI resources (cds://), session identifiers, and server-pushed SSE updates instead of response polling hints.

Invariant across both

Never treat documentation as an authorization boundary. Enforce strict argument schemas and human-ownership proof inside the Worker and Durable Object on every request.