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

      CodeSOD: A Unique Way to Primary Key

      July 22, 2025

      BrowserStack launches Figma plugin for detecting accessibility issues in design phase

      July 22, 2025

      Parasoft brings agentic AI to service virtualization in latest release

      July 22, 2025

      Node.js vs. Python for Backend: 7 Reasons C-Level Leaders Choose Node.js Talent

      July 21, 2025

      The best CRM software with email marketing in 2025: Expert tested and reviewed

      July 22, 2025

      This multi-port car charger can power 4 gadgets at once – and it’s surprisingly cheap

      July 22, 2025

      I’m a wearables editor and here are the 7 Pixel Watch 4 rumors I’m most curious about

      July 22, 2025

      8 ways I quickly leveled up my Linux skills – and you can too

      July 22, 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

      The Intersection of Agile and Accessibility – A Series on Designing for Everyone

      July 22, 2025
      Recent

      The Intersection of Agile and Accessibility – A Series on Designing for Everyone

      July 22, 2025

      Zero Trust & Cybersecurity Mesh: Your Org’s Survival Guide

      July 22, 2025

      Execute Ping Commands and Get Back Structured Data in PHP

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

      A Tomb Raider composer has been jailed — His legacy overshadowed by $75k+ in loan fraud

      July 22, 2025
      Recent

      A Tomb Raider composer has been jailed — His legacy overshadowed by $75k+ in loan fraud

      July 22, 2025

      “I don’t think I changed his mind” — NVIDIA CEO comments on H20 AI GPU sales resuming in China following a meeting with President Trump

      July 22, 2025

      Galaxy Z Fold 7 review: Six years later — Samsung finally cracks the foldable code

      July 22, 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

    GPT-5 is Coming: Revolutionizing Software Testing

    July 22, 2025
    Development

    Win the Accessibility Game: Combining AI with Human Judgment

    July 22, 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

    Beware the Hidden Risk in Your Entra Environment

    Development

    CVE-2025-4356 – Tenda DAP-1520 Stack-Based Buffer Overflow in Authentication Handler

    Common Vulnerabilities and Exposures (CVEs)

    Amazon just confirmed its July Prime Day sale will be back, despite looming tariffs

    News & Updates

    CVE-2025-52997 – Apache File Browser Authentication Brute-Force Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    Critical Linux Vulnerabilities Expose Password Hashes on Millions of Linux Systems Worldwide

    June 2, 2025

    Critical Linux Vulnerabilities Expose Password Hashes on Millions of Linux Systems Worldwide

    Two critical local information-disclosure vulnerabilities affecting millions of Linux systems worldwide, potentially allowing attackers to extract sensitive password data through core dump manipulatio …
    Read more

    Published Date:
    Jun 02, 2025 (4 hours, 25 minutes ago)

    Vulnerabilities has been mentioned in this article.

    CVE-2025-5054

    CVE-2025-4598

    CVE-2025-4587 – WordPress A/B Testing Stored Cross-Site Scripting

    June 27, 2025

    PumaBot: New Stealthy Linux Botnet Evades Detection, Targets IoT Devices

    June 1, 2025

    Play Ransomware Group Used Windows Zero-Day

    May 7, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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