Back to blog
November 29, 2026
22 min read

MCP Explained Simply: It's Just JSON-RPC Over HTTP

What remote MCP actually looks like on the wire, how stateless MCP and events work, why you shouldn't confuse the harness with the protocol, versioning in practice, and what happened to A2A.

MCP Explained Simply: It’s Just JSON-RPC Over HTTP

Many engineers hear the high-level pitch for MCP, something like “it’s JSON-RPC” or “it lets agents use tools”, and never really grasp what happens underneath. Especially if you’ve never built a JSON-RPC service before, it sounds more mysterious than it actually is.

Let’s skip the grand talk about what MCP enables and just look at what it is. Because it’s genuinely simple.

First, one quick scope note: MCP supports local servers over stdio (stdin/stdout for a subprocess on your laptop), and it supports remote servers over Streamable HTTP. Remote MCP is the vast majority of real deployments, so that’s what we’ll focus on here.

What Actually Goes Over the Wire

Remote MCP is just JSON-RPC 2.0 over HTTP with a specific convention for method names, payload shapes, and headers.

If you’ve never touched JSON-RPC 2.0 before, here is the entire idea: instead of REST, where you have dozens of URLs (/orders/123, /customers, /refunds) and use HTTP verbs (GET, POST, DELETE) to express what you want, you expose one endpoint and put the action inside the JSON body.

In MCP, that single endpoint is usually just POST /mcp. Every JSON-RPC 2.0 request has the same four fields:

  • jsonrpc: always "2.0"
  • id: a request ID so the response can be matched back to the request
  • method: what you want the server to do
  • params: the input for that method

That’s it. And for 90% of practical MCP usage, you only care about two methods: tools/list and tools/call.

1. Asking what tools exist (tools/list)

To find out what a server can do, the client sends a POST /mcp request with "method": "tools/list".

What goes into params for tools/list? Usually nothing at all. You can omit params or send an empty object {}. The only regular parameter tools/list takes is cursor, which is used for pagination when a server exposes a lot of tools and returns them in pages. (In the newer stateless spec, params can also carry a _meta block with client info and protocol version, which we’ll get to in a moment.)

POST /mcp HTTP/1.1
Host: mcp.shop.internal
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/list

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list",
  "params": {}
}

And what does a realistic tools/list response look like? Suppose we have a small internal order-support MCP server with three tools registered: get_order, search_customers, and create_refund. The server replies with plain JSON:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "tools": [
      {
        "name": "get_order",
        "description": "Fetch an order by its ID, including shipping status and line items.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "order_id": {
              "type": "string",
              "description": "The order identifier, e.g. ORD-88412"
            },
            "include_items": {
              "type": "boolean",
              "description": "Whether to include individual line items",
              "default": true
            }
          },
          "required": ["order_id"]
        }
      },
      {
        "name": "search_customers",
        "description": "Search customer records by email address or full name.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "description": "Email address or name substring to search for"
            },
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          },
          "required": ["query"]
        }
      },
      {
        "name": "create_refund",
        "description": "Issue a partial or full refund for an order. Idempotent per idempotency_key.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "order_id": {
              "type": "string"
            },
            "amount_cents": {
              "type": "integer",
              "minimum": 1,
              "description": "Refund amount in cents"
            },
            "reason": {
              "type": "string",
              "enum": ["damaged", "missing_item", "duplicate_charge", "customer_request"]
            },
            "idempotency_key": {
              "type": "string",
              "description": "Unique key to prevent duplicate refunds on retry"
            }
          },
          "required": ["order_id", "amount_cents", "reason", "idempotency_key"]
        }
      }
    ]
  }
}

Look closely at that response. Nothing exotic is happening here. It is a JSON array of tools, where each tool has a name, a human-readable description, and an inputSchema written in standard JSON Schema. If there were more pages of tools, the server would also include a "nextCursor" field inside result.

2. Calling a tool (tools/call)

Now you want to actually run one of those tools. You send another POST /mcp request, this time with "method": "tools/call".

Inside params, you always have two things: name (the specific tool you want to invoke) and arguments (the parameters for that tool, matching its inputSchema):

POST /mcp HTTP/1.1
Host: mcp.shop.internal
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: get_order

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "get_order",
    "arguments": {
      "order_id": "ORD-88412",
      "include_items": true
    }
  }
}

And the server executes your handler and returns a result containing a content array (usually text blocks, though images and structured content are supported too) plus an optional isError boolean:

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"order_id\": \"ORD-88412\", \"status\": \"delivered\", \"total_cents\": 4990, \"items\": [{\"sku\": \"MUG-01\", \"qty\": 2}]}"
      }
    ],
    "isError": false
  }
}

