MCP, or Model Context Protocol, is a standardized communication protocol designed for interactions between AI systems and their clients or servers. It provides a structured way for these systems to exchange information, request services, and handle various operations.

Here are the key aspects of MCP:

  1. JSON-RPC Based: MCP builds on the JSON-RPC 2.0 specification, providing a structured format for requests, notifications, and responses between clients and servers.
  2. Capabilities Exchange: When a connection is established, the client and server exchange information about their capabilities, allowing them to understand what features are supported.
  3. Resource Management: MCP allows for reading, subscribing to, and monitoring changes in resources (like files or data) through URIs.
  4. Prompt Templates: The protocol supports managing and using prompt templates, which are predefined structures for generating AI prompts with customizable arguments.
  5. Tool Integration: Servers can expose tools that clients can call with specific parameters, receiving structured results in return.
  6. Sampling Support: MCP includes mechanisms for generating AI responses through sampling from language models, with support for specifying model preferences and parameters.
  7. Logging and Progress Tracking: The protocol provides ways to track progress of long-running operations and handle logging at various severity levels.
  8. Pagination Support: For operations that return large datasets, MCP includes pagination mechanisms using cursors.
  9. Extensibility: The protocol is designed to be extensible, with support for experimental features and capabilities.

MCP essentially serves as a standardized "language" that allows AI systems, tools, and services to communicate with each other in a consistent and predictable way, making it easier to build interoperable AI applications and services.


Entity Relationship Diagram

MCP has a fairly simple set of entities and relationships. Notice how it looks similar to modern LLM calls (messages, prompts, tools, …)

image.png

Note: Resources represent any kind of data that an MCP server wants to make available to clients. This can include: File contents, Database records, API responses, etc.

Sequence Diagram

Notice that MCP largely uses a series of request / responses for all the calls.