One of the interesting things that emerged soon after LLMs, was the creation of the Model Context Protocol.
It does exactly what it sounds like it does… LLMs provide answers to users based on context … so if you have chatted to ChatGPT for months … it will remember what you have said… i.e. it has context on you/your situation.
For instance, you might have input all your business ideas into ChatGPT, and now its answers will be more personalised to you because it has a better idea of the background (context). It’s like getting to know someone new, the more time you spend with them, the more context you have to understand them and refine your conversation around these understandings.
So all that was great, and then developers realised they wanted LLMs to have even more context … because there are these wonderful things called databases which have all our information in. So they needed a way to ‘talk to these databases’ rather than just rely on a traditional API.
Hence MCP was born.
Model Context Protocol (MCP) is basically a very cool standardised way of linking Language Models (‘AI’) to existing data information systems.
Protocols have always been fundamental to building the internet. Having standards that we all agree on makes things a lot simpler. Obviously, it doesn’t always work out that way, and you end up with walled gardens.
But MCP quickly emerged after LLMs to address the issue of how to make AI more useful, by getting it to co-ordinate actually doing something rather than just outputting text or data.
For companies, being able to ‘talk to your data’ is pretty awesome, but most don’t have it currently.
MCP operates between three different ‘things’:
- A host
- A client
- A server
The host is basically a typical application Like a mobile, web or desktop app but with AI programming in it.
The host application has a component that maintains a connection to another server – the MCP server – and this component is called the MCP client.
The server provides the context to the client.
An application (aka MCP host) will, as part of its functionality, manage an internal ‘client’ that maintains a connecting to a server (aka MCP server). Each server will have its own client … 1:1.
An MCP host can run locally on your computer, or on a remote server.
The architecture is very straightforward – two layers – data and transport layers.
The data layer is described in the JSON-RPC 2.0 format, and is used by both the host and server to both request information, and give information. For instance, the server can send data back to the host to request certain input from the user.
The transport layer is either standard input output for local (STDIO) or HTTP POST for remote.
More soon…
Leave a Reply