Skip to content

Model Context Protocol (MCP) Introduction

The Model Context Protocol (MCP) is a powerful and emerging standard designed to enhance how AI systems—especially large language models (LLMs)—interact with external data, tools, and environments. The protocol is built on top of JSON-RPC.

Architecture Overview

MCP operates with three main components:

  • MCP Hosts: Programs like Claude Desktop, IDEs, or AI tools that want to access data through MCP
  • MCP Clients: Protocol clients that maintain 1:1 connections with servers
  • MCP Servers: Lightweight programs that each expose specific capabilities through the standardized Model Context Protocol

MCP Architecture Diagram

MCP Server Features

Resources

Resources allow servers to expose data and content that can be read by clients and used as context for LLM interactions:

  • Designed to be controlled by the application/client
  • Discoverable through resources/list

Prompts

  • Provide default well-constructed prompts for clients
  • Enable consistent interaction patterns

Tools

Tools represent the most important core primitive for agents (LLMs) to act on data:

  • Enable tool invocation through tools/call
  • Discoverable via tools/list
  • Support notifications of tool changes through tools/list_changed

MCP Server Features Diagram

MCP Client Features

Sampling

Sampling enables an MCP server to request the client for LLM completions. This is one of the key reasons the MCP protocol was designed as a stateful protocol, allowing the server to call back into the client.

Key Benefits: - MCP servers typically don't have an LLM at their disposal (no cost associated with publishing an MCP server) - Enables sophisticated reasoning workflows

Example Use Case: An MCP server provides commercial flight data but cannot reason about which flights work best for a given user in each context. Sampling provides the ability for the MCP server to request the client to prompt its LLM to complete the analysis of the flights to pick the best flight option.

Reference: Sampling - Model Context Protocol

Elicitation

The Model Context Protocol (MCP) provides a standardized way for servers to request additional information from users through the client during interactions. This is another use case that explains why the MCP protocol was designed as a stateful protocol for the server to be able to call back into the client.

Example Implementation: To request information from a user, servers send an elicitation/create request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "elicitation/create",
  "params": {
    "message": "Please provide your GitHub username",
    "requestedSchema": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        }
      },
      "required": ["name"]
    }
  }
}

Reference: Elicitation - Model Context Protocol

Key Benefits of MCP

  • Standardization: Provides a consistent interface for AI tool integration
  • Flexibility: Supports various types of external integrations
  • Efficiency: Lightweight protocol design
  • Bidirectional Communication: Enables rich interactions between clients and servers

Next Steps

To get started with MCP:

  1. Review the MCP Overview for more detailed information
  2. Check Integration Readiness for implementation guidance
  3. Explore the official Model Context Protocol documentation