Understanding the Model Context Protocol (MCP): The USB-C for AI Applications

December 20, 202415 min read
Understanding the Model Context Protocol (MCP): The USB-C for AI Applications

MCP (Model Context Protocol) is revolutionizing how AI systems connect to external tools and data sources. Announced by Anthropic in November 2024, this open protocol has rapidly gained adoption and is now considered one of the most significant developments in advancing practical AI applications. This blog post explains what MCP is, how it works, and why it matters? Using real-world analogies to make these technical concepts accessible to everyone.

The Problem MCP Solves: Breaking Down AI Silos

Before diving into MCP's details, let's understand the problem it solves. Currently, AI applications face a significant challenge: they're isolated from the data they need. Imagine you have a brilliant chef (AI assistant) locked in a kitchen with no access to fresh ingredients or modern appliances. If you want a new dish, you have to bring every ingredient and tool by hand, every time. That’s how AI systems worked before MCP: every new data source or tool required custom integration, slowing down innovation and making maintenance a nightmare.

The Restaurant Menu Analogy

Restaurant vs Kitchen

Imagine you're eating at a restaurant where:

  • You can only order what you already know exists (like AI limited to its training data)
  • The kitchen staff can't tell you what ingredients they have available
  • Every time you want to try a new dish, the chef needs to completely redesign their kitchen

This is essentially how AI applications worked before MCP. Each time developers wanted their AI to connect to a new service (like Slack, GitHub, or a database), they needed to build a custom integration from scratch. With dozens of AI applications and hundreds of potential data sources, this created an "M×N problem"-potentially requiring thousands of different integrations

MCP Architecture:

The most frequently used analogy for MCP is that it's like "USB-C for AI applications". This comparison is apt for several reasons:

The USB-C Analogy Explained

Before universal standards like USB:

  • Every device required its own special cable and port

  • Connecting peripherals meant dealing with a confusing array of adapters

  • Adding new devices often required installing custom drivers

Similarly, before MCP:

  • Every AI tool needed custom code for each external system

  • Integration was complex, inconsistent, and time-consuming

  • Updating connections as systems evolved was labor-intensive

Just as USB-C created a universal hardware interface that allows any USB device to connect to any USB port, MCP creates a standardized way for AI applications to connect with various data sources and tools. This transforms what was an "M×N problem" into a simpler "M+N solution"

Core Components of MCP

MCP has five main architectural components. Let's use the travel agency analogy to understand each:

The Travel Agency Analogy

Imagine you're planning a trip using a travel agency:

  1. MCP Host (The Traveler): You, as the traveler, are like an AI application that needs information and services. You might use a Claude desktop app or an AI-powered code editor.

  2. MCP Client (The Travel Agent): Your personal travel agent who maintains contact with specific service providers. Each client manages a 1:1 connection with one server, just as a travel agent might specialize in dealing with a specific airline or hotel chain.

  3. MCP Server (Service Providers): These are the hotels, airlines, and tour operators that offer specific services. In MCP, servers are lightweight programs that each expose specific capabilities (like file access, database queries, or API connections).

  4. Local Data Sources (Local Travel Resources): These are resources directly available to you, like guidebooks or maps you already own. In MCP terms, these are your computer's files, databases, and services that MCP servers can securely access.

  5. Remote Services (External Travel Resources): These are distant services you need to book, like international flights or foreign hotels. In MCP, these are external systems available over the internet that MCP servers can connect to.

MCP Core Primitives: The Building Blocks

MCP defines three main primitives that servers can expose to clients. Let's use a restaurant analogy to understand these:

