SP SpecPulse AI v6.0
SpecPulse AI / AI Search, /llms.txt & MCP Guides

Deploy Stateless MCP 2026-07-28 on Hono + Cloudflare Workers with Write-Replay Idempotency & 20M Log-Cap Sampling

Deploy Stateless MCP 2026-07-28 on Hono + Cloudflare Workers with OpenAI Responses API write-replay idempotency and Dec 1, 2026 20M log-cap smart sampling.

● Live Inline 5-Axis Diagnostic + Instant 1-Click $9 / $19 / $29 / $99 Unlock Zero Redirect Bounce β€’ Apple Pay / Google Pay / Link β€’ No Subscription Required

Scan Your Website AI-Readiness Inline (0–100)

Enter your domain to inspect live /llms.txt, ACP/UCP & MCP 2026-07-28 blockers right here on this pageβ€”and unlock your compiled 7-file bundle + git apply .patch in 1 click.

βœ“ Zero dev tickets (60s 1-line embed.js) βœ“ Zero CWV / SEO speed impact βœ“ Works on Shopify, WordPress, Webflow & Next.js

Production Route Metadata (LP28 β€” SpecPulse AI v3.4.0, Sprint #8)

Metadata FieldProduction Value
Canonical Slug/hono-cloudflare-workers-stateless-mcp-2026-07-28-edge
SEO Title (60 chars)`Hono Cloudflare Workers Stateless MCP 2026-07-28 \SpecPulse`
Meta Description (155 chars)Deploy Stateless MCP 2026-07-28 on Hono + Cloudflare Workers with OpenAI Responses API write-replay idempotency and Dec 1, 2026 20M log-cap smart sampling.
Target Keywordshono cloudflare workers mcp server, stateless mcp 2026-07-28 cloudflare workers, mcp idempotency guard workers
Release Versionhttps://specpulse.dev/cli.mjs & specpulse/action@v3.4 (2026-11-18)

Edge-Native Hono + Workers Quickstart (5 Seconds β€” Free $0 Sandbox, Pro $29/mo or $290/yr Save 2 Months, Team $99/mo or $990/yr)

Compile your OpenAPI spec or Hono routes into a zero-session hono cloudflare workers mcp server speaking stateless mcp 2026-07-28 cloudflare workers, hardened with mcp idempotency guard workers middleware and December 1, 2026 observability log-cap protection:

curl -fsSL https://specpulse.dev/api/v1/scan?url=https://yourdomain.com
curl -fsSL https://specpulse.dev/cli.mjs -o specpulse.mjs && node specpulse.mjs ./openapi.json

Direct Self-Serve Activation & Stripe Checkout CTAs:

Three Production Risks Hitting Cloudflare Workers MCP Servers in Late 2026

  • Legacy Stateful SSE & Durable Object Overhead vs. Stateless MCP 2026-07-28: Protocol versions 2024-11-05 through 2025-11-25 forced Workers teams to wire Durable Objects just to track Mcp-Session-Id headers and standalone GET SSE streams. Revision 2026-07-28 of the MCP Streamable HTTP specification (SEP-2575) eliminates protocol-level sessions and standalone GET streams (405 Method Not Allowed), shifting to per-request POST /mcp with mandatory Origin validation (403 Forbidden), POST server/discover, and mirrored HTTP headers (MCP-Protocol-Version, Mcp-Method, Mcp-Name, Mcp-Param-* validated with -32020 HeaderMismatch). Using @modelcontextprotocol/hono (createMcpHonoApp) and @modelcontextprotocol/server (createMcpHandler), Hono passes c.req.raw directly to handler.fetch on Cloudflare Workers with zero Node.js shims.
  • OpenAI Responses API Native MCP Duplicate Write Replays (Nov 16, 2026): When an OpenAI Responses API MCP tool resumes an approved mcp_approval_request (approve: true) and continues with a hosted programmatic read in the same response turn, the client loop can dispatch write -> read -> write β€” executing two distinct HTTP POST /mcp writes carrying the identical approval_request_id and arguments while reporting to the user that the write ran once (OpenAI Developer Community Bug #1416736). Without edge idempotency enforcement, stateless Workers create duplicate invoices, orders, or webhooks.
  • Cloudflare December 1, 2026 Observability Pricing & the 20M Log-Event Cliff: Under Cloudflare Workers Logs pricing and Workers Platform Pricing, Workers Paid ($5/mo) includes 20,000,000 log events per month (+$0.60 per additional million, 7-day retention), and beginning December 1, 2026, Free, Pro, and Business accounts transition automatically to Cloudflare Observability pricing (50 GB shared ingestion + 10 GB-month storage on Paid; 0.5 GB/day hard stop on Free). Setting naive head_sampling_rate: 0.1 in wrangler.jsonc drops 90% of 500 errors and silent JSON-RPC isError: true tool failures, whereas head_sampling_rate: 1 burns 2 events per MCP call (1 invocation log + 1 structured console.log) and blows past 20M events at just 10M monthly requests.

Before vs. After: Vanilla Workers MCP vs. SpecPulse v3.4 Edge Bundle

Edge Architecture LayerUnhardened Hono / Legacy Workers MCPSpecPulse v3.4 (--framework hono-workers)
Transport & State CostStateful Durable Objects for Mcp-Session-Id + initializeZero-DO Stateless MCP 2026-07-28 via @modelcontextprotocol/hono ($5/mo Workers Paid)
Header & DNS Rebinding SecurityUnchecked Origin / Host or unvalidated Mcp-Name headerscreateMcpHonoApp({ allowedHosts }) 403 guard + strict -32020 HeaderMismatch validation
Duplicate Write Replay GuardExecutes write -> read -> write twice (OpenAI Bug #1416736)RFC 8941 Structured String Idempotency-Key (400/409/422) + KV approval_request_id replay cache
Dec 1, 2026 Log-Cap TelemetryEither 100% logging (overage bill) or blind head_sampling_rate: 0.1 (loses 90% of errors)Differential Outcome Sampling: 10% on healthy 200 OK, 100% on 4xx/5xx & JSON-RPC isError: true
Agent Discovery SurfaceBare /mcp endpoint with zero domain discoveryBundled /llms.txt v2, Lighthouse ard.json v0.91, SEP-2127 /mcp/server-card, & SKILL.md
OAuth 2.1 & Recon DefenseRaw .map files deployed; unverified token audiencesCloudflare MCP OAuth 2.1 pass-through + .map & secret scrubbing (GTIG Q4 2026)

Production Hono + Cloudflare Workers Implementation (src/index.ts & wrangler.jsonc)

SpecPulse v3.4 generates a single-file edge gateway using official MCP TypeScript SDK v2 packages (Serve with Hono β€” MCP TypeScript SDK), keeping the explicit c: Context type annotation required so c.get('parsedBody') compiles cleanly under strict TypeScript:

import { createMcpHonoApp } from "@modelcontextprotocol/hono";
import { createMcpHandler, McpServer } from "@modelcontextprotocol/server";
import type { Context } from "hono";
import * as z from "zod/v4";
import {
  withMcpWriteIdempotencyGuard,
  emitDifferentialWorkerLog,
  registerDiscoveryRoutes,
} from "./generated/specpulse-edge-v34";

export interface Env {
  IDEMPOTENCY_KV: KVNamespace;
  ALLOWED_PUBLIC_HOST: string;
}

// 1. Stateless per-request MCP 2026-07-28 server factory (zero Durable Objects)
const mcpHandler = createMcpHandler(() => {
  const server = new McpServer({ name: "acme-edge-mcp", version: "3.4.0" });

  server.registerTool(
    "orders_create",
    {
      description: "Create a customer order with strict RFC 8941 write-replay idempotency",
      inputSchema: z.object({
        sku: z.string(),
        quantity: z.number().int().positive(),
        idempotency_key: z.string().min(16),
      }),
    },
    async ({ sku, quantity, idempotency_key }, ctx) => ({
      content: [
        {
          type: "text",
          text: JSON.stringify({ orderId: `ord_${idempotency_key.slice(0, 12)}`, sku, quantity, actor: ctx.http?.authInfo?.clientId ?? "verified" }),
        },
      ],
    })
  );

  return server;
});

// 2. Host & Origin DNS-rebinding protection bound to production edge hostname
const app = createMcpHonoApp({
  host: "0.0.0.0",
  allowedHosts: ["mcp.acme.dev"],
});

// 3. Serves /llms.txt (<=50KB), /.well-known/ard.json (v0.91), /mcp/server-card (SEP-2127), and /.well-known/skills/index.json
registerDiscoveryRoutes(app);

// 4. Stateless POST /mcp with OpenAI write-replay guard + Dec 1, 2026 10%/100% differential log sampler
app.post("/mcp", async (c: Context<{ Bindings: Env }>) => {
  const startMs = Date.now();
  const parsedBody = c.get("parsedBody");

  const response = await withMcpWriteIdempotencyGuard(
    c.req.raw,
    parsedBody,
    c.env.IDEMPOTENCY_KV,
    () => mcpHandler.fetch(c.req.raw, { parsedBody })
  );

  // Logs 10% of healthy 200 OK calls, 100% of HTTP >=400 or JSON-RPC result.isError === true
  c.executionCtx.waitUntil(
    emitDifferentialWorkerLog(c.req.raw, response.clone(), Date.now() - startMs, {
      okSampleRate: 0.10,
      errorSampleRate: 1.0,
    })
  );

  return response;
});

// Explicit 405 on standalone GET/DELETE per Stateless MCP 2026-07-28 Streamable HTTP spec
app.on(["GET", "DELETE"], "/mcp", () => new Response(null, { status: 405, headers: { Allow: "POST" } }));

export default app;

Cost-Capped wrangler.jsonc Configuration (Pre-Dec 1, 2026 Ready)

By disabling noisy duplicate automatic invocation logs (invocation_logs: false per Cloudflare Workers Logs Docs) or pairing with a Cloudflare Tail Worker, your Worker emits one structured JSON event on 10% of healthy 200 OK calls (1.5M events at 15M monthly requests) while retaining 100% of HTTP errors and isError: true upstream failures β€” staying comfortably inside the 20M/mo Workers Paid allowance ($0.00 overage):

{
  "name": "acme-stateless-mcp-edge",
  "main": "src/index.ts",
  "compatibility_date": "2026-11-15",
  "upload_source_maps": false,
  "observability": {
    "enabled": true,
    "head_sampling_rate": 1,
    "logs": {
      "invocation_logs": false
    }
  },
  "kv_namespaces": [
    {
      "binding": "IDEMPOTENCY_KV",
      "id": "8f4e2c1a9b7d4e3f8a1c2b3d4e5f6a7b"
    }
  ]
}

Note on source maps: upload_source_maps: false (plus SpecPulse's .map artifact scrubber) prevents public source-map reconnaissance flagged in the Google Cloud GTIG Q4 2026 AI Threat Tracker; enable private symbolication only in isolated staging environments.

Copy-Paste GitHub Actions Workflow (specpulse/action@v3.4)

Validate MCP contract transitions, inject RFC 8941 idempotency schemas, and run a post-deploy 4-depth Outside-In probe (POST server/discover -> GET 405 check -> tools/list SHA-256 lockfile -> synthetic tools/call asserting result.isError !== true) using least-privilege GitHub Actions permissions:

name: Compile & Probe Hono Cloudflare Workers Stateless MCP
on:
  push:
    branches: [main]
    paths:
      - "src/**/*.ts"
      - "openapi.yaml"
      - "wrangler.jsonc"
  pull_request:
    paths:
      - "src/**/*.ts"
      - "openapi.yaml"

permissions:
  contents: read
  pull-requests: write

jobs:
  specpulse-edge-mcp:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Edge Worker Repository
        uses: actions/checkout@v4

      - name: Setup Node.js 22
        uses: actions/setup-node@v4
        with:
          node-version: "22"
          cache: "npm"

      - name: Compile Stateless MCP 2026-07-28 + Idempotency & Log-Sampler Guards
        uses: specpulse/action@v3.4
        with:
          framework: "hono-workers"
          entry: "src/index.ts"
          fqdn: "mcp.acme.dev"
          inject_idempotency_rfc8941: "true"
          workers_ok_log_sample_rate: "0.10"
          scrub_sourcemaps_and_secrets: "true"
          mcp_probe_url: "https://mcp.acme.dev/mcp"
          mode: "auto-pr"
          specpulse_api_key: ${{ secrets.SPECPULSE_API_KEY }}

Transparent Search & Pricing Expectations

Per the Google Search Central AI Optimization Guide, /llms.txt and /.well-known/ard.json do not alter Google Search organic rankings; they serve AI coding/API agents and Chrome Lighthouse Agentic Browsing audits.

PlanPriceIncluded CapabilitiesDirect Activation CTA
Free Sandbox$0 / moInstant Hono + Cloudflare Workers MCP 2026-07-28 scaffold, idempotency middleware, 10%/100% log sampler, /llms.txt & ard.json v0.91Run Free Sandbox (/playground)
Pro$29 / mo or $290 / yr (2 months free β€” $24.17/mo eq.)Up to 10 Worker repos with automatic GitHub PR sync, 60-second Outside-In POST server/discover & isError: true alerting, hosted /llms-full.txtCheckout Pro Monthly ($29/mo) Β· Checkout Pro Annual ($290/yr)
Team$99 / mo or $990 / yr (2 months free β€” $82.50/mo eq.)Multi-Worker domain gateway federation, unlimited repos, custom domains, OAuth 2.1 scope-drift PR blockers, team RBACCheckout Team Monthly ($99/mo) Β· Checkout Team Annual ($990/yr)

Structured Data (SoftwareApplication + FAQPage JSON-LD)

Stop Losing AI Search Buyers to Competitors β€” Go Live in 60 Seconds

No sales demos, zero lock-in, instant 1-click cancellation β€’ Save 2 months on Annual plans (Pro $290/yr Β· Agency $2,990/yr)

1-Line Universal Install (Shopify, WordPress, Webflow, Framer & Next.js β€” <2.5KB):
<script src="https://specpulse.dev/embed.js" data-site="your-domain-com" defer></script>

Related GEO, /llms.txt & Hosted MCP Playbooks

Sovereign 5-Pillar AI Trust Center (/trust) & Agent-to-Wallet Apple Pay Bridge (/pay) | SpecPulse v9.6
Pair Claude Code, Cursor & ChatGPT MCP agents with 3-second iPhone Apple Pay / Google Pay QR checkout (/pay/<claimId>) and certify all 5 Sovereign AI Trust Pillars at /trust/<slug>.
Stop Paying 20% OTA Commissions on Guests Asking ChatGPT for Your Hotel | SpecPulse Hospitality Shield
Booking.com & Expedia capture 54%+ of AI hotel citations with a 21.8% cancellation rate (vs 10.6% direct). Deploy rate-parity-safe Direct-Booking Perks Schema & Live Hotel MCP in 60s for $69.
llms.txt Slopsquatting Scanner & RFC 8785 JWS Signed agent-card.json Generator | SpecPulse AI
Audit /llms.txt for unregistered npm/PyPI Slopsquatting supply-chain hijacks, sign /.well-known/agent-card.json with RFC 8785 JCS/JWS, and enable HTTP 402 scraper tolls in 60s.
Why ChatGPT Shopping & Stripe ACP (spt_1) Reject Shopify Products β€” 8-Axis Validator & Fix
Catch OAI-SearchBot robots.txt blocks, seo.hidden flags, string-typed enable_checkout bugs, and OpenAI ACP line_items + Stripe Shared Payment Token (spt_1) schema rejections in 5 seconds.
Cloud, LLM Token & Cloudflare/Vercel Bill-Shock FinOps Circuit-Breaker ($29 Kit) | SpecPulse Labs
Stop Cloudflare Workers Observability trace overages, Vercel Fluid Compute bot surges, and OpenAI/Anthropic MCP retry-loop token burn in 60s. Instant $29 wrangler.toml + Edge Circuit-Breaker pack.
Automated B2B AI DPA, Zero-Data-Retention (ZDR) & Subprocessor Redline Generator | SpecPulse Labs
Close year-end enterprise B2B SaaS contracts in 60 seconds without $3,000+ legal delays: generate a 12-clause AI DPA Addendum (Zero-Data-Retention, EU AI Act Art.25/28, GDPR 2021 SCCs & subprocessors.json) for $59 one-time.