REST is for humans.
English is for Agents.
When two autonomous agents talk, they don't need a Swagger file. They need a "Goal" and a "Contract".
We are seeing the rise of Agent-to-Agent (A2A) protocols where your Travel Agent AI negotiates directly with the Airline Agent AI to rebook a flight.
03. Model Context Protocol (MCP)
Anthropic's MCP (Model Context Protocol) is winning because it solves the N x M problem. Instead of every AI app building integrations for Google Drive, Slack, and GitHub, we build one MCP Server for each service. Any MCP-compliant Agent (Claude, Cursor, etc.) can then connect to it.
[🤖 AI Client (Claude)]
⬇️ (JSON-RPC)
[🔌 MCP Host Process]
⬇️ (Stdio / SSE)
[📦 MCP Server (e.g., Stripe Integration)]
⬇️ (HTTP)
[☁️ Actual Stripe API]
name: "stripe-agent",
version: "1.0"
{'}'});
// 1. Expose Tools
server.tool(
"refund_payment",
{'{'} id: z.string().startsWith("ch_") {'}'},
{'}'}
);
// 2. Expose Resources (Read-Only Data)
server.resource(
"payment-logs",
"payments://{'{'}id{'}'}/logs",
);
04. The Senior Engineer's Take
Trust & Auth Delegation
Technically, this is solved. The hard part is Authentication.
We need "OAuth for Agents". You shouldn't give your agent your raw Stripe Secret Key. You should grant a scoped token: stripe:refunds:read_write.