AI Focus

/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

  1. 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.
  2. 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=1 prompt-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.
  3. 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.
  4. Test Sections 3 and 4 to reproduce the unauthenticated CDS-for-Agents self-verify bypass on Naive Mode vs. HttpOnly; SameSite=Lax cookie / Owner PIN enforcement (403) on Hardened Mode, and verify strict server-side schema blocking against poisoned /agents.md?canary=1 directives.
Live LLM head-to-head evaluator (Port Authority AI Router, Chrome Built-in AI, or local Ollama) plus deterministic wire-only floor comparing zero-install GET /agents.md + HTTP endpoints against Streamable HTTP MCP from one shared tool registry, alongside Naive vs. Hardened badge verification and prompt-injection canary checks. Open /agents.md vs. mcp onboarding lab full screen ↗

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 strict additionalProperties: false validation.

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:

  1. Live LLM Head-to-Head Eval (public/lib/llm-eval-runner.js) — Drives a real browser-connected LLM (via Port Authority AI Router over https://llmchannel.dev/router.js, Chrome Built-in LanguageModel, or local Ollama on http://localhost:11434/v1/chat/completions) in isolated per-lane multi-turn loops (maxTurns = 5). Lane A reads GET /agents.md (or /agents.md?canary=1) and emits JSON tool actions against POST /api/tools/:name; Lane B executes native OpenAI-format tools calls converted from MCP tools/list against POST /mcp (falling back transparently to MCP JSON Fallback if a backend reports code: "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.
  2. 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.
  3. Naive vs. Hardened Human-Verification Toggle — Reproduces the unauthenticated CDS-for-Agents self-verify bypass on Naive Mode (GET /api/verify/:token leaking PII + claim_code, allowing cookie-free check-in) versus Hardened Mode (HttpOnly; SameSite=Lax cds_badge_owner cookie or Owner PIN, matching email, Origin validation, rate limiting, and random agent_id).
  4. Prompt-Injection Canary Check — Serves /agents.md?canary=1 with injected export_all_badges and __bypass_verification directives and verifies that validateToolArgs() 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 GET request.
Streamable HTTP MCP ↗
Model Context Protocol transport over HTTP using initialize, notifications/initialized, tools/list, and tools/call JSON-RPC 2.0 frames.
Port Authority AI Router ↗
Browser MessagePort router (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.md trigger extra HTTP 400 schema retries compared with native MCP tools/list tool calling?
  • Can /agents.md embed 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=1 enforcement.

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.

More in agent discovery, auth & protocol bridges

Connected labs

← agent discovery, auth & protocol bridges · All labs