AI-ENGINEERING
    intermediate

    Model Context Protocol (MCP)

    AI Engineer path · lesson 80 of 124
    The idea
    MCP is USB-C for AI tools: instead of a unique cable for every device, one standard port lets any host plug into any server's tools, data, and prompts.
    How to use
    Press **Run protocol** or **Step** to trace the 7-message MCP handshake one frame at a time. Switch tabs above to explore what servers expose, the N×M reduction, and the security model.
    ready
    Press Play to run the MCP lifecycle.
    MCP Host
    Your app + the LLM. Discovers and calls server capabilities; the model decides what to call.
    JSON-RPC
    MCP Server
    tools get_weather()
    resources files, DB rows
    prompts templates
    Protocol messages
    —

    Key insight

    MCP standardizes the connection: a server advertises tools/resources/prompts, and any host can initialize, list, and call them over JSON-RPC. The model only decides what to call; the protocol handles discovery and transport.

    The MCP connection

    Schematic

    Fill in the two missing parts of the MCP architecture.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    Host app (e.g. an IDE)

    one per server
    the wire format
    exposes tools

    Files, APIs, databases

    3 pieces left to place

    Test your knowledge

    20 questions
    Question 1 of 20
    Score: 0

    What does an MCP server expose to a host?

    The short version

    MCP is USB-C for AI tools: instead of a unique cable for every device, one standard port lets any host plug into any server's tools, data, and prompts.

    In more depth

    Model Context Protocol (MCP)

    MCP is an open, JSON-RPC-based standard connecting LLM hosts (apps/agents) to servers exposing tools (callable functions), resources (readable data), and prompts (templates). Lifecycle: initialize handshake → discover (tools/list) → invoke (tools/call) → result. A standard interface means any host talks to any server — "USB-C for AI tools" — instead of per-integration glue. It builds on tool calling: the model still only requests the call.

    Interview Questions

    Anthropic
    Microsoft
    OpenAI
    Anthropic
    Microsoft
    Anthropic
    OpenAI
    Anthropic
    Microsoft
    LinkedIn
    Anthropic
    OpenAI
    Meta

    Love this visualization?

    Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.

    100% free • No credit card required