The Restaurant Analogy for MCP Primitives

  1. Tools (The Kitchen): These are functions the LLM can call to perform specific actions, like a chef preparing a specific dish upon request. For example, a weather API tool can be called when the model needs current weather data. Just as you don't need to know how to cook the dish yourself, the AI doesn't need to understand how the tool works internally-it just needs to know what inputs to provide and what outputs to expect.

  2. Resources (The Ingredients): These are data sources the LLM can access, similar to ingredients in a pantry. Resources provide data without performing significant computation, just as ingredients are raw materials before cooking begins. When you ask for information about available ingredients, the restaurant simply tells you what they have.

  3. Prompts (The Recipe Cards): These are pre-defined templates to use tools or resources optimally, like recipe cards that ensure consistent quality. They guide the AI in making the best use of available tools and resources.

How MCP Works in Practice

Let's see how MCP works in a real-world scenario using a travel planning example:

AI Travel Assistant Example

Imagine you're planning a family trip to Japan and using an AI-powered travel assistant. Here's how MCP enables this experience:

  1. You ask: "I want to plan a 7-day trip to Japan in April with my family. We enjoy cultural experiences and outdoor activities."

  2. Capability Discovery: The MCP host (travel assistant) requests available tools from connected servers (flight booking APIs, hotel systems, weather services, etc.).

  3. Augmented Prompting: The servers respond with their capabilities (flight search, hotel finder, etc.).

  4. Tool/Resource Selection: The AI determines what information it needs and calls the appropriate servers.

  5. Server Execution: Each server executes its specialized function and returns data to the AI.

  6. Response Generation: The AI synthesizes all this information into a comprehensive travel plan.

Technical Implementation

Client-Server Architecture in Action

In our travel planning example, the AI travel assistant functions as the MCP Client, while various travel services operate as MCP Servers.

When you ask: "I want to plan a 7-day trip to Japan in April with my family. We enjoy cultural experiences and outdoor activities," the following technical interactions occur:

1. Capability Discovery - Technical Implementation

The AI assistant initiates capability discovery by sending a JSON-RPC request to connected MCP servers:

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

Each travel service responds with its available tools in structured JSON format.

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "name": "search_flights",
      "description": "Finds available flights between locations",
      "schema": {
        "origin": "string",
        "destination": "string",
        "departure_date": "string",
        "return_date": "string",
        "passengers": "number"
      }
    },
    {
      "name": "find_hotels",
      "description": "Searches accommodations in specified location",
      "schema": {
        "location": "string",
        "check_in": "string",
        "check_out": "string",
        "guests": "number"
      }
    },
    {
      "name": "get_weather_forecast",
       "description": "Retrieves weather data for location and dates",
      "schema": {
        "location": "string",
        "start_date": "string",
        "end_date": "string"
      }
    }
  ]
}

2. Tool Selection & Execution

Based on your query, the AI determines it needs flight, hotel, and weather information. It uses the Protocol layer to send structured requests to the appropriate servers:

In TypeScript implementation:

// Using the Protocol class from the MCP framework
const travelProtocol = new Protocol<TravelRequest, TravelNotification, TravelResult>();

// Flight search request
const flightResult = await travelProtocol.request({
  method: "search_flights",
  params: {
    origin: "New York",
    destination: "Tokyo",
    departure_date: "2025-04-01",
    return_date: "2025-04-08",
    passengers: 4
  }
}, FlightResultSchema);

Corresponding JSON-RPC:

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tool/execute",
  "params": {
    "name": "search_flights",
    "arguments": {
      "origin": "New York",
      "destination": "Tokyo",
      "departure_date": "2025-04-01",
      "return_date": "2025-04-08",
      "passengers": 4
    }
  }
}

3. Server Execution & Response

The flight booking MCP server processes this request and returns structured data:

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "flights": [
      {
        "airline": "Japan Airlines",
        "flight_number": "JL5",
        "departure": "2025-04-01T12:30:00Z",
        "arrival": "2025-04-02T15:45:00Z",
        "price": 1250.00,
        "currency": "USD",
        "seats_available": 12
      },
      {
        "airline": "ANA",
        "flight_number": "NH1012",
        "departure": "2025-04-01T10:15:00Z",
        "arrival": "2025-04-02T13:20:00Z",
        "price": 1320.00,
        "currency": "USD",
        "seats_available": 8
      }
    ]
  }
}

