Skip to main content

Why RPC Was Selected for MCP?

Introduction

Modern AI systems are no longer isolated models that simply generate text responses. They increasingly interact with external systems such as databases, APIs, developer tools, cloud platforms, file systems, IDEs, browsers, and enterprise services. As these integrations become more sophisticated, a fundamental architectural question naturally emerges:

How should an AI model communicate with external tools and services in a reliable, structured, and scalable way?

This question becomes especially important in architectures built around MCP, where a host application, an MCP client, and multiple MCP servers must communicate continuously and consistently. The communication layer cannot be vague or loosely structured because AI systems require deterministic interaction patterns, predictable responses, standardized error handling, and extensibility across many different tools.

This is precisely why RPC became such an important design choice for MCP.

RPC, which stands for Remote Procedure Call, provides a communication model where one system can invoke operations on another system almost as if it were calling a local function. Instead of manually constructing complex communication workflows every time a tool interaction is required, RPC introduces a standardized request-response mechanism that feels natural, structured, and scalable.

To understand why RPC fits MCP so well, we first need to understand the communication problems MCP is trying to solve.

The Core Problem MCP Needed to Solve

MCP is designed around the idea that AI systems should be able to interact with external capabilities in a standardized way. These capabilities may include:

  • Reading files
  • Querying databases
  • Calling APIs
  • Running terminal commands
  • Accessing developer tools
  • Interacting with IDEs
  • Retrieving documents
  • Performing web searches

At first glance, integrating these systems may appear straightforward. After all, applications communicate over HTTP all the time. However, AI-driven communication introduces several unique requirements that traditional request patterns do not handle elegantly.

An AI system does not simply fetch static content. It dynamically decides:

  • which tool to call
  • what parameters to send
  • when to retry
  • how to interpret errors
  • how to chain multiple operations together

This requires a communication model that is:

  • structured
  • predictable
  • machine-friendly
  • extensible
  • bidirectional
  • easy to standardize

Without a consistent protocol, every tool integration would behave differently, creating chaos for both tool providers and AI applications. RPC solves this problem elegantly because it standardizes interaction patterns around method invocation.

Understanding RPC in Simple Terms

RPC, or Remote Procedure Call, is a communication mechanism where one system invokes a procedure or method on another system remotely. Conceptually, it behaves similarly to calling a local function in programming. For example, consider a local function call:

getUser(10)

The caller does not care how the function internally retrieves the user. It simply invokes the method and receives a response. RPC extends this same idea across network boundaries. Instead of calling a local function, a client sends a structured request to another process or service:

{
"method": "getUser",
"params": {
"id": 10
}
}

The remote system executes the operation and returns a structured response:

{
"result": {
"id": 10,
"name": "John"
}
}

This abstraction is extremely powerful because it hides communication complexity behind a clean procedural interface. The client focuses on what operation should happen, while the server handles how the operation is executed. This procedural model aligns naturally with how AI systems think about tools.

Why RPC Fits MCP Naturally

The architecture of MCP revolves around interaction between multiple independent components. Typically, the flow looks like this:

Host Application

MCP Client

MCP Server

Tool / Resource / Capability

In this model, the MCP client continuously invokes operations exposed by MCP servers. Examples include:

  • read_file
  • search_documents
  • execute_query
  • run_terminal_command
  • fetch_url

Notice how all these interactions resemble procedural operations. The communication is not resource-oriented like traditional REST APIs. Instead, it is operation-oriented. This distinction is extremely important. REST is generally centered around resources:

GET /users/10
POST /documents
DELETE /files/20

RPC, however, focuses on actions and procedures:

readFile()
searchDocuments()
executeCommand()

Since MCP interactions are fundamentally action-driven rather than resource-driven, RPC becomes a much more natural fit.

MCP Needs Structured Tool Invocation

One of the biggest reasons RPC was selected is that AI systems require highly structured tool communication. Consider what happens when an AI model wants to call a tool. The system must know:

  • available methods
  • expected parameters
  • parameter types
  • response format
  • error structure
  • supported capabilities

