MCP 201: The power of protocol

AnthropicAbout 5 min readAug 1, 2025Watch original
THE SUMMARYAI-generated

Key Concepts

  • Model Context Protocol (MCP): A protocol for AI applications to interact with servers.
  • Primitives: Basic building blocks for MCP interactions (prompts, resources, tools, sampling, roots).
  • Prompts: Predefined templates for AI interactions, initiated by the user.
  • Resources: Raw data or content exposed by a server for the application to use.
  • Tools: Actions that can be invoked by the model.
  • Sampling: A server's ability to request a completion from the client's configured model.
  • Roots: A way for the server to inquire from the client about open projects.
  • Authorization: Securing access to MCP servers, particularly on the web, using OAuth 2.1.
  • Scaling: Enabling MCP servers to handle requests efficiently, similar to normal APIs, using streamable HTTP.

MCP Primitives

Prompts

  • Definition: Predefined templates for AI interactions that an MCP server exposes to clients.
  • Purpose: To provide examples and guide users on how to best utilize the MCP server.
  • Dynamic Nature: Prompts are code executed on the MCP server, allowing for richer functionality.
  • Example: An MCP prompt that fetches GitHub comments related to a user's pull request and adds them to the context window.
  • User Interaction: User decides when to add the prompt to the context window, unlike tools where the model decides.
  • Prompt Completion: Ability to provide parameterized templates with autocompletion, making it easier for users to input data.
  • Implementation: Simple to implement in code (e.g., TypeScript) with functions for completion and prompt generation.

Resources

  • Definition: Raw data or content exposed by an MCP server to a client.
  • Purpose: To provide data for the client application to use, either by adding it to the context window or for other purposes like building embeddings.
  • Application-Driven: The client application decides what to do with the resource.
  • Example: Exposing a database schema as a resource, allowing the client to visualize it.
  • Potential: Underexplored area with potential for retrieval augmentation and other advanced applications.

Tools

  • Definition: Actions that an MCP server can perform, invoked by the model.
  • Model-Driven: The model decides when to call a tool.
  • Common Use Case: Most MCP servers are built to expose tools.
  • Example: Querying a database.

Interaction Model

  • Concept: Defines how the three primitives (prompts, resources, tools) are used in relation to the user, application, and model.
  • Prompts: User-driven, invoked via slash commands or similar.
  • Resources: Application-driven, the client decides how to use the data.
  • Tools: Model-driven, the model decides when to call the action.
  • Benefits: Allows for more nuanced interactions and richer applications compared to just using tools.

Richer Interactions: Sampling and Roots

Sampling

  • Problem: How to build an MCP server that requires model interaction (e.g., summarization) without requiring the server to have its own model SDK and API key.
  • Solution: Sampling allows the server to request a completion from the client's configured model.
  • Benefits:
    • Client retains full control over security, privacy, and cost.
    • Enables recursive chaining of MCP servers.
  • Recursive Chaining: An MCP server can use other MCP servers downstream, with the client retaining control over all model interactions.
  • Status: Currently not widely supported in clients, but planned for first-party products.

Roots

  • Problem: How does an MCP server know about the context of the client application (e.g., open projects in an IDE)?
  • Solution: Roots allow the server to inquire from the client about its environment.
  • Example: An MCP server for Git commands can use roots to determine the open projects in VS Code.
  • Status: Not widely used, but supported by VS Code.

Building a Rich Interaction: Chat Application Example

  • Prompts: Provide examples to users (e.g., "Summarize this discussion"), with completions for recent threads and users.
  • Resources: List channels and expose recent threads for the client to index.
  • Tools: Search, read channels, read threads.
  • Sampling: Summarize a thread.

Bringing MCP to the Web: Authorization and Scaling

Authorization

  • Goal: To enable MCP servers to be hosted on the web and interact with user accounts.
  • Method: Using OAuth 2.1 for authorization.
  • Benefits:
    • Users can trust the MCP server because it's associated with a known online account.
    • Developers can update the server without requiring users to download new versions.
    • Enterprises can integrate MCP into their existing identity management systems (e.g., Azure AD, Okta).

Scaling

  • Goal: To enable MCP servers to scale like normal APIs.
  • Method: Using streamable HTTP.
  • Options:
    • Return results directly as application/JSON (for simple tool calls).
    • Open a stream for richer interactions (e.g., notifications, sampling).

Future of MCP

  • Agents: Developing primitives for asynchronous tasks and longer-running processes.
  • Elicitation: Allowing MCP server authors to ask for input from the user.
  • Official Registry: Creating a central place to find and publish MCP servers.
  • Multimodality: Exploring streaming of results and other aspects.
  • Ecosystem:
    • Ruby SDK (donated by Shopify).
    • Official Go SDK (being built by Google).

Conclusion

MCP is a powerful protocol with capabilities beyond simple tool calling. By leveraging primitives like prompts, resources, sampling, and roots, developers can build richer and more nuanced interactions between AI applications and servers. The future of MCP lies in bringing it to the web through authorization and scaling, enabling seamless integration with online services and enterprise environments. The upcoming features focused on agents, elicitation, and a central registry will further enhance the capabilities and accessibility of MCP.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.