Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      The state of DevOps and AI: Not just hype

      September 1, 2025

      A Breeze Of Inspiration In September (2025 Wallpapers Edition)

      August 31, 2025

      10 Top Generative AI Development Companies for Enterprise Node.js Projects

      August 30, 2025

      Prompting Is A Design Act: How To Brief, Guide And Iterate With AI

      August 29, 2025

      Look out, Meta Ray-Bans! These AI glasses just raised over $1M in pre-orders in 3 days

      September 2, 2025

      Samsung ‘Galaxy Glasses’ powered by Android XR are reportedly on track to be unveiled this month

      September 2, 2025

      The M4 iPad Pro is discounted $100 as a last-minute Labor Day deal

      September 2, 2025

      Distribution Release: Linux From Scratch 12.4

      September 1, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Enhanced Queue Job Control with Laravel’s ThrottlesExceptions failWhen() Method

      September 2, 2025
      Recent

      Enhanced Queue Job Control with Laravel’s ThrottlesExceptions failWhen() Method

      September 2, 2025

      August report 2025

      September 2, 2025

      Fake News Detection using Python Machine Learning (ML)

      September 1, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Installing Proxmox on a Raspberry Pi to run Virtual Machines on it

      September 2, 2025
      Recent

      Installing Proxmox on a Raspberry Pi to run Virtual Machines on it

      September 2, 2025

      Download Transcribe! for Windows

      September 1, 2025

      Microsoft Fixes CertificateServicesClient (CertEnroll) Error in Windows 11

      September 1, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»What is the Model Context Protocol?

    What is the Model Context Protocol?

    July 18, 2025

    You can think of the Model Context Protocol (MCP) as USB for large language models (LLMs), allowing an LLM to interact with a variety of external systems in a uniform manner. It was developed by Anthropic to solve the fundamental problem of getting a text generator (LLM) to perform real-world actions on a user’s behalf.

    Solving the M x N Problem

    With a growing number of powerful LLMs (M) and a vast universe of applications and APIs (N) for them to interact with, one would need to develop M x N custom connections to link every LLM with every application.

    By offering a standardized solution, MCP converts the M x N headache into a much more manageable M + N problem. As long as each LLM can use an MCP client, it can communicate with every application for which an MCP server has been created.

    The Architecture

    Depiction of the relationship between the host application, MCP Client, MCP Server, and external APIs.

    At its heart, MCP operates on a client-server architectural model. The main components, connecting an LLM to an external application are:

    • MCP Host – The application which communicates with the LLM, such as an AI-chat interface (LM Studio) or a coding assistant (GitHub Copilot).
    • MCP Client – A component within the host application which communicates with an MCP server. There’s a one-to-one relationship between a client and a server. A host can run multiple clients to access multiple services (e.g. file system, email, and database).
    • MCP Servers – The bridge that translates client requests into actions on the external application. An MCP server exposes a set of “primitives” that categorize the different types of interactions an LLM can have with an external resource.

    The Primitives

    Exposing server functionality through the standard primitives allows for dynamic interaction. The MCP client is able to query a server to discover the capabilities offered, and then pass this information on to the LLM so it can make requests accordingly.

    • Resources – Represent sources of data or content that the LLM can access. Examples include files, database entries, or the content of a webpage. Accessing a resource is a read-only operation.
    • Tools – Executable functions that allow an LLM to take action in the external environment. Examples include sending an email, creating a calendar event, or updating a database record.
    • Prompts – Pre-defined reusable templates or instructions that can guide the LLM in its interaction with the tools and resources.

    The Interactions

    Depiction of message flow allowing a user to control external systems via an LLM, using the MCP protocol.

    The above diagram outlines the high level flow that allows a user to request an LLM to perform an action, in this case sending an email. Let’s walk through the steps:

    Step 0: Tool Discovery (Occurs in the Background)

    Before any user request, the MCP Client communicates with the MCP Server to learn what tools it offers. The server might respond, “I have a tool named send_email that requires recipient_email, subject, and body”. The MCP Client passes this information to the LLM’s context, making it aware of its email-sending capability.

    Step 1: User Initiates a Request

    The user tells the LLM, “Hey, can you send an email to Jane Doe and let her know the project proposal has been uploaded to the shared drive?” The LLM reasons about the user’s intent, decides which tool to use, and seeing that the tool requires a “subject” might ask the user for more information.

    Step 2: LLM Proposes Tool Call

    With all necessary arguments, the LLM generates the JSON required for a structured tool call:

    {
      "tool_calls": [
        {
          "name": "send_email",
          "arguments": {
            "recipient": "Jane.Doe@email.com",
            "subject": "Project Proposal Uploaded",
            "body": "Hi Jane, Just letting you know that..."
          }
        }
      ]
    }

    Step 3: MCP Client Makes JSON-RPC Request

    Having detected the structured tool call in the LLM’s output, the host application passes this to the MCP Client, which then:

    • Parses the LLM’s output to extract the structured content.
    • Validates the extracted data against the tool’s schema.
    • Attaches any necessary security/context information (E.g. auth tokens)
    • Generates the final JSON-RPC payload and handles network communication to the MCP Server

    Step 4: MCP Server Executes Action

    The MCP server validates the received request, translates it into the specific API call required by a real email service, and executes the action. The email service’s response is then translated into a standardized MCP response and sent back to the MCP Client.

    Step 5: LLM Conveys Status to the User

    The MCP client receives the result and passes it to the host application. The host injects this result into the LLM’s context, typically as a new message with a special “tool” role. Finally, the LLM generates a natural language response to inform the user, “The email has been sent to Jane Doe.”

    Summary

    The Model Context Protocol provides us with a simple yet elegant means for connecting an LLM to an unlimited number of external systems. This converts LLMs from useful but limited chat-bots to truly powerful agents that can act on our behalf. With adoption by major players in the AI field, like Anthropic, OpenAI, Google, and Microsoft it is fast becoming the de-facto standard that all agents will converge upon.

    What are some of the most useful MCP servers that you have used?

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleWhy Non-Native Content Designers Improve Global UX
    Next Article A tricky, educational quiz: it’s about time..

    Related Posts

    Development

    Enhanced Queue Job Control with Laravel’s ThrottlesExceptions failWhen() Method

    September 2, 2025
    Artificial Intelligence

    Scaling Up Reinforcement Learning for Traffic Smoothing: A 100-AV Highway Deployment

    September 2, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    CVE-2025-52488 – DNN NTLM Hash Exposure Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-21468 – Cisco Firewall Memory Corruption Buffer Overflow

    Common Vulnerabilities and Exposures (CVEs)

    Automate Amazon EKS troubleshooting using an Amazon Bedrock agentic workflow

    Machine Learning

    Best Crypto Payment Gateway for High Risk

    Development

    Highlights

    Citrix Bleed 2: ReliaQuest Warns of Active Exploitation in NetScaler Gateway Vulnerability

    June 29, 2025

    Citrix Bleed 2: ReliaQuest Warns of Active Exploitation in NetScaler Gateway Vulnerability

    A newly discovered vulnerability—CVE-2025-5777, now dubbed Citrix Bleed 2—is raising serious security alarms. According to ReliaQuest, attackers are actively exploiting this vulnerability in the wild …
    Read more

    Published Date:
    Jun 30, 2025 (3 hours ago)

    Vulnerabilities has been mentioned in this article.

    CVE-2025-6543

    CVE-2025-5777

    CVE-2025-31324

    CVE-2024-6235

    CVE-2023-4966

    Building a Multi-Tenant SaaS Application with Next.js (Backend Integration)

    Building a Multi-Tenant SaaS Application with Next.js (Backend Integration)

    July 16, 2025

    Track Moon Phases From Your Ubuntu Desktop With Luna

    April 30, 2025

    AboutHimachal

    July 15, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.