All right.
MCP servers are simply wrappers or interfaces that federate access to various systems and tools, making
them accessible to AI applications in a standardized way.
And they do this by exposing functionality through three primary interfaces.
The first one is tools, so model controlled functions that the AI can invoke when needed.
So we saw the example of the weather tool get weather, get forecast get alerts.
And they all boil down to functions.
So we can expose any functionality that we want because we can implement in that function everything
we want from reading data, from writing data to other systems.
We can do everything we want in the tools we have total freedom.
So the AI system and here we saw cursor and we saw cloud desktop or any other application it can decide
when to use those tools based on the context.
The second thing that MCP servers can expose are resources.
And resources are application controlled data that is exposed to the AI system.
So it can be static data like PDF documents, like text files, images, jsons whatever format you want.
But it can also be dynamic.
So you simply tell how to get those resources dynamically, and they don't have to be static.
And we'll see an example in the next couple of videos of static resources and dynamic resources.
All right.
And the last functionality that MCP servers expose can be prompts.
It prompts are user controlled templates for common interactions, and they are predefined templates
that the users can invoke.
This usually helps to standardize rise.
Complex interactions.
Now I know the resources and prompts may not be very clear right now, but I promise you, once we see
examples of them and this is really going to happen in the next couple of videos, will understand that
this is very intuitive and actually very elegant.
All right.
Let's talk about building NCP servers and what options do we have.
So first of all we can manually create an NCP server.
And this would involve us to write maybe a couple of hundred of Python code or Node.js code.
Second, we can also use AI to generate NCP servers.
And we'll actually do this in the course.
So tools like cursor or NCP generator are going to help us do this.
And we can also use community built NCP servers.
And right now there are thousands of community built servers which are open source, which we can clone
and we can modify if we want to.
And right now we saw an example of the weather tool weather map server.
And if you want we can edit it because we have the source code.
And lastly, there are official integrations from companies like Cloudflare like stripe which maintain
their NTP servers.
And I think this is very similar to link chain where each vendor or vector store vendor maintain their
own link chain packages.
For example, we have a link chain package for link chain, open link chain, Google vertex AI, link
chain, anthropic or link chain, pinecone link chain, chrome, ADB, etc..
So the same thing is going to be with NCP servers, where each company which have a product that they
want to expose and they want other people to use, they will maintain the MCP server.
So and they also open source it.
And this also gives the motivation to do this because it will increase usage of their product.
So for example when stripe is going to expose an MCP server and it maintains it.
It actually increases the usage of their product.
So the companies really have incentives to maintain and to write really good MCP servers.
And this brings me into a very important point I want to address.
Do not reinvent the wheel.
So in case we need to implement an MCP server with functionality of a third party service, we should
first check what kind of MCP servers the third party has implemented.
Most chances that they did implement an MCP server.
We can use or we can borrow functionality.
For example stripe.
I do not need to reinvent the wheel and to implement my own stripe integration, because the stripe
team has already made a pre-built MCP server.
And I'm telling you this so you won't be in a rabbit hole of implementing a bunch of MCP servers that
somebody else has already implemented.
And if there is a feature that is missing, I think it's a good idea that you would contact that third
party, for example, stripe, to see if they have it on their roadmap to implement the feature that
you want.
Or maybe they can implement something custom made for you.
So how MCP servers can be ran.
So first of all, they can be run locally via the standard input output channel.
And we saw this earlier in the course when we ran locally the weather server.
But they can also run remotely via server sent events or SSH.
And we'll also see in the course an example for that.
And they can also run as Docker containers.
And I might show this in the course.
Please let me know if you want this kind of content.
All right I want to talk about a final functionality that MCP servers offer us to implement.
And this is sampling.
And this actually allows the MCP server to request the host AI system, let's say cursor or cloud desktop
to generate a completion given to a kind of prompt.
And this is really powerful.
And this really opens the door for a lot of functionality, but also has some security implications
and privacy implications.
And we'll cover it in depth in the rest of the course.
And I want to touch the topic of composability.
So any application or agent can be both an MVP client and server.
And this really enables us to have this kind of multi-layered agentic application that allows us to
have specialized agents that focus on particular tasks.
All right.
Let's talk a bit about the future.
And the MCP ecosystem is evolving rapidly.
And there are a lot of cool developments that are going to come out soon.
So first of all, let's talk about registry and discovery.
And there will be a central registry API for discovering MCP servers.
So this is really cool.
And you can list your MCP server that you implement and let other people use it.
Another thing, we can have verification of official servers.
So because everybody can implement an MCP server and put it on GitHub, this really opens the door for
a supply chain attack.
So a malicious user can upload an MCP server calling it stripe MCP server, and actually put their malicious
code that will steal your data or even run malicious code on your computer.
So if we have verification of official MCP servers, this really helps mitigate this issue.
And I think in the future we'll have self-evolving agents that can discover new capabilities in runtime.
This is very cool in my opinion.
And let's talk even more about the future.
And I tweeted a while ago saying that website will expose their functionality and their content to agents.
So just like we have a robot.txt that helps search engines to index the website, then web applications
are going to help agents discover them and are going to help the agents navigate through their applications.
So this is what will be in the future.
And we'll have well known endpoints.
And this is a standard endpoint like a well known JSON for websites to expose their capabilities so
they can be used by MCP clients.
And we're going to see in the near future also support for authentication.
So support for protocols like OAuth 2.0 for secure access of external systems and also session tokens
for maintaining connections.
And really, we can really enhance the security of the MCP protocol by integrating this.
And once this will be implemented I will be diving deep into this topic.