MCP vs REST API vs CLI: how to expose a web app to AI agents
A Wasp developer-relations engineer compares MCP servers, REST APIs and CLIs for agent access using an open-source link-shortener demo app, and argues MCP should usually come first. The recommended structure keeps business logic in shared operations, with…
Why it matters
Gives teams making their product usable from Claude and ChatGPT a concrete, implementable architecture.
What happened
1 min readA Wasp developer-relations engineer compares MCP servers, REST APIs and CLIs for agent access using an open-source link-shortener demo app, and argues MCP should usually come first. The recommended structure keeps business logic in shared operations, with MCP, REST and an optional CLI as thin wrappers, OAuth in front of the MCP server, and human confirmation for destructive actions.
Our analysis
The comparison table is useful: MCP hands login to the client so the model never sees the token, while APIs and CLIs usually rely on personal access tokens. Claims like 1,700% agent-traffic growth come without sources, and the author represents a framework vendor, so this is advocacy as much as guidance. The most durable advice, keeping logic in operations separate from the transport, holds regardless of protocol choice. Worth reading for SaaS teams that have not yet shipped an MCP server.