Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: [email protected]
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

Take our 85+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!

Publication

WHAT IS MCP BY ANTHROPIC?(MODEL CONTEXT PROTOCOL)
Data Science   Latest   Machine Learning

WHAT IS MCP BY ANTHROPIC?(MODEL CONTEXT PROTOCOL)

Author(s): Adarsh Menon

Originally published on Towards AI.

while learning about MCP, I was initially perplexed regarding its functionality; my confusion deepened while examining the architecture.

When I say β€œarchitecture is pretty complicated,” I mean the following:-

SOURCE: https://modelcontextprotocol.io/introduction

Motivation By Anthropic : β€œModels are only as good as the context provided to them”

So this blog seeks to simplify complex structures for anyone interested in learning about them. MCP was booming in X recently, so I wanted to study about it. In this blog, we will learn about it as well as how to implement it.

This blog will explain:
a.) What is MCP?
b.)How does MCP work and its necessity?
c.) The Architecture of the MCP ?
d.) Basic Implementation of MCP ?
e.) What are the advantages and disadvantages of MCP?
f.)What are the potential future developments and evolutions?

β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€”

a.)What is MCP?

The Model Context Protocol is an open standard that enables developers to build secure, two-way connections between their data sources and AI-powered tools. The architecture is straightforward: developers can either expose their data through MCP servers or build AI applications (MCP clients) that connect to these servers. (Definition By Anthropic)

Anthropic defines MCP as connecting clients to a mid-ware server that connects other APIs and exposes tools, resources, and prompts. Exposing means displaying existing functionalities or names to users. Model Context Protocol is currently open source, which means that anyone can build their own MCP Server or use one of the existing MCP Servers we shall discuss. The Model Context Protocol enables applications to offer context for LLMs in a consistent manner, isolating the concerns of context provision from the actual LLM interaction.

MCP is an open protocol for standardizing how applications deliver context to LLMs. Think of MCP as a USB-C port for AI applications. MCP provides a standardized means to link AI models to multiple data sources and tools, just as USB-C does for connecting devices to ports and accessories.

The Model Context Protocol (MCP) lets you build servers that expose data and functionality to LLM applications in a standardized way. Think of it like a web API, but specifically designed for LLM interactions. MCP servers can:

  • Expose data through Resources (think of these sort of like GET endpoints; they are used to load information into the LLM’s context)
  • Provide functionality through Tools (sort of like POST endpoints; they are used to execute code or otherwise produce a side effect)
  • Define interaction patterns through Prompts (reusable templates for LLM interactions)

β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€”

b.)How does MCP work and its necessity?

MCP can serve as a foundational framework for Agentic. Consider an AI agent tasked with sending a message via Slack or accessing a database; configuring the API can be cumbersome. However, with an MCP server, one can access multiple applications in a standardized manner.

SOURCE : AI GENERATED

This is a straightforward explanation of how MCP operates by offering a unified API, enabling the LLM to select tools and execute instructions. It resembles an electrician functioning as a client/host, with a toolbox serving as a server that contains the necessary tools, resources (potentially an instruction manual), and so forth. This is my interpretation or perspective on how MCP functions.

β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€”

c.) The Architecture of the MCP ?

SOURCE: https://modelcontextprotocol.io/introduction

At its core, MCP follows a client-server architecture where a host application can connect to multiple servers.

This is the parts of the Architecture:-

SOURCE : https://modelcontextprotocol.io/docs/concepts/architecture

MCP Hosts: Applications such as Claude Desktop, integrated development environments (IDEs), or artificial intelligence tools seeking data access via MCP.

MCP Clients: Protocol clients that sustain one-to-one connections with servers.

MCP Servers: Efficient applications that each provide distinct functionalities via the standardized Model Context Protocol .

Regional Data Repositories: The files, databases, and services on your computer that MCP servers can access securely.

Remote Services: External services accessible via the internet (e.g., through APIs) to which MCP servers can connect.

Core Concepts:

  1. )Server : The FastMCP server is your core interface to the MCP protocol. It handles connection management, protocol compliance, and message routing.

2. )Resources: Resources are how you expose data to LLMs. They’re similar to GET endpoints in a REST API β€” they provide data but shouldn’t perform significant computation or have side effects.

3. )Tools: Tools let LLMs take actions through your server. Unlike resources, tools are expected to perform computation and have side effects.

4. )Prompts: Prompts are reusable templates that help LLMs interact with your server effectively.

5. )Context: The Context object gives your tools and resources access to MCP capabilities.

SOURCE: https://github.com/modelcontextprotocol/python-sdk

The Model Context Protocol (MCP) is constructed on a versatile, expandable framework that facilitates uninterrupted communication across LLM applications and integrations. This document addresses the fundamental architectural elements and principles.

MCP adheres to a client-server architecture in which:
Hosts are LLM software (such as Claude Desktop or integrated development environments) that establish connections.
Clients sustain one-to-one connections with servers within the host application.
Servers furnish background, tools, and prompts to clients.

β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€”

d.) Basic Implementation of MCP ?

We have developed a fundamental version of MCP by incorporating a tool that provides or returns your name, indicating its addition. This serves as a demonstration, essentially the β€œHello World” of MCP. Utilizing MCP, one can save and retrieve memory, invoke APIs, and perform more functions.We have provided our GitHub URL for the project; you may review it. To conduct tests, we utilize a tool called MCP Inspector, which verifies whether tools, resources, or prompts are being exposed and executed. You are primarily expected to test it using Claude Desktop or Cursor IDE, although you may also utilize the inspector mode.

SOURCE: INSPECTOR MODE OUTPUT

GITHUB : https://github.com/Adarsh-Menon/Getting-Started-with-MCP

β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€”

e.) What are the advantages and disadvantages of MCP?

->Advantages:-

  • Enhances contextual comprehension in big language models through structured context management.
  • Reduces context window limitations by efficiently organizing information.
  • Facilitates better information retrieval from the conversation history.

->Disadvantages:-

  • It is currently compatible with Cursor IDE, Windsurf IDE, and Claude Desktop as clients.
  • Utilizing MCP servers from external organizations may result in issues pertaining to the security and safety of one’s workflow or software.
  • Still relatively new, with evolving best practices and standards.
  • Might require specialized knowledge to implement effectively.

C

f.)What are the potential future developments and evolutions?

I believe it is relatively new, having been released by Anthropic in November, making it 3.5 months old as I write this. It has the potential to be a game changer in the future, as it equips intelligent systems with remarkable tools that enhance overall workflow and facilitate complete autonomy. This protocol may contribute to that goal, so we must remain patient for approximately 4–5 months to observe its development. A much evolved version will likely be released, stemming from the existing MCP. It is technology that influences the present AI landscape as well.

β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€”

THAT IS ALL, FOLKS, THANK YOU FOR READING, DO COMMENT DOWN ANY SUGGESTIONS DOUBTS, FEEL FREE TO ASK ME OR CORRECT ME! THANK YOU FOR COMING BACK!

SOURCE: https://imgflip.com/tag/blog

Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming aΒ sponsor.

Published via Towards AI

Feedback ↓