Lesson 2 of 5 · MCP Builder Track

MCP: The USB-C Standard for AI Applications

reading

In the last lesson, we saw the N×M integration nightmare that plagued the AI ecosystem. Now let us meet the solution: the Model Context Protocol -- MCP.

MCP is an open protocol that standardizes how AI applications connect to external data sources and tools. It was introduced by Anthropic in November 2024 and has since been adopted across the entire AI industry.

But before we dive into the technical details, let us understand what MCP actually is through the most powerful analogy in tech.

The USB-C Analogy

Remember the nightmare of charging cables before USB-C?

  • Your phone used Micro-USB
  • Your laptop used a proprietary barrel connector
  • Your tablet used Lightning
  • Your camera used Mini-USB
  • Your headphones used yet another cable

Every device, a different cable. Every cable, a different shape. Your drawer was a tangled mess of incompatible connectors.

Then USB-C arrived. One cable. Every device. Your phone, laptop, tablet, monitor, headphones, external drives -- all the same connector.

Info

MCP is USB-C for AI applications. Instead of every AI tool needing a custom connector for every data source, MCP provides one standard protocol. Build an MCP server once, and it works with every MCP-compatible AI application. Build an MCP client once, and it can use every MCP server in the ecosystem.

Let us extend this analogy:

USB-C ConceptMCP Equivalent
USB-C port on your laptopMCP Host (Claude Desktop, Cursor, VS Code)
USB-C cableMCP Client (the connector within the host)
USB-C device (drive, monitor)MCP Server (tool/data provider)
USB-C specificationMCP Protocol Specification
USB Implementers ForumLinux Foundation (governs MCP)
Concept Card

Just as USB-C standardized the physical and electrical interface between devices, MCP standardizes the communication interface between AI applications and tools.

What MCP Actually Is

At its core, MCP is a communication protocol built on JSON-RPC 2.0. Here is the formal definition:

Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models. It defines a client-server architecture where AI applications (hosts) connect to external data sources and tools (servers) through a unified interface.

Let us break that down:

"Open Protocol"

MCP is not proprietary software. It is not a product you buy. It is a specification -- a document that says "if you send messages in this format, and respond in that format, we can all work together." Anyone can implement it, for free, forever.

The specification is open source, published on GitHub, and governed by the Linux Foundation. No single company controls it.

"Standardizes How Applications Provide Context to LLMs"

This is the key insight. LLMs are powerful, but they are stuck in a box. They can only work with the information you put in their context window. MCP standardizes how you get external information into that context:

Without MCP:
  LLM (Claude)
  "I only know what is in my
   training data and this chat"

With MCP:
  LLM (Claude) <--- Your Database
               <--- Your Files
               <--- Your APIs
  "I can access    <--- Your Calendar
   real-time data, <--- Your Slack
   your files,     <--- Anything else
   and your tools"
       All through MCP

"Client-Server Architecture"

MCP uses a familiar pattern from computing: clients talk to servers. The AI application is the client side. The tools and data sources are the server side. The protocol defines exactly how they communicate.

Tip

Use MCP: The USB-C Standard for AI Applications in a low-risk branch or scratch project first. That keeps the lesson concrete without making your first attempt carry production pressure.

What MCP Standardizes

MCP does not just standardize one thing. It defines a complete interface with several key capabilities:

1. Tools -- Functions the AI Can Call

Tools are the most visible MCP feature. They let AI applications invoke functions -- run calculations, query APIs, create files, send messages, anything a program can do.

Python
from mcp.server.fastmcp import FastMCP

mcp = FastMCP("Weather Service")

@mcp.tool()
def get_weather(city: str, units: str = "celsius") -> str:
    """Get current weather for a city.

    Args:
        city: The city name (e.g., "San Francisco")
        units: Temperature units - "celsius" or "fahrenheit"
    """
    # In a real server, this would call a weather API
    return f"Weather in {city}: 22 degrees, sunny"

The AI sees this tool, understands when to use it (from the description), knows what parameters it needs (from the type hints), and can call it during a conversation.

2. Resources -- Data the AI Can Read

Resources expose data that AI applications can read -- files, database records, API responses, live system status. Think of them as structured data endpoints.

