n8n Just Released Native MCP Trigger and AI Agent Tool [Official Walkthrough]

Video ID: 45WPU7P-1QQ

YouTube URL: https://www.youtube.com/watch?v=45WPU7P-1QQ

Added At: 13-06-25 21:16:24

Processed: No

Sentiment: Neutral

Categories: Education, Tech

Tags: AI, MCP, Model Context Protocol, N8N, Workflow, Tutorial, Programming, LLMs, Claude models, SD cards, RESTful APIs

Summary

Bullet points for the video:
1. Introduction to MCP (Model Context Protocol) and its relevance in AI industry.
2. Explanation of key conceptual entities in the MCP framework.
3. Demostration of how to use MCP server and client nodes within N8N workflow.

Transcript

hey flowgrammer! N8N just dropped a native 
MCP server and MCP client node in this  
video I'm going to quickly explain what MCP 
is and why it might be relevant for you and  
then we're going to take a look at how to 
use the new MCP server and MCP client nodes  
within n8n so if you already know what 
MCP is use the chapters to skip ahead
mcp is an abbreviation it stands for model context 
protocol it was designed and released by Anthropic  
creator of the popular Claude models including 
Sonnet 3.7 and it's an attempt to standardize  
the communication that LLMs do with other systems 
since its release near the end of 2024 it's gotten  
quite a lot of adoption in particular OpenAI has 
signed on to support the standard and various SAS  
apps and other desktop tools even are bringing 
support for MCP the reason that's important of  
course is the utility a protocol can provide 
really hinges on its network effect right if  
people aren't adopting it no one's going to use 
it so for example SD cards were useful because  
everyone used SD cards sony's memory stick that's 
a different story there's plenty of videos that  
will give you a really deep technical dive into 
what MCP is so I'm just going to keep it really  
high level and go over the key conceptual entities 
in the MCP framework the first relevant entity is  
the MCP host this is your LLM powered app that 
basically needs context from the outside world  
from outside systems or to interact with those 
systems i.e use them as tools so claw desktop  
would be an example of an MCP host the next one 
is the MCP client this manages the connections  
between hosts and servers which brings us to 
the MCP server which is typically a lightweight  
program that exposes various functionality and 
actions basically that you can take in that server  
to my understanding right now and I think a lot of 
us are still wrapping our heads around this I like  
to think of the MCP server as basically an API and 
docs that's sent along to the MCP host which is  
your LLM and this way it gets a single package it 
knows what it can use how to use it and then the  
ability to use it as well so it's an actionable 
API essentially in the context of an LLM now  
before we get into the cool new MCP functionality 
within NN I do think it's important to note that  
MCP is a new protocol and not everyone in the 
engineering community is happy with it which if  
we look at the case of microservices for example 
you're never going to get all engineers to agree  
on something but the good argument that I've 
heard essentially was look we've got a lot of  
already well established protocols for computers 
to interact with each other for example restful  
APIs so why did we need to go create a new 
protocol which is a fair argument nonetheless  
it's being adopted across the AI industry again 
big players are adopting this the end team has  
added it to make sure that the end community can 
be on the bleeding edge and exploring how these  
new protocols could help us do more and I think 
the big question that we're all asking and we'd  
love the community to help on is why is MCP not 
just another REST API what can MCP allow you to  
do that we couldn't do before in the context of 
n8n workflows and I think that's a perfect segue  
to jump into the n8n canvas and check out the 
new MCP server and MCP client nodes within NAND
i'm going to first show you how to use MCP server 
because it allows your claw desktop or any other  
MCP host to access the hundreds of different tools 
and and and custom workflows that you can build  
inside of Naden i think it's going to be super 
super powerful so from a blank workflow let's add  
our first step since the MCP server is something 
that our MCP host is going to consume in N it's  
going to be a trigger so let's search for MCP and 
then we see the MCP server trigger in here let's  
click to add that to the canvas it doesn't have 
any parameters right now this is in beta we're  
going to add some of the other things that MCP 
supports but the n8n team wanted to get this out  
get your feedback on this so we can iterate on it 
faster for you so if you do have any feedback make  
sure to go to community.net.io and drop a comment 
there so we've added the MCP server what we need  
to now do is give it some tools that then our host 
can access for this first example let's just add  
a really basic one and add the calculator tool 
because LM's are not that good at doing math so  
we'd rather have them use a tool for that so 
let's do that and let's save this now you're  
going to want to make sure that your workflow 
is activated so activate that next we need to go  
over to Claude or whatever your MCP host is again 
I'm going to use the Cord desktop app here if you  
don't have the Cord desktop app the dependencies 
you're going to need to run what we're doing here  
today is to download the Cord desktop app have 
an Enthropic account you're also going to have  
to have node installed because claw desktop today 
doesn't support communicating with MCP clients  
through SSE which is what the end team supports 
in the MCP trigger there's a lot of technical  
reasons why the end team chose that but you are 
going to have to use a gateway meanwhile that's  
going to basically do that SSE part and make sure 
that Claude can communicate with your MCP trigger  
once you open up Claude desktop make sure that 
you're in developer mode to do that from the top  
menu there's going to be a help section and it's 
going to say enable developer mode i already did  
that and I can't find a way to undo that but 
make sure that you're in claw developer mode  
and ask your favorite LM if you don't know how 
to do that all right so from Claude open the  
settings and then here we're going to go down 
to the developer section and we want to click  
this edit config button that's going to open up a 
folder and in here we see this JSON file so you're  
going to want to open that with your favorite 
text editor in this case I'm using Sublime unless  
you've been tinkering with MCP before this page 
is going to be blank and you're going to want  
to paste in this a few things to call out i am 
using Super Gateway here this is going to allow  
Claude to communicate with RMCP trigger over SACE 
protocol cuz Claude doesn't natively support that  
right now so that is a dependency and one pro tip 
here if this is failing if you're getting errors  
when you're trying this try to run this command 
manually in your terminal so npx and then pass  
this arguments super gateway s and then swap 
in your web hook URL because I was having some  
errors around this it was failing in terminal and 
I actually had some permission errors around node  
itself i fixed that and then it was working so if 
you're getting some errors around that first try  
to run this command manually in your terminal okay 
the structure here is we've got MCP servers we can  
have many of these MCP servers right and in this 
case we need to now paste in that web hook URL  
let's go back to my workflow let's open that up 
let's get the web hook URL copy that production  
URL let's copy that and let's paste that in here 
so this is all good here we're going to save this  
now we do need to restart Claude so I'm hitting 
command Q to close it we're going to open it back  
up it's loaded and we see now we've got one MCP 
tool available here and we see that we've got the  
calculator tool and it's from the NN server now 
we could have called the server calculator as well  
but let's assume you have like your end instance 
and you're going to want to have a few tools that  
you give cloud access to so this this could be a 
good way to go do that tool is called calculator  
let's see if we can run it so what is 50 * 10 use 
tool let's see okay so we get a permission check  
in here this is interesting nice it's even showing 
you what arguments it would use okay let's allow  
for this chat well this is really cool how it's 
kind of the UX of how it's showing you how it's  
interacting with that okay so this is what it 
responded with it's 500 let's go double check  
that so in my workflow I can go over to the 
executions great this one just ran let's just  
open up the calculator and see yep that's the 
500 response query 50 * 10 perfect and so this  
is just the calculator tool right i'm sure Claude 
even has its own calculator so maybe that's not as  
interesting but what I'm trying to show you here 
is how to get unblocked on setting this up because  
actually creating this thing here took me a bit 
of effort there was a few headbanging moments  
so hopefully you avoid that if you're watching 
this on YouTube I'm going to have this in the  
description if you're watching this somewhere else 
get to the YouTube video I will have this snippet  
here for you and just to call out again we can 
add many different tools here there's all various  
vector stores you could use so your claw desktop 
or whatever host you're using can be a knowledge  
rag assistant already connecting with lots of 
different apps and services but some of the really  
cool ones to call out I think where Nitn end is 
going to be really interesting is again the call  
end workflow tool which is going to allow your MCP 
host to interact with any arbitrary end workflow  
that itself could be an AI agent it could be 
some airgapped self-hosted enterprise information  
that's that's really really sensitive for you so 
that's how you set up the MCP server trigger in
N if I click the tool here from my AI agent 
let's add that to the canvas mcp and we'll  
see the MCP client tool so let's click to add 
that now we'll set it up in a second but just to  
contextualize this the AI agent in this case is 
a host right as the host it's going to interact  
with the client in the client we're going to 
configure the connection basically to the MCP  
server so then the AI agents our host it's using 
the client to interact with our MCP server now  
since we just built an MCP server through this 
MCP trigger in another workflow let's have our  
AI agent here interact with that calculator tool 
i'll double click on it and we're going to add a  
credential to connect with we'll create a new 
one and inside the credential the SSC endpoint  
that's what we need to actually get from our 
MCP trigger here so I'll go in here and grab  
that production URL paste in our SSE endpoint 
and let's save this and okay great great we've  
got a connection test now that this is set up 
let's close the credential since an MCP server  
can offer multiple tools we could choose to get 
all of the tools that that server has available  
or we could just select those so in this case 
we can see we've established a connection with  
the system because it's shown us this calculator 
here perfect so now let's go back to the workflow  
canvas and let's give this a quick test by opening 
the manual chat let's ask it to calculate 15 * 10
okay it's used the tool let's have 
a look in the logs here yep it sent  
the query and we got the response now 
let's go over to our trigger here let's  
go in the executions and we can see 
that yep it also ran perfect that's  
how you set up an MCP client with MCP 
servers from an AI agent within N8N
so I just explained what MCP is how you can set 
up an MCP server in n8n natively the same for  
setting up an MCP tool which is an MCP client so 
that you can connect with other MCP servers the  
next step is go update your version of n8n and go 
have fun and if you haven't signed up for n8n yet  
u make sure to use my coupon code max 50 after 
your cloud trial that's going to give you 50%  
off n8n Cloud for a whole year you can 
self-host and it ended in as well but if  
you choose our cloud option my boss is going 
to be really happy if you if you go to cloud  
of course i hope you found this video useful 
please do give me some feedback on what you'd  
like to see more of or what you think I may 
have missed i expect this isn't going to be  
the last video I do on this topic thank you 
so much for watching i really appreciate it  
i'm Max the original flowgrammer you're awesome 
for watching this video and happy flowing [Music]