hn.today

Why did we not use REST HATEOAS instead of MCP

fieldmappings.com11 points8 comments
Screenshot of Why did we not use REST HATEOAS instead of MCP

The piece compares MCP’s tool-catalog approach with HATEOAS, where a server represents its current state through links and forms that expose only valid next actions. To test the difference, the author built a 12-action order workflow in both formats, then a functioning merch store that supports browsing, payment, cancellation, and returns through either a browser or MCP. In a scripted mug purchase, HTML required six requests and transferred 14,780 bytes, while MCP required eight requests and transferred 10,335 bytes. MCP’s smaller total reflects less page markup, but its tool catalog consumed 4,860 bytes before work began, compared with 3,534 bytes for the HTML home page; MCP results also duplicate structured data as text for compatibility.

The more consequential difference appeared when clients attempted actions unavailable in the current order state: MCP sent four calls that the server rejected, while HTML exposed no invalid actions to click. The author argues that hypermedia shifts state awareness to the server, helping clients avoid errors and adapt as workflows change. Building reliable MCP tools still required defining each order’s available actions, and the store used that same logic to generate both MCP responses and browser buttons. The conclusion is that MCP does not eliminate hypermedia’s design work; it makes that work optional, so teams may skip it under deadline pressure. The choice was not forced by technical limits, but by the short-term convenience of RPC-style tools over the longer-term benefits of explicit affordances.

Read on fieldmappings.com8 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Web

Discord Alternaive

Discord Alternaive

Zrzur is an open-source Discord alternative with text channels, voice rooms, screen sharing, events, and server migration tools. Volunteers build it for browsers and desktop platforms, with a focus on privacy, accessibility, and Arabic support. (zrzur.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.