GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • anc.dev the agent-native standard
  • Leaderboards
  • Audit
  • Install
  • Skill
  • About

This view

  • Original page
  • New address

GeezerVison is showing anc.dev — Fix: a JSON-only Accept is answered without SSE framing

Fix: a JSON-only Accept is answered without SSE framing

Web-audit fix skill for the mcp-accept-json check (MCP, SHOULD).

Goal

Serve a single application/json response to a client whose Accept names only application/json.

Fix

Read the request Accept header and answer within it. Streamable HTTP lets the server reply either with one application/json body or with a text/event-stream, and the choice is the client's to constrain: a caller that sends Accept: application/json alone is telling you its HTTP client cannot read a stream. Answering that caller with text/event-stream returns a 200 over a body it cannot parse, and no status code tells it what went wrong. Parse the header with q-value semantics rather than a substring match, buffer the response, and emit Content-Type: application/json. Reserve the stream for callers that accept it. If your server genuinely cannot produce a single JSON body, refuse with 406 Not Acceptable instead: that at least fails the caller immediately and in the open.

Resources

  • MCP transports
  • RFC 9110 section 12.5.1 (Accept)

Copy-paste prompt

Paste this into your coding agent. Your audit adds what it observed for this check:

Verify

Re-run the audit at https://anc.dev/audit or call the audit_website MCP tool; the mcp-accept-json check should report pass.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.