Similar request-response patterns occur for hotel searches and weather forecasts using their respective MCP server endpoints.

4. Coordination and Response Generation

The AI assistant (MCP Client) coordinates these parallel requests using the Protocol layer's structured communication framework.

In Python, this might look like:

async def gather_travel_information(session: Session, query_details):
    # Execute multiple requests in parallel
    flight_results, hotel_results, weather_data = await asyncio.gather(
        session.send_request(
            create_flight_request(query_details), 
            type[FlightResult]
        ),
        session.send_request(
            create_hotel_request(query_details), 
            type[HotelResult]
        ),
        session.send_request(
            create_weather_request(query_details), 
            type[WeatherResult]
        )
    )
    
    # Process and synthesize results
    return create_travel_plan(flight_results, hotel_results, weather_data)

Without MCP, each of these connections would require custom integration. With MCP, the travel assistant can easily connect to any service that supports the protocol.

The Technical Foundation: How MCP Communication Works

For those interested in the technical details, MCP's communication system is based on JSON-RPC 2.0, a lightweight remote procedure call protocol using JSON for data exchange

The Mail System Analogy

Think of MCP's communication system like a postal service:

  1. JSON-RPC Messages (Letters): These are standardized messages with specific formats for requests, responses, notifications, and errors. Like properly addressed envelopes, they ensure messages reach their intended destination.

  2. Transport Layer (Delivery Methods): MCP supports multiple transport methods:

    • STDIO (Hand Delivery): The most common method where the client directly spawns the server process and pipes data through standard input/output.

    • HTTP/SSE (Mail Carrier): Used for remote connections, similar to how mail carriers deliver letters between distant locations.

When a client wants to call a tool, it sends a properly formatted "letter" (JSON-RPC request) to the server, which processes it and sends back a "reply" (JSON-RPC response)

Security and Control in MCP

MCP's design emphasizes safety and security through a controlled access model:

The Key and Lock Analogy

Think of MCP's security model like a key and lock system in an apartment building:

  1. Explicit Permissions (Building Access): Each MCP server requires explicit permission to be used, just as you need proper credentials to enter a building.

  2. Sandboxed Clients (Apartment Units): Each MCP client handles only one server connection, keeping them isolated like separate apartments in a building.

  3. Granular Access Control (Room Keys): Servers can be given limited access to specific resources, just as different keys might open different rooms.

  4. Local-First Approach (On-Premises Security): The initial focus was on local deployments for safety, like having security personnel on-site rather than remotely.

The Impact and Future of MCP

MCP represents a significant shift in how AI systems interact with the world:

The Language Translation Analogy

Before MCP, AI systems were like travelers in foreign countries where everyone speaks different languages-requiring a different translator for each conversation. MCP creates a universal language that allows AI systems to communicate with any external tool that supports the protocol.

The impact of this standardization extends beyond technical convenience:

  1. Community-Driven Ecosystem: The open-source nature of MCP encourages developers to create and share servers for popular platforms, building a community-driven marketplace of connectors.

  2. Reduced Development Time: Developers can build once and connect to many systems, dramatically reducing integration time and complexity.

  3. Future-Proofing: Like USB-C's design accommodates evolving standards without changing the physical connector, MCP is built to support new AI architectures and use cases without overhauling existing systems.

Conclusion: The USB-C Moment for AI

Just as USB-C transformed how we connect physical devices by providing a universal standard, MCP is poised to transform how AI connects to data and tools. By standardizing these connections, MCP is helping transition AI systems from intelligent but isolated entities to ones that can genuinely engage with the world in meaningful ways.

For developers, MCP means less time building custom integrations and more time creating valuable AI experiences. For users, it means AI assistants that can actually access the tools and information needed to be truly helpful.

As MCP adoption continues to grow throughout 2025, we're likely to see an explosion of new capabilities as AI applications connect to more specialized tools and data sources through this universal protocol-truly making it the "USB-C for AI" that's unlocking the next generation of AI applications.