In this tutorial we are going to learn something super exciting.
The Model Context Protocol or MCP, which is a hot topic in the AI space right now.
And in short, it can be a game changer for building AI agents.
I'm going to briefly explain what it is and why it's important.
Then we'll jump into an A-10 where I will show you how to actually use it in workflows.
It might sound complicated, but trust me, it's actually pretty straightforward.
And once you will see it in action, you will quickly understand why it's so important.
According to anthropic, the company behind cloud, one of the best large language models on the market
right now, MCP was launched in November last year but only recently started to gain real traction.
So basically, MCP is a standardized way for large language models like cloud or ChatGPT to connect
seamlessly to all your favorite apps and services like Gmail, CRM, Ms. Calendar's databases, rack
agents, and more.
And MCP gives LMS access to tools and data and lets them choose what to use based on the context of
your prompt.
As the name model context protocol suggests, a great analogy is this MCP is an open protocol that standardizes
how applications provide context to the LMS.
So think of MCP like a USB-C port for AI applications.
Just as USB-C provides a standardized way to connect your devices to different accessories, MCP provides
a standardized way to connect a modulus to different data sources and tools.
This diagram shows how MCP acts as the layer between your agent and everything it needs to work with,
like tools, data, and user input.
So on the left you've got tools like search, search, GitHub.
So this can be triggered automatically by the agent in the middle.
There are resources like PDFs or user profiles which provide context and on the right prompts they let
users guide the agent with templates like summarize or check compliance.
So all of this is processed by your LLM or agent.
And the MCP layer sits just benefit making sure the agent connects to everything properly and consistently.
So then finally the agent can take action using APIs and microservices, databases or team tools all
through this one unified interface.
So instead of building custom code for every integration, MCP acts as a universal translator for your
agents.
Now let's dive in and see how you can use it with N810.
Recently, at the beginning of April, the N810 team released native MCP nodes, which means we now
have dedicated had built in support for working with MCP.
Before that, the only way to use MCP in N810 was to self-host N810 and manually add the MCP server
as a community node from GitHub.
So it worked, but it was definitely more technical.
Now it's much easier and I will show you step by step how to get started using this new native node
in your workflows.
So yes, in this tutorial I'm going to walk you through step by step how to set up the MCP server in
N810 and what it can do, and how you can connect to it from tools like cloud, desktop app, or even
another workflow using the MCP client node.
The MCP server trigger listens for incoming requests from tools like cloud Gmail to send emails, Google
Calendar to create events, or calculator.
Just a simple example tool.
So these are all tools our agent can access and control.
Now on the other side.
You got the MCP client.
So in this setup, the agent starts when a chat message is received.
So for example, a user saying add a meeting to my calendar.
So you can ask the agent to do that for us.
And then it passes the request to the agent host.
And the MCP client node here gives the agent access to all the tools available on the server side.
So all those tools.
It also remembers what tools are allowed and manages how the agent communicates with them.
So the server side handles the tools and the client side is where your LLM is.
And we call that the host.
So in our example here the agent is a host because it connects to the MCP server to call the tools.
So we'll also be using the cloud desktop app as another host, and I will show you just how cool that
setup is in action.
Now let me give you a quick look at what this setup can actually do.
So again, on the left side of my workflow I've got the MCP server.
It has access to a few tools.
Now let's say I jump into the cloud desktop app.
Which acts as a as a host in this case.
In our second example, the A agent acts as a host.
But for this demo we are using the cloud desktop app.
So when it connects to my MCP server through this node, it instantly sees all the tools I've given
access to.
So now in the cloud desktop app I can ask it something like send email to Damien at n810 demos at gmail.com.
That his agents course is amazing.
Use gmail tool and when I press and when I press this button to start this task.
You can see that cloud processes the requests.
And I'm going to give it permission to to do this task for me and use the Gmail tool we added in our
N810 setup to allow for this chat.
Here you can see how the setup uses the Gmail tool to send the email.
The email has been successfully sent to Damien at n810 demos at gmail.com.
Which with the subject your agents is amazing.
Now let's jump into my gmail inbox and check if I got the email.
Let's refresh it.
And as you can see, I got an email.
The subject agents course is amazing.
Hi Damien, I wanted to let you know that your agent's course is amazing.
The content has been incredibly helpful and informative.
Thank you for creating such valuable resources.
Best regards.
So it works.
And now what actually happened here?
Let's go back to setup.
So so MCP stands for Model Context Protocol.
So think of it as a bridge.
So you set up a central server.
So in our example the MCP server with tools and workflows you want to share.
So then from outside other apps.
In our example, we are using the cloud desktop app, or agents can connect through the MCP client node
and instantly use these tools.
So no need to manually add every tool to every agent.
And it's super efficient, especially if you are managing a lot of workflows or building AI systems.
So again, we connected the cloud desktop app to our MCP server trigger and large language model.
So cloud in that case is able to use these tools to perform specific actions.
And we wanted it to send an email to myself.
But this example is just for the sake of this tutorial.
So it's very simple, but you can add a lot of more tools to this setup and give it more complex tasks
to do.
All right, now let's build this together from scratch.
So first go into a new workflow and let's rename it to the MCP
And now we are going to add the first node.
So at first step.
And now search for MCP.
And we are looking for this node.
So MCP server trigger which expose anytime tools as an MCP server endpoint.
So click on it.
Now make sure to switch over to the production URL.
This is very important.
Give it a simple path like MCP and click authentication off for now unless you need it later.
Now we are going to attach some tools.
So you can add things like calculator.
Nodes email.
So add tool search for Gmail email tool.
Now make sure your Gmail account is connected.
Leave it as set automatically.
The resource as a message operation send.
We want because we want to send a message.
Now we want to define this parameter automatically, so click on it.
The same for the subject.
We want to leave image type as HTML and we want let the model define this parameter as well.
Now we want to add option append and attribution and switch it off.
All right great.
Now let's use the Cloud Desktop app as our MCP host to connect to this MCP server.
Trigger to be able to use these tools as I showed you in the example.
So now you need to download the cloud desktop app now.
In order to download the cloud desktop app.
Go to Google Type Cloud desktop download.
Click on the first link.
Now choose your operating system.
Windows or Mac.
It will download the file for you.
Just wait a few minutes.
All right, now let's click on that image to install the application.
Let's just finish.
Now once you install the cloud desktop app this is how it's going to look like.
Now very important step is to go to the settings A help.
And here you have to enable the developer mode.
It doesn't show up because I already done it.
So.
So please make sure to enable the developer tools.
Once you do that go to File Settings.
Click on developer.
Edit configure and it will automatically show you this file.
Open it.
And for you, this file will be empty.
I'm going to leave this code snippet in the resources, so you can just simply copy and paste it here.
If you don't have any source code editor on your system, because for me, it opened the file automatically
in Visual Studio Code.
Simply go to Google and search for Sublime Text and install it, and it will automatically open the
file for you in the sublime text.
Now here is something important.
The team recently changed their MVP configuration format.
So they moved from using Super Getaway to a new MVP remote approach.
So the old format used to look like.
Let me show you.
Got it right here.
So the old format used to look like this.
Now with Super getaway and webhook URLs.
But now it uses MVP remote with proper authentication tokens.
And it look it looks like this.
So this new format is more secure and readable.
Now what this means and this is really important, if you are using a cloud version, you still need
to use the old connection because if you check the URL from your MCP trigger node.
You will notice that at the end there is SSE, which means it's using server sent events.
So you need the old super gateway configuration, but you need to install Node.js, npm and NP packages
because as you can see in both connections, they use the NP command and NP runs the super gateway package
in the old format and the MCP remote package in the new format.
So if you are using the self-hosted version or the latest N810 setup, then you can use the new MCP
remote format.
You should already have Node.js installed since it's required to run N810 by using the wrong format,
you will not be able to connect N810 to Cloud Desktop app, and I'm going to provide detailed instructions
on how to install NodeJS, NPM and NP in the resources section of this lesson.
So to clarify, if you are using any cloud paid version in order to connect your instance to Cloud desktop
app, you need to use the alt code snippet.
But you have to install NodeJS and required packages.
But if you are self-hosting then you can use this new connection.
You can find this configuration in the official documentation.
I'm going to include the correct code for both scenarios and all the links in the resources section
of this lesson, so you can easily use it.
Now, in order to connect your Cloud desktop app as a host to our server, we need to go back to N810.
Open the MCP server trigger node.
Make sure to switch over to production URL.
Copy it.
Go to the code snippet and paste it right here.
Also make sure to save it.
Okay, great.
Now, when you go to the cloud to desktop app, you will see.
Let's open it.
And as you can see, we don't have access to any tools yet.
This is because we didn't make.
Oh yeah.
Could it not attach the MCP server in ten.
So which means our MCP and A10 server is disconnected.
And in order to connect it properly, we need to make our workflow active.
So this is very important step.
So make sure to make your workflow active.
Alright great.
Confirm.
And now let's go back to the cloud desktop app.
And now as you can see we successfully connected our desktop app to the workflow because two MCP tools
are available now, so cloud can use tools provided by specialized servers using Model Context Protocol.
And now we have access to Calculator and Gmail, the tools we have added to our MPC server node.
We have a Gmail and calculator.
Now let's test it.
For example, let's ask close to us.
Multiply 48 by 186.
Use calculator tool and click submit.
It's gonna use that tool from our workflow.
Now we have to give it permission to use external integration.
So calculator from N810 workflow.
As you can see we have an input here for this chart.
We receive the results.
And now to confirm, when you go to the Na ten and we go to executions.
And the last execution succeeds.
Let's wait a moment.
As you can see, code from our desktop app connected to this MCP server trigger and and made the calculation
for us using the calculator tool.
Now let's go back to the editor.
Alright.
Perfect.
Now, instead of using the cloud desktop app as a host to connect to our MCP server, let's build the
second part of the workflow and use a agent as a host to connect to our MCP server.
To use these tools.
So let's build this agent host from scratch.
So let's go back to our workflow.
Let's add a agent.
Now let's add a trigger.
So in chat.
Let's connect these two nodes.
Now let's add the chat model.
So the brain for our agent just simply.
ChatGPT.
For now as a tool we are going to use MCP client.
So our MCP client will be able to connect to the MCP server and use these tools.
So simply search for MCP MCP client tool to connect tools from an MCP server.
Alright great.
And here we have to paste the same webhook we are using in the previous example.
So go to MCP server trigger.
Sugar production.
Production URL.
Copy it.
And paste it as an endpoint here to this field.
Great.
Now let's save it.
And now when I go to the open chart.
And give our agent so Gpt4 mini.
The same task we give to cloud through the cloud desktop app.
So send email to demon, etc. and click submit.
It's gonna use.
The same email tool.
Let's see the output I'm going to expand it.
Human input.
Send email to Damien.
Output.
In JSON so we can see the code.
Now let's go to execution to make sure it's successfully executed the task.
All right.
Let's open the last execution.
As you can see, MCP client MCP client was able to use Gmail tool to MCP server.
Let's go back to editor.
All right.
Perfect.
Let's go back to the editor.
Now you don't need a cloud subscription to use the MCP connection through the cloud desktop app.
However, keep in mind that if you are using the free plan, the quantity of queries you can send to
Anthropic's models may be limited.
So depending on what you are building, you might eventually want to upgrade for higher usage limits
and more flexibility.
Ability overall.
MCP opens up a whole new world of possibilities for building more powerful, connected agents.
It acts like a universal bridge between your agents and the tools or data they need, allowing multiple
agents to access the same MCP server workflows for each one without needing to configure tools or recreate
workflows for each one separately.
So using MCP can save you a lot of time, make your setup much more efficient, and help you scale your
AI systems faster.
Now that you understand the concept and setup, you can start using MCP to make your agents smarter,
faster, and more useful for real world applications.
And please note this is a very new concept, and I personally believe that MCP will become a key part
of how advanced agents are built and connected in the near future.
I will see you in the next lesson.