That’s the core of MCP. Seriously. One HTTP endpoint, JSON-RPC 2.0, tools/list to see what’s available, and tools/call with a tool name and its arguments.

There Is No Magic: It’s Just HTTP

Yes, the full specification has more pieces than those two calls. There are resources and prompts (though tools do most of the heavy lifting in practice), OAuth-based auth headers, error codes, SSE streaming when a single call needs to stream progress back, and newer extensions like events and async tasks.

Still, the mental model you should keep in your head is: this is just an HTTP endpoint.

If you already have a FastAPI service running, you could expose a minimal MCP endpoint yourself in thirty lines of Python without installing a single MCP library:

import json
from fastapi import FastAPI, Request

app = FastAPI()

TOOLS = {
    "get_order": {
        "schema": {
            "name": "get_order",
            "description": "Fetch an order by its ID.",
            "inputSchema": {
                "type": "object",
                "properties": {"order_id": {"type": "string"}},
                "required": ["order_id"],
            },
        },
        "handler": lambda args: {"order_id": args["order_id"], "status": "delivered"},
    }
}

@app.post("/mcp")
async def mcp_endpoint(request: Request):
    body = await request.json()
    req_id = body.get("id")
    method = body.get("method")
    params = body.get("params") or {}

    if method == "tools/list":
        return {
            "jsonrpc": "2.0",
            "id": req_id,
            "result": {"tools": [t["schema"] for t in TOOLS.values()]},
        }

    if method == "tools/call":
        tool = TOOLS.get(params.get("name"))
        if not tool:
            return {"jsonrpc": "2.0", "id": req_id, "error": {"code": -32602, "message": "Unknown tool"}}
        output = tool["handler"](params.get("arguments") or {})
        return {
            "jsonrpc": "2.0",
            "id": req_id,
            "result": {"content": [{"type": "text", "text": json.dumps(output)}], "isError": False},
        }

    return {"jsonrpc": "2.0", "id": req_id, "error": {"code": -32601, "message": "Method not found"}}

Now, should you hand-roll this in production? Probably not. Using an official SDK or framework helper (FastMCP, mcp-handler, etc.) takes care of header checks, JSON Schema validation, SSE framing, auth middleware, and spec edge cases so you don’t have to maintain that plumbing yourself. I’m showing the raw FastAPI code for one reason: once you see it, you realize there’s no black magic behind the scenes. It is literally a JSON router behind an HTTP POST handler.

Why Is RPC Suddenly Cool?

If you’ve been building backend systems for a while, this whole JSON-RPC thing might raise an eyebrow. Wait a second: wasn’t RPC supposed to be the thing we all moved away from?

I had the exact same reaction. When I read Building Microservices by Sam Newman, his take on RPC was pretty skeptical. He walked through all the ways traditional RPC caused headaches in real systems and rarely worked out as cleanly as people hoped: tight coupling between client and server, brittleness when contracts change, language lock-in (think Java RMI or CORBA), and the classic trap of making a remote network call look like a cheap local function call until latency and partial failures blow up in production. That was the general engineering sentiment for years. REST won web APIs, and outside of high-throughput internal services using gRPC, most engineers weren’t exactly lining up to bring RPC back.

So why is RPC suddenly working so well with MCP? A few things actually changed, and one thing is just plain pragmatism.

First, MCP doesn’t have the coupling problems that gave classic RPC a bad name. Traditional RPC frameworks forced both sides to share a tech stack or compile generated stubs against fixed method signatures. Change a method on the server and your clients broke. In MCP, there are no generated client stubs and no language lock-in. It’s plain JSON over HTTP, and on the wire there are basically only two fixed RPC methods (tools/list and tools/call). Everything else is discovered dynamically at runtime through JSON Schemas, so a server can add tools or tweak optional fields without forcing every client to recompile.

Second, LLM tool calling is naturally RPC-shaped. REST is great when you’re manipulating resources (nouns like /orders/123 with GET, PUT, DELETE). An LLM deciding which tool to run thinks in actions (verbs like create_refund or search_customers). It is literally function calling. Trying to cram arbitrary agent capabilities into strict REST semantics gets awkward quickly, while JSON-RPC maps onto tool calling with almost zero friction.

Third, nobody mistakes an MCP call for a local function call. Newman’s warning about hiding the network mattered because developers writing normal backend code would call customerService.getAddress() inside a for loop and accidentally fire 500 synchronous network calls. Inside an agent loop where every model turn already takes seconds and tool calls return explicit isError payloads, nobody is under the illusion that this is an in-memory method call.

And finally, MCP stood on LSP’s shoulders, and honestly, people are just pragmatic about the rest. Anthropic modeled MCP heavily after Microsoft’s Language Server Protocol (LSP), which already proved that JSON-RPC 2.0 is a clean fit for plugging capability servers into hosts like editors. As for the remaining classic RPC issues like temporal coupling (what happens if the remote server is slow or down?), MCP either added escape hatches like async Tasks and Events, or engineers simply don’t mind the trade-off enough to care. When a tiny JSON-RPC envelope gets the job done across every language and harness, nobody wants to restart a 2012 REST-vs-RPC debate.

What Changed Recently: Stateless MCP and Events

If you looked at MCP back in 2025 and haven’t checked the spec lately, two big things changed that are worth knowing about.

MCP became stateless

Early remote MCP was stateful. Before you could call a tool, the client had to run an initialize handshake, receive an Mcp-Session-Id header from the server, and send that session ID on every follow-up request.

For a local subprocess on your laptop, stateful sessions were fine. For cloud and enterprise infrastructure, they were a headache. Load balancers needed sticky sessions so follow-up requests hit the same server instance. Serverless and edge functions fought the session model. And API gateways or WAFs were blind to what was actually being called unless they parsed the JSON-RPC body on every single request.

The 2026-07-28 specification update (often called MCP 2.0) fixed this by making the core protocol stateless:

  • The mandatory initialize handshake and Mcp-Session-Id are gone. Every POST /mcp request stands on its own.
  • Client metadata and protocol version travel per request (in the MCP-Protocol-Version header and inside params._meta). If a client wants to check server capabilities up front, there’s an optional server/discover call instead of a session handshake.
  • Requests include explicit routing headers (Mcp-Method and Mcp-Name, as you saw in the examples above). Now an API gateway can rate-limit create_refund or log tool traffic straight from HTTP headers without unpacking JSON.
  • List responses like tools/list can carry caching hints (ttlMs, cacheScope) so clients don’t hammer the server on every turn.

One thing people sometimes misunderstand here: stateless transport does not mean your application can’t keep state across steps. It just means state shouldn’t live secretly inside an HTTP session pinned to one backend pod. If a multi-step flow needs state (say a checkout cart or a long-running job), the server returns an explicit state handle or task ID in the tool result, and the client passes it back on the next call. Exact same pattern we’ve used in REST APIs for twenty years.

The same update also cleaned up two patterns that previously relied on holding open stateful connections: Multi Round-Trip Requests (MRTR) for when a server needs mid-call user confirmation (returning input_required so the client can answer and retry), and Tasks (io.modelcontextprotocol/tasks), where a slow tools/call can immediately return a task handle that the client polls or cancels via tasks/get and tasks/cancel.

Streaming and MCP Events

There are really two layers to streaming and events in MCP, and it helps not to mix them up.

First, Streamable HTTP itself allows any POST /mcp call to respond with either a normal application/json payload or an SSE (text/event-stream) stream. That’s why the client sends Accept: application/json, text/event-stream. If a tool finishes in 80ms, you get plain JSON. If it needs to stream progress updates or multiple messages back for that request, the server upgrades the response to SSE. For basic server-side change notices (like “the tool list changed”), 2026-07-28 also consolidated notifications into a single opt-in subscriptions/listen stream.

Second, MCP now has a proper Events extension (io.modelcontextprotocol/events, built on top of 2026-07-28). Until recently, MCP was almost purely request-driven: a human typed something, the agent called a tool, the server answered. That doesn’t work when you want an agent to wake up on a GitHub push, a failed CI build, or a Sentry alert.

With MCP Events, servers can advertise typed events via events/list (complete with inputSchema for subscription filters and payloadSchema for the event data). Clients track their position with durable cursors so they don’t miss events if they disconnect or restart. And because different environments have different network constraints (a serverless worker can’t hold an open socket forever, a developer laptop behind NAT can’t receive inbound webhooks), the spec supports three delivery modes:

  • poll (events/poll): pull new events on demand
  • push (events/stream): real-time delivery over an open stream
  • webhook (events/subscribe): server pushes callbacks to an endpoint you register

Nice and pragmatic. Still just HTTP under the hood.

What Actually Makes MCP Special? (And the CLI vs MCP Debate)

So if MCP is just JSON-RPC 2.0 over HTTP with some headers and schemas, what makes it special?

Honestly: not much technically.

You could build the exact same capability layer using plain REST endpoints and an OpenAPI/Swagger spec. Or you could expose everything through CLI tools. There isn’t some magical technical property that MCP has which REST + OpenAPI or a good CLI fundamentally cannot do.

What makes MCP special is standardization and adoption. It’s a convention that works well enough and that the entire ecosystem actually rallied behind. If you want to write an integration once and plug it into Claude Code, Codex, Cursor, internal agents, or whatever harness your team adopts next quarter, everybody has to agree on one wire format and one discovery contract. MCP is that agreed standard.

That brings us to the endless CLI vs MCP argument.

The pro-CLI case is completely real. Coding agents live in a shell anyway, models have seen mountains of CLI usage in training (git, gh, kubectl, aws), and CLIs have zero upfront context cost. You don’t have to dump 40 tool schemas into the prompt before the user even types a word; the agent can just run --help, pipe JSON through jq, and compose commands on the fly. Guillermo Rauch (CEO of Vercel) has talked a lot about how the CLI and OS shell act as a natural abstraction layer for coding agents (and Vercel ships crisp CLIs like vercel deploy and vercel metrics paired with lightweight Markdown skills), while at the same time Vercel has leaned heavily into stateless MCP handlers (mcp-handler) as agents become primary consumers of remote web platforms. Both coexist for a reason.

When you leave your local laptop and need remote SaaS integrations, scoped OAuth per user, audit trails, and multi-host interoperability without handing an agent a bash shell and local credentials, remote MCP makes a ton of sense.

It’s mostly a harness question, not an MCP question

Here is the part that gets missed in almost every CLI vs MCP thread. Tobi Lütke (Shopify’s CEO, who popularized context engineering and shipped his own local search tool qmd as both a CLI and an MCP server) has pointed out that this is mostly a harness question, not an MCP question. And I think that’s a really important distinction.

Take the #1 complaint against MCP: context bloat (“I connected three MCP servers and burned 30,000 tokens before my first prompt”).

Does the MCP specification force a client to dump every single tool schema from every connected server into the LLM’s system prompt on turn one? No. That is a choice the harness made. Modern harnesses like Claude Code and Codex already solved a big chunk of this with deferred tool loading and dynamic tool search: the harness fetches tools/list (or caches it), keeps the full schemas out of the prompt, and only loads the two or three relevant tool definitions when the model actually needs them.

Same thing for how tools get called. You should never confuse what an AI harness does with what is inherent to MCP.

Decoupling the Harness From MCP

Let’s make this concrete.

When you configure an MCP server inside a coding harness like Claude Code or Codex, the harness embeds an MCP client. Here is what happens:

  1. The harness’s MCP client calls tools/list on your MCP server.
  2. The harness decides which tool definitions to show the LLM (all of them, a filtered subset, or via on-demand search).
  3. The LLM reads the descriptions and schemas, decides which tool (if any) is useful, and generates the JSON arguments for the call.
  4. The harness’s MCP client wraps those generated arguments in a tools/call HTTP request and sends it to the MCP server.

Because the LLM is generating the parameters, you do have to think about what happens when it gets a parameter wrong or hallucinates a field. With current frontier models, outright parameter hallucination is a pretty minor issue compared to two years ago, especially when your inputSchema is tight and your server validates inputs properly. Still, it is non-deterministic generation sitting in the middle, so you design for it. (If you want to go deeper into how harnesses manage tool tiers, validation, and loops, I wrote a full breakdown in Harness Engineering Deep Dive.)

There is also Code Mode (coined by Cloudflare and now also showing up directly inside harnesses like Claude Code and OpenCode). Instead of making the model emit one JSON tool call per turn across 200 individual tool schemas, the harness or MCP server exposes a tiny code-execution sandbox where the model writes a short TypeScript or JavaScript snippet that loops, filters, and chains multiple tool calls in one shot. Only the final distilled result comes back into context, cutting massive token overhead and changing how parameters are constructed too.

Both deferred loading and Code Mode are choices about how your harness (or tool surface) exposes capabilities to the model. The MCP wire protocol underneath didn’t change.

Now zoom out one more step. Nothing in MCP requires an LLM to be involved at all.

An MCP server is just an HTTP server speaking JSON-RPC 2.0. An MCP client is just an HTTP client. If that client happens to live inside Claude Code, then yes, an LLM is deciding what to call and generating the arguments. It doesn’t have to.

You can call an MCP server from a plain Python script, a cron job, or curl, completely deterministically, with zero AI anywhere in the loop. You don’t even need to call tools/list first! If your code already knows the tool is called get_order and takes {"order_id": "ORD-88412"}, you can just fire the POST /mcp request directly and get JSON back.

A surprising number of people don’t realize this because they only ever experience MCP through a chat UI or coding harness. Once you separate MCP (the server/client HTTP protocol) from the harness (the loop that connects an LLM to that client), half the confusion around MCP vanishes immediately.

MCP Versioning: Do Client and Server Need to Match?

Here is a practical question I wondered about myself: do the MCP client and server actually need to pin and agree on the exact same protocol version?

Intuitively, you might think: if I want newer stuff like MCP Events or async Tasks, sure, both sides need to understand it. But if I’m just sending a normal tools/call with a tool name and arguments and waiting for the JSON response, why would the version even matter?

It turns out the real answer has two halves: what the spec enforces, and what happens in practice.

MCP uses date-based version strings (YYYY-MM-DD, like 2025-11-25 or 2026-07-28). The date only changes when the spec introduces a backward-incompatible breaking change. Backwards-compatible features ship either under the same date or as opt-in extensions (like io.modelcontextprotocol/events and io.modelcontextprotocol/tasks), which are negotiated separately from the core version.

On paper (the strict spec): yes, client and server still have to agree on a supported version. Under the 2026-07-28 stateless spec, every request declares MCP-Protocol-Version (and _meta["io.modelcontextprotocol/protocolVersion"]). If the server doesn’t support the version you asked for, it is supposed to reject the request immediately with JSON-RPC error -32022 (UnsupportedProtocolVersionError) and hand back the list of versions it does support:

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32022,
    "message": "Unsupported protocol version",
    "data": {
      "supported": ["2026-07-28", "2025-11-25"],
      "requested": "2024-11-05"
    }
  }
}

The client then picks a mutually supported version from that list and retries (or calls server/discover first to avoid the extra round trip).

In practice: your intuition is mostly right within the same era, and mostly wrong across the stateless split.

The actual tools/list and tools/call JSON bodies have barely changed since MCP launched. If both sides speak stateless MCP (or both speak the older stateful era), simple tool calls are boring and stable, and optional features like Events or Tasks are gated by capability/extension negotiation rather than breaking basic calls.

Where version alignment will bite you in practice is the jump between the legacy stateful era (2025-11-25 and earlier) and the stateless core (2026-07-28). An older stateful server still expects you to run initialize first and pass back an Mcp-Session-Id header; fire a naked stateless tools/call at it and it will reject you. Conversely, a strict 2026-07-28 server will bounce an unrecognized MCP-Protocol-Version header with -32022. That’s why many real deployments today either support both eras on the server or put a dual-era MCP gateway in front to translate between them.

So no, you don’t need to panic over every minor spec update for basic tool calls, and optional capabilities like Events are cleanly separated as extensions. You do still need to care about version compatibility across breaking revisions, especially stateful vs stateless.

Briefly: Is A2A Dead?

Finally, what about A2A (Agent2Agent), the agent-to-agent protocol Google introduced in 2025?

I barely hear anyone talking about it anymore, and if I’m honest, I have a bit of a bias here because of what I see in real systems. So I checked whether I was just living in a bubble and missing massive A2A adoption somewhere.

Here is the honest status: A2A is not literally dead. Google donated it to the Linux Foundation (where it sits under the Agentic AI Foundation alongside MCP), IBM’s competing ACP protocol merged into it, it reached a v1.0 spec, it has SDKs in several languages, and big cloud and enterprise vendors (Google Cloud, Azure, Salesforce, SAP) still put it on architecture slides for cross-organization agent workflows.

That said, in day-to-day software engineering, it really does feel like it is sliding into irrelevance, or at least into a very narrow enterprise niche.

Why? Look at how engineers actually connect one agent to another in practice.

There are two patterns for calling another agent: handoff (transferring ownership of the task and conversation to an independent, opaque peer agent) and agent-as-a-tool (calling a sub-agent like a function, waiting for its reply, and keeping control in your main harness).

In the vast majority of real systems being built right now, people aren’t doing cross-company autonomous handoffs between black-box agents. They are doing agent-as-a-tool. Your coding harness or orchestrator calls a specialized sub-agent, waits for the answer, and stays in charge of the user interaction.

And for agent-as-a-tool, MCP is already the natural fit. You wrap the sub-agent behind an MCP tool, call tools/call, and get the result back. Even the old objection (“what if the sub-agent takes five minutes or needs to ask a clarifying question?”) got weaker once MCP added async Tasks and Multi Round-Trip Requests.

So while A2A still exists on paper for true cross-vendor peer handoffs, MCP is quietly absorbing a huge chunk, probably the majority, of real-world agent-to-agent communication anyway. One simple JSON-RPC-over-HTTP standard turned out to be enough for most teams.

Not bad for a single /mcp endpoint