The model context protocol (MCP) is a standardized, two-way communications layer that enables AI/LLM applications to connect to databases, tools, and templates. MCP facilitates AI/LLM models accessing data (like files on one's computer) and tools to gather information or perform actions. It also enables software (like a development environment) to make requests to an LLM — with the main goal of improving contextual responses.
AI-powered models thrive on easy access to relevant datasets, and the model context protocol allows developers to access that reservoir of real-world data. MCP aims to be universal and limit (or even prevent) the fragmentation observed across the AI landscape. Developers can either build their own MCP applications or MCP servers to take full advantage of the protocol's capabilities.
Anthropic released the model context protocol in November 2024. Since then, it has been integrated by most AI vendors. Subsequent MCP updates have introduced schema changes, elicitation support, resource linking, new security best practices, and many more incremental improvements. The protocol is open source and offers support for multiple programming languages through dedicated SDKs.
How does the model context protocol (MCP) work?
Before the model context protocol existed, LLMs wanting to access files, applications, and productivity tools would have to use dedicated APIs. These unique APIs enabled the LLM to read files and interact with other applications — and those applications could also send requests to the LLMs.
While MCP doesn't eliminate the need for these unique APIs, it does provide a common gateway through which services and LLMs can mutually request resources without needing their own protocols — reducing abuse, maintenance needs, and overall fragmentation. There's a seemingly endless number of services out there versus a much smaller pool of LLMs. The MCP can save developers from custom coding LLM integrations for every use case and unique knowledge store.
This earlier process often required the following steps:
Defining function schemas and JSON responses for every LLM, which allow users to make functional calls to the AI service and perform specific tasks
Implementing custom code that immediately runs when a function is invoked
Repeating this process for every supported LLM, such as ChatGPT, Claude, DeepSeek, or Sonar
Conversely, MCP enables developers to create consistent specifications for the tools they're using, which are agnostic to any AI-based service. The MCP helps developers (and users) discover useful tools and strengthen integration. Developers no longer need the custom code they used before, and instead can harness the protocol for plug-and-play LLM access.
Which components power the model context protocol (MCP)?
Because the MCP harnesses the client-server model, it also uses many components that many may already be familiar with — such as MCP clients (integrated into applications and facilitating successful server connections), various MCP servers (exposing LLM-powered functions, contexts, and capabilities), and the transport layer that enables network communication.
Then there are the host applications, which describe the LLMs with which users interact. While we might envision firing up ChatGPT and sending prompts in this instance, host applications also encompass dedicated AI apps and AI-supported productivity tools. From step one onwards, users make calls to the LLM within the host application, which are forwarded to and enriched by targeted MCP servers, which then request a matching response from any backend databases.
This process involves the following steps:
The host application starts up and forms a connection in the background to the MCP server, which is primed to process incoming requests.
The client (built into the app or existing natively in the OS) speaks to each connected server to better understand its functionality. The MCP server essentially advertises "Hey, I can do this useful thing — and by extension, your users can too."
The server supplies the client (LLM model) with this information, which then enables the end user to submit relevant prompts.
Via the MCP server, the LLM model sends responses back to the host application where users can view them.
A growing number of integrations are popping up that take advantage of the model context protocol. Those include many of today's most popular platforms, such as GitHub or Slack, and leverage reference servers to streamline development. These work similarly to templates that let teams get up and running rapidly while inspiring developers to create their own equivalents.
Plus, a number of community-maintained MCP servers exist to demonstrate the potential of the protocol and LLMs, overall.
However, the continued rise in MCP's popularity will require smart management of access tokens, authorization, and adherence to applicable elements of the OAuth 2.1 specification upon which the MCP is partially based. Developers should maintain security by following the principle of least privilege, and by ensuring human involvement in the process to perform regular audits.
Does HAProxy support the model context protocol (MCP)?
Yes! HAProxy One includes built-in API gateway and AI gateway support, and can sit in front of MCP servers to help load balance incoming traffic. HAProxy One thus stops requests from overwhelming MCP servers and other backend servers and facilitates rapid response delivery — while delivering the next-gen security features (HAProxy Enterprise WAF, HAProxy Enterprise Bot Management Module) these modern solutions need.
This support will continue to evolve in lockstep with MCP. To learn more about MCP and AI support in HAProxy, check out our blog post, Create an HAProxy AI gateway to control LLM costs, security, and privacy.