MCP vs API: Simplifying AI Agent Integration with External Data
YouTube transcript, YouTube translate
A quick preview of the first subtitles so you know what the video covers.
For large language models to be truly useful, they often need to interact with external data sources and services and tools. And until recently, that was typically done with application programming interfaces or APIs. Now, in late 2024, Anthropic introduced a new open standard protocol, that's model context protocol or MCP. And it has already made quite the splash and it standardizes how applications provide context to LLMs. So let's define these two terms MCP and API and take a look at their similarities and differences. Now a good metaphor for MCP is that it's kind of like a USB-C port for your AI applications and that's because it standardize its connections between AI applications, LLM's and external data sources. So, if you think about Just your standard laptop that you might be using. Well, that probably has a set of USB-C ports attached to it. That's a really old one. And in those ports, well, you can plug in all sorts of cables and they will use the USB-c standard to interface with all sorts peripherals. So perhaps you've plugged one of these things into a monitor. Another one is connected to an external disk drive and perhaps you've also added in a power supply for the third one. It really doesn't matter who makes the peripherals, they all work together using this common standard. Well, MCP is kind of like that. So if we take a look at really what's in it, there is an MCP host and that also runs a number of MCP clients. Now, each client opens a JSON RPC 2.0 session using the protocol that comes with MCP, so the MCP protocol, and that connects to external MCP servers. So we have a client-server relationship here. Now, servers, those expose capabilities. So perhaps we've got a server for access to a database, maybe we've got another one which gives us access to a code repository. And then maybe we have another server that gives us to an email server. So if we go back to the USB-C analogy, we can think of the laptop as being kind of like the MCP host. The MCB protocol, this is really what's signified by the USB C connection. And then the drive and the monitor and the power supply. We can think of those really as MCP servers. Okay, so that's the architecture, but what are the capabilities of MCP? Well, it addresses two main needs of LLM applications. And when I say LLMs applications, I particularly mean AI agents. And those two needs, one is to provide context in the form of contextual data And the other is to enable tools and the usage of tools by these AI