Python
@mcp.resource("config://app/settings")
def get_settings() -> str:
    """Current application settings"""
    return json.dumps({
        "theme": "dark",
        "language": "en",
        "notifications": True
    })

@mcp.resource("users://{user_id}/profile")
def get_user_profile(user_id: str) -> str:
    """Get a user profile by ID"""
    user = db.get_user(user_id)
    return json.dumps(user.to_dict())

3. Prompts -- Reusable Templates

Prompts are pre-built templates that guide AI interactions for specific tasks. They are like saved workflows that users can invoke.

Python
@mcp.prompt()
def code_review(code: str, language: str = "python") -> str:
    """Review code for bugs, style, and best practices"""
    return f"""Please review this {language} code for:
1. Bugs and potential errors
2. Style and readability
3. Performance concerns
4. Security issues

Code to review:

{code}

Provide specific, actionable feedback."""

4. Sampling -- Servers Requesting AI Help

This is a unique MCP feature: servers can ask the AI to do something. The server sends a prompt to the host, the host generates a response, and the server uses it. This enables powerful recursive patterns.

5. Roots -- Filesystem Boundaries

Roots tell the server which parts of the filesystem it is allowed to work with. This is crucial for security -- you do not want a tool server browsing your entire hard drive.

Add One MCP: The USB-C Standard for AI Applications Connection

  1. Choose one external system that would genuinely improve this lesson's workflow.
  2. Configure an MCP server or inspect the one your team already uses.
  3. Ask Claude to call exactly one tool from that server and verify the result is useful.

6. Elicitation -- Asking Users for Input

Servers can ask the user for additional information mid-operation. Need a confirmation before deleting a file? Elicitation handles that.

Tip

You do not need to understand all six capabilities right now. We will deep-dive into each one in later chapters. For now, just know that MCP covers tools (actions), resources (data), prompts (templates), sampling (AI-in-the-loop), roots (boundaries), and elicitation (user input).

From N times M to N+M: The Value Proposition

Let us revisit the math from the last lesson, now with concrete examples.

Without MCP (N times M)

Claude Desktop --custom--> GitHub API
Claude Desktop --custom--> Slack API
Claude Desktop --custom--> PostgreSQL
Cursor --custom--> GitHub API
Cursor --custom--> Slack API
Cursor --custom--> PostgreSQL
VS Code Copilot --custom--> GitHub API
VS Code Copilot --custom--> Slack API
VS Code Copilot --custom--> PostgreSQL

= 3 apps x 3 tools = 9 custom integrations

With MCP (N+M)

Claude Desktop --MCP-->  GitHub MCP Server
Cursor --MCP-->          Slack MCP Server
VS Code Copilot --MCP--> PostgreSQL MCP Server

= 3 MCP clients + 3 MCP servers = 6 implementations

95.7%

Integration Reduction

At ecosystem scale (30 apps, 100 tools), MCP reduces 3,000 custom integrations down to just 130 implementations

As the numbers grow, the savings become dramatic:

Python
# The math is simple but powerful
def integrations_without_mcp(apps, tools):
    return apps * tools

def integrations_with_mcp(apps, tools):
    return apps + tools

# Current ecosystem scale
apps = 30   # AI applications with MCP support
tools = 100 # MCP servers available

print(f"Without MCP: {integrations_without_mcp(apps, tools):,} integrations")
print(f"With MCP:    {integrations_with_mcp(apps, tools):,} integrations")

# Output:
# Without MCP: 3,000 integrations
# With MCP:    130 integrations
# Reduction:   95.7%

What MCP Means for Different Roles

For AI Application Developers

Before MCP: "We need to build and maintain connectors for every tool our users want."

After MCP: "We implement MCP once. Our users get access to the entire ecosystem of MCP servers automatically."

Real example: When Cursor adopted MCP, they instantly gained access to thousands of community-built MCP servers -- databases, APIs, file systems, cloud services, documentation tools -- without writing a single custom integration.

For Tool and Platform Developers

Before MCP: "We need to build plugins for Claude, ChatGPT, Copilot, Cursor, and every other AI tool. Each one is different."

After MCP: "We build one MCP server. It works everywhere."

Real example: The PostgreSQL community built one MCP server for database access. It now works in Claude Desktop, Cursor, Windsurf, VS Code, Cline, and every other MCP-compatible host.

MCP Integration Strategy

Do

Build one MCP server and let any compatible host connect to it instantly

Don't

Write separate custom integrations for each AI application you want to support

For End Users

Before MCP: "My AI tool does not support my database / task manager / documentation system."

After MCP: "I can connect any MCP server to any MCP host. My AI works with everything."

Success

The power of MCP is not just technical -- it is organizational. It means the tool ecosystem can grow independently of the AI application ecosystem. A solo developer building a niche MCP server for a specialized tool instantly makes that tool available to every AI application in the world.

A Quick Look at MCP in Practice

Here is what a complete (minimal) MCP server looks like. We will build much more sophisticated servers later, but this shows the simplicity of the protocol:

Quick Check

What is the main benefit of using MCP: The USB-C Standard for AI Applications well in Claude Code?

Python
from mcp.server.fastmcp import FastMCP

# Create a server with a name
mcp = FastMCP("My First Server")

# Define a tool the AI can use
@mcp.tool()
def calculate_bmi(weight_kg: float, height_m: float) -> str:
    """Calculate Body Mass Index (BMI).

    Args:
        weight_kg: Weight in kilograms
        height_m: Height in meters
    """
    bmi = weight_kg / (height_m ** 2)

    if bmi < 18.5:
        category = "underweight"
    elif bmi < 25:
        category = "normal weight"
    elif bmi < 30:
        category = "overweight"
    else:
        category = "obese"

    return f"BMI: {bmi:.1f} ({category})"

# Define a resource the AI can read
@mcp.resource("health://guidelines")
def get_guidelines() -> str:
    """WHO BMI classification guidelines"""
    return """
    BMI Categories (WHO):
    - Underweight: < 18.5
    - Normal weight: 18.5 to 24.9
    - Overweight: 25.0 to 29.9
    - Obese: 30.0 and above
    """

# Run the server
if __name__ == "__main__":
    mcp.run()

That is it. About 30 lines of code. This server can now be used by Claude Desktop, Cursor, VS Code, or any other MCP-compatible host.

And here is how a user configures Claude Desktop to use this server -- just a few lines of JSON:

JSON
{
  "mcpServers": {
    "health": {
      "command": "python",
      "args": ["path/to/health_server.py"]
    }
  }
}

No SDK installation for the host. No plugin marketplace approval. No API key setup. Just point the host at the server and it works.

How MCP Compares

Let us be precise about what MCP replaces and what it does not:

FeatureCustom APIsChatGPT PluginsLangChain ToolsMCP
Open standardNoNoNoYes
Works with any AI appNoChatGPT onlyLangChain onlyYes
Community ecosystemN/ALimitedFramework-bound10K+ servers
Governed independentlyN/AOpenAILangChain IncLinux Foundation
Transport optionsHTTPHTTPIn-processstdio + HTTP
BidirectionalVariesNoNoYes
Discovery built-inNoVia marketplaceNoYes

Try This Now

Explore the MCP Ecosystem

Visit these resources to see the scale of the MCP ecosystem:

  1. MCP Specification: https://spec.modelcontextprotocol.io -- the official protocol spec
  2. MCP Servers Repository: https://github.com/modelcontextprotocol/servers -- official and community servers
  3. MCP SDKs: Available for Python, TypeScript, Java, Go, Kotlin, C#, Swift, and Rust

Browse the servers repository and pick three MCP servers that would be useful in your work. Note what tools they expose and how they are configured. You will be building servers like these by Chapter 5.

Key Takeaways

  • MCP is an open protocol that standardizes how AI applications connect to tools and data -- like USB-C for AI
  • It is built on JSON-RPC 2.0 and defines six key capabilities: tools, resources, prompts, sampling, roots, and elicitation
  • MCP reduces integrations from N times M to N+M -- a 95%+ reduction at ecosystem scale
  • Building an MCP server is remarkably simple -- about 30 lines of Python for a working server
  • MCP is vendor-neutral, governed by the Linux Foundation, and adopted by the entire AI industry
  • The protocol benefits everyone: AI app developers, tool makers, and end users