RPC systems are naturally designed for this style of interaction. Each operation becomes a clearly defined callable method. For example:

{
"method": "searchDocuments",
"params": {
"query": "distributed systems"
}
}

This structure is easy for both humans and machines to understand. More importantly, it becomes predictable for AI systems. Predictability matters enormously because LLM-based systems generate requests dynamically. If communication formats are inconsistent, the probability of malformed requests increases significantly. RPC minimizes ambiguity.

RPC Simplifies Tool Discovery

MCP systems often support dynamic capability discovery. This means the client may not know beforehand which tools or methods are available on a server. RPC protocols typically support introspection and method discovery naturally. For example, a server may expose:

listTools()

or

getCapabilities()

The client can dynamically inspect supported procedures and decide which operations to invoke. This becomes extremely important in AI ecosystems because tool environments may change continuously.

  • New tools may appear.
  • Existing tools may evolve.
  • Capabilities may differ across servers.

RPC-based architectures handle this more gracefully than rigid hardcoded integrations.

Why JSON-RPC Became a Strong Choice

Many MCP implementations use JSON-RPC because it combines simplicity with structure.

JSON-RPC provides:

  • lightweight communication
  • language independence
  • human-readable messages
  • standardized request-response structure
  • simple error handling

A JSON-RPC request usually looks like this:

{
"jsonrpc": "2.0",
"id": 1,
"method": "readFile",
"params": {
"path": "/docs/readme.md"
}
}

The corresponding response:

{
"jsonrpc": "2.0",
"id": 1,
"result": "File contents here"
}

This structure provides several advantages. First, every request follows the same predictable pattern. Second, the protocol remains lightweight and easy to parse.Third, JSON is universally supported across programming languages. This allows MCP ecosystems to remain language-agnostic. An MCP server written in Python can communicate seamlessly with an MCP client written in JavaScript or Java because both understand JSON-RPC.

RPC Supports Bidirectional Communication

MCP systems often require more than simple one-way requests. Sometimes servers must also send notifications, events, or asynchronous updates back to clients. RPC protocols handle this elegantly. For example:

  • progress updates
  • streaming outputs
  • cancellation requests
  • notifications
  • event-driven responses

can all be represented naturally within RPC-style communication. This is especially useful for long-running operations. Imagine an AI model executing:

generateLargeReport()

The task may take several minutes. Instead of blocking completely, the MCP server can continuously stream progress updates. RPC-based messaging supports these workflows much more naturally than simplistic request-response APIs.

RPC Reduces Coupling Between Components

Another major architectural advantage of RPC is loose coupling. The MCP client does not need to understand the server’s internal implementation details. It only needs to know:

  • available methods
  • expected parameters
  • response structure

This separation becomes critical in distributed systems. For example:

  • one server may use PostgreSQL
  • another may use Elasticsearch
  • another may interact with GitHub APIs

The MCP client remains completely unaware of these implementation details. RPC creates a clean abstraction boundary between the caller and the executor. This improves:

  • maintainability
  • extensibility
  • portability
  • scalability

RPC Works Well Across Multiple Transports

One powerful characteristic of RPC is that it can operate independently of the underlying transport layer. The same RPC model may work over:

  • HTTP
  • WebSocket
  • STDIO
  • TCP streams

This flexibility is extremely valuable in MCP ecosystems. For example:

  • local IDE integrations may use STDIO
  • cloud-hosted services may use HTTP
  • real-time systems may use WebSockets

Despite transport differences, the procedural communication model remains consistent. This consistency simplifies ecosystem design significantly.

RPC Improves Standardization Across the Ecosystem

One of the biggest goals of MCP is interoperability. Different tools, clients, hosts, and servers should communicate predictably regardless of who built them. RPC helps establish this consistency. Every interaction follows standardized structures:

  • request
  • method
  • params
  • response
  • error

This makes the ecosystem easier to extend and maintain. Without such standardization, every tool provider would invent custom communication patterns, making integrations fragile and difficult to scale.