n8n MCP Tutorial: How to Build MCP Servers in n8n (Beginner to Pro)

Tin Rovic · Beginner ·🛠️ AI Tools & Apps ·4mo ago

Key Takeaways

This video tutorial covers building MCP servers in n8n, a workflow automation tool, and demonstrates how to integrate MCP with various tools and services, including Google Sheets, Gmail, and Open Router. The tutorial provides a step-by-step guide on how to create MCP servers, connect them to different tools, and use them to perform tasks such as data retrieval, email sending, and internet searching.

Full Transcript

Welcome to another miniourse. Now in this course I will be talking about MCP's model context protocol. You probably heard about that term already. So this is going to be a course where I will basically break down every single thing around MCPS and around pretty much everything around it. So introduction to MCPS is in today's video. So I will just go around the introduction what it is, how it works and some MCP uh example or one MCP example to be exact uh just to show you what it is and kind of so you can understand it in a more brief way. Okay. So what is uh MCP? So MCP is the model context protocol. It's a standardized way for AI models to interact with external tools, data and environments. Now, if you are if you ever use Chad GPT, which I'm sure you did, uh you know, you probably thought, you know, it would be a good idea if Chad GPT can actually interact with some of my tools like for example, 11 Labs, um maybe like GitHub or like you know, any type of tools like that. And sure, you know, you can build automations in NA10, but there is a much better way to kind of, you know, use the LLM, Chad GPT in this case with these tools. So, as you can see, this is before MCP. You had Slack, you had Google Drive, you have GitHub, and you need a unique API to connect with an LLM. Now, in this case, you're connecting everything to one single MCP. Think of it like an USB like a USB uh hub and then that USB hub goes straight into LLM. It's a unified API. So all of these APIs are unified in one single model context protocol. And this is again a standardized way for AI models to interact with those external tools like Slack, Google Drive and GitHub. There is one really good article on model context protocol or MCPS right here. Um it's by Phil Schmidt and here he basically breaks down and as you can see it says think of it like a USB for AI integrations. Before standards like USB connecting peripherals required mass of different ports and custom drivers. Similarly integrating AI applications with external tools and systems it was a problem. Right here it says MXN problem because they were not compatible. Right? So here we have that unique you know APIs coming into an MCP and then MCP can be connected to an LLM. So connecting those to an MCP is much easier and then using those with LLM is also easier than just doing it this way. So as you can see right here we have like ho hosts, we have clients and we have servers. So hosts can be applications the user interacts with such as claw desktop or ids like cursor custom agents. Clients can be live within the host application and manage the connections to one specific MCP server to maintain and one against one uh to connection and then servers external programs that expose tools resources and prompts via standard API the AI model via the client. So to the AI model via the client. So that's that's basically what u you know the structure like structure or MCP like defines a client server architecture and this is like a client server architecture and then we also have the current components of MCP servers which include tools right so these are again like functional uh functions tools like that element LLMs can call to uh perform a specific action. Then we have resources. So these are like data uh resources and sources that LLM can access similar to like get endpoints in REST API similar like similarly like you're connecting APIs to NA10 and then prompts these are predefined templates to use those tools or resources in the most optimal way right so this is kind of more in detail uh I don't want to bother you with details because you don't have to know everything you just need to know why they work and how they work okay so this is bas basically what they are and how they work. Right now obviously you know if you are for example thinking about using MCPs one example right here could be um claw 3.5 set which uh basically kind of created the MCPS. So they created MCPs. Enthropic was the company behind claw 3.5. Sonet and they created the MCPs and it's adept at quickly building MCP server implementations making it easy for organizations and individuals to rapidly connect their most important data sets with a range of AI powered tools. So what does that mean? That means that you can connect 11 labs to u you know an LLM like claude. in this case claude because claude has the most easiest way. This is what it writes here. Uh it has the most easiest way to connect uh when it comes to the MCPS. So it has that feature of MCPs and you can connect multiple different tools to Claude and those tools can then you know create Claude to be a much smarter AI agent. So in this case you can connect 11 labs to claude and when you compare when you combine those two you can get an AI voice agent. So when you go in a claude you can say u you know hey can you call um you know a pizza shop or something like that and then 11 labs you know 11 labs they have like u in 11 labs you have like a voice AI agents they that can call uh on behalf of you with their voices. So they have like AI voices available and you can do everything uh you know you can do like everything from the 11 labs. You don't have to use 11 labs. You can do everything from claude right so you can go in claude and just say hey call me a pizza shop and I want margarita pizza and you know the AI will call the pizza shop and order the pizza for you. Okay so that's something that you can do with the MCPS. Okay so obviously this is how it looks like in uh cloth. So in cloud you can set up and access your MCP tools like 11 labs, GitHub etc. This is how it's going to look like here. You will have like a a hammer and this is an icon of a hammer and then you will have like 16. So this just means there's 16 MCP tools available. You know just to translate this it means it has it's claude is connected to 16 different tools and that could be like 11 labs, GitHub, Slack, Google Drive whatever right and in this case you can ask what is in my cloth folder in Google drive for example and it will go through the the tool that is Google Drive and it will basically search for those particular tools from there. Uh essentially what will happen is Claude will give you an answer and you can do everything through Claude. Claude basically then becomes an AI assistant on steroids because it has tools underneath that you know uh he can use or that Claude can use right it's not he or she it's an LLM but uh you get the point. Now obviously this is something you can do in NA10 but in NA10 you can do that with AI agent. However, uh this is slightly different because you can do this in uh claude. That's first. Uh and you know, I don't think Chad GPT has this feature. And second of all, you can also uh you know, you can also create this uh and connect it via NA10 via MCP server and via MCP client. So, we'll also be going through that. I don't want to like bombard you with a lot of information right at the start of the course. Obviously, we're going to be taking a look how that works in the next few modu mod modules or lessons. Uh, but yeah, that's pretty much it, guys, for this lesson. Uh, we'll see you in the next one. Until then, make sure to kind of go through this lesson and understand what the MCPS are. So, yeah, thank you. Welcome to another lesson in this MCP miniourse. Now, today we're going to take a look at MCP versus AI agents. some of the key differences, how are they different, when to use each one, and some examples as well. So, let's get started. So, as you know, MCP server is context management layer. It's basically a backend brain for storing and injecting dynamic content. And AI agent is the interface or personality that interacts with users using the context for the MCP. Okay. So in the AI agents, you're using MCPs, right? You're connecting tools and that tool is an MCP that is connected to an MCP server. It's an MCP client connected to an MCP server. But MCP server as it is is essentially a context management layer. It's like a backend brain for storing and injecting dynamic context or dynamic content right inside of it. So that's basically the key difference. So um if you're looking for like let's say you have um you know you have like an AI agent right and you're working with an AI agent and that AI agent can be connected to different tools right in this case it can only be connected to an MCP client that is connected to an MCP server that has all the tools right so that's what the the the key difference is right so the AI agent actually uses the MCP to get the context the dynic context and then answer that question or query that you know someone asked an AI agent. So right here is an example right. So uh imagine you're building a YouTube video script assistant. So MCP server will hold the target audience right. So for example early stage founders it will hold the writing style. So for example witty clear short paragraphs and then it will also hold call to action which in this it would say mention our course at the end. And then the AI agent would receive a prompt like you're a script writer. Use the target audience writing style and call to action below. Now write a script for how to launch a SAS in 2025. So as you can see the prompt is generated by NA10 with MCP feeding in the context blocks. So MCP is here already preset up. So it has like a preset. I like to call it preset up with the target audience writing style call to action. And then all you have to do is just go to the AI agent and you can just say you know hey just write me a a script on how to launch a SAS in 2025 and you know the MCP will already know and the AI agent will already know um or actually the AI agent will already know that uh the target audience is this the writing style is this and the call to action is this based on the MCP server. Right? So again AI agent uses the MCP server to get the context and based on the prompt it will write uh in this style in this target audience and in this call to action it will write this particular script right here. So this is just an example uh you know we could have like many examples like this one again in in this course we al also built uh some of the um like um assistants already. So again at the end of the course you will also see how we build a more complex assistant but this is essentially an example uh and then why you need both right MCP server ensures a memory and modularity and AI agent handles the user interaction based on that memory and modularity right so together they let you scale complex multi-purpose assistance with persistent behavior memory and logic this is really important persistent behavior memory and logic because we have an MCP server that is connected to an AI agent. Usually the AI agent would be less smart. um right in this case where we don't have MCP server but once we have an MCP server it ensures that we have memory and modularity and most importantly persistent behavior because in this case since we have this right here we'll have persistent behavior because this is already like a configuration that we added so think of the MCP server and MCP uh like a connection to an AI agent that is essentially configuration or preconfiguration or pre-etup for an AI agent, right? So that's what I like to to call this. And obviously here you can see right the the difference the difference is really uh that you know an AI agent will use an MCP server uh but an MCP server won't use an AI agent right so AI agent relies on the MCP uh to actually go and create uh you know multi-purpose assistance with persistent behavior. So this is kind of like what I wanted to show uh you know the the difference between the MCP server and AI agent. So again the concept here is that an MCP server is a system or API that manages, stores and injects structured context blocks into LLM prompts right uh the AI agent here is the actual assistant that communicates with users right uh by the way this this image was generated with chat GPT that's why I have some of these misspellings here but essentially the role here is with the MCP server supplies dynamic memory context and task related data to the agent An AI agent uses that context to generate humanlike responses. So as you can see here is like just a simple overview, right? An MCP server is a brain organizer feeding memory and rules to the AI and then the AI agent is a digital employee powered by brain LLM plus MCP fed memory. This is what it is the brain and then it's built uh with right the MCP server usually hosted as a backend can be on NA10 on superbase firebase etc. an AI agent often created with claude open AAI or other LLMs. So it's using other LLMs um compared so when we compare these two right an AI agent is using other LLMs and then when you connect MCP server it's even smarter right with an LLM it's smarter but with uh this it's even more smarter so MCP server uh manages it's a backend system so uh yeah it's basically a bacon system and then the AI agent uh it it does manages so it it's it's what users see and interact with. So, you know, that's something that you can manage. Uh, but yeah, that's pretty much the the whole the whole point of this video is to kind of show you why you need both some examples and obviously the key differences between MCP and AI agents. Hopefully, this video and this lesson kind of gives you an insight into what MCPS are even more. Uh, and uh, yeah, we'll see you in the next lesson. Thank you guys. Okay. So in the previous lesson in this course I showed you how MCPS work, what are the MCPS, how you can connect them, right? Introduction to MCPS and some examples. Now I will show you live example in claude how you can integrate MCP in claude and how you can let clo to allow actually clo to access your desktop and your laptop okay or your computer. So in this case as you can see I showed you that claude has right here MCP tools available but uh if you go to claude uh right these MCP tools so let's say we go to claude these MCP tools are not available here so what we want to do is we want to download the claw desktop app and on this claw desktop app we'll integrate an MCP which will act as um you know our assistant istant in a way. So I will show you how to do this. So first of all, make sure to download your Mac OS or Windows version of Claw Desktop. Okay, once you download this, you would be able uh to open it up. I open it up right here. I will go with a new chat here. And um as you can see, what you can do is you can go here to settings. And in your settings, you will have developer settings. As you can see, I already have here a file system which is an MCP. And as you can see, this is the arguments and stuff like that. We have the commands. We can edit config here for you. You will just need to edit config. And you will need to doubleclick on this right here. Okay. Now, I usually don't open this like this. I open it with text edit because it's the fastest one. And as you can see, this is the code for MCP server. So, what are we doing here? Here we're pasting a code from an MCP server. Uh an MCP server can be virtually any server. It can be 11labs server, right? In this case, you would be using um voice features from 11 Labs. It could be any other MCP, maybe from u you know uh Microsoft or you know any other MCP. And you can paste the code from that MCP right in here. Okay. Now in this case what we're going to be doing is we're going to be using a very simple example here which is called modelcontextprotocol.ioquickstart/user. Here what we actually have is as you can see we have MCP introduction for claw desktop users. Okay. And what this MCP does it basically access your computer so that you can ask questions like you know what are my files on desktop? What are the names of the files on my desktop? you know, can you find me a file named like this on my computer? And then it will find a file for that. Okay. Now, in this case, as you can see here, we have a a code already. So, we just copy that code or we copy it here. And keep in mind, I'm on Mac OS. For you, if you're on Windows, it will be like this. So, all uh that is different is this right here. Okay? So we will need to change the username on Windows or Mac right here to our username. Okay. So we copy this. We go in a CL in our cloud and as you can see here that is the code. So we just paste the code, right? And this is the same code. I just added my own uh username. If you don't know what your username is, you simply go here on Finder and in Finder you can see your username right here. Okay. So that's how you can um know that this is your username. Okay. And just enter your username and then make sure that is in here. Once that is in here, you will need to exit out of cloud. Okay. And you will need to go back in your cloud. So you just need to restart the claude. Now once you restart the cloud, you will get this right here. Okay? These are the tools that are currently available within claude just because we've integrated an MCP inside Claude. Okay. And in here, as you can see, we can read files, we can read multiple files, we can write files, edit files on our computer. We can create directories, list directories. We can even do the directory tree, move files, search files, get files, information, and list allow directory. So what we can do here is we can say what files are on my desktop right now. Okay, right now. And then as you can see first what will happen is um it will send the request to the MCP. Then as you can see um I can access your desktop directory and obviously you will need to allow access you will get like a a screen where you will need to allow allow the access and as you can see here it says what's currently on my desktop. I have MCP course which is a folder. Uh if we go on our desktop yes that's true. Uh then we have DS store which is a hidden system file which is not on the desktop currently. It is but it's hidden. And then we have localize which is also a hidden system file. So right now what I can say is what's in what's in my MCP course folder and then obviously it will go through the folder here as you can see desktop MCP course inside your MCP folder there's one file. What is MCP? So this is me preparing for the MCP course which I'm recording right now. And as you can see we have only one uh file right here. So this is what you can do with MCPS and this is like a very simple overview and very simple example right. So in this case we're using an MCP from Claude. Keep in mind you can also integrate uh as I showed you previously you can also integrate 11 labs and other tools in claude and this way you can connect me as many tools as you want to claude. In this case, we only connected a tool that has access to our computer. And that tool is essentially an example MCP right here. In this case, for claw desktop users, right? So, as you can see, it says in this tutorial, you will extend cloud for desktop so that it can read from your computer's file system, write new files, move files, and even search files as you can see right here. So, we can go here and we can say, can you search for a file named banner on my computer? And here it will go and it will search the file. Sometimes what happens is you get errors as you can see. Although always this is the the the window that I was uh telling you about. Currently we need to allow again. And it's currently searching for files. As you can see it didn't find any files with banner in the name. So yeah that's what I was just uh searching for. And as you can see this is how the u MCPS were searching for that file. And here we have also files as well. pattern banner right so let's say we want to go here and let's say in blog we have alternative PSD we can go here what about alternative in the name of the file and then I'll search for files with alternative and keep in mind I'm doing all of this with a free cloth uh desktop okay now as you can see it didn't find any files with alternative in the name on desktop or downloads folder either. This is because it it didn't find it because it did it was not searching for it in blog. It was searching for it in desktop and downloads. And keep in mind if we go here in our uh cloud settings and if we go back to developer edit config and if we go here, if we open this with u text edit, you will see that this will only be applied to desktop and downloads. Okay? it will not be applied to any other u any other u folders right in this case I was searching in blog but blog is not allowed here so um as you can see I can go here and I can simply copy this right and I can paste it here obviously with a spacing like this right and I can add a folder that I want right so it can be maybe documents right it can be documents I can add documents here so instead of downloads. I can go documents and then I can hit control save right and I can go back and obviously I need to restart claude again. I will also exit windsurf here. We'll go to claude. Okay. And then in here you would be able to go currently as you can see it's uh not available. That's because you know right here if we go here this MCP is only created to actually go and use this the this folder so you won't be able to change it right as you can see right here obviously you know you can restart cloud and everything but you won't be able to change it so I just wanted to show you that so uh yeah if you thought as you can see there was error right here so we need to go back into our MCP here if we go to settings developers edit config PE if we go here open width text edit and we can delete this one right and then we can ctrl S. So in ideal world this would work but this doesn't work because MCP doesn't have that feature allowed. Okay. So we cannot use that. So if we go back to cloud here as you can see right here we have the tools back here as you can see. So that's pretty much it how it works. I just wanted to show you how it works, how you can integrate MCP in cloud. Now obviously in the next lessons I will also show you how you can integrate this in NA10 so that you can simply go in NA10 and connect MCPS. We'll also do some advanced MCP uh trainings as well. But currently this is just for uh a brief beginners, beginners that are just coming in. So hopefully you enjoy this video and we'll see you in the next lesson. Welcome to another lesson in this MCP mini course. Now, today we're going to be showing you uh how you can use uh this two nodes in NA10. Now, first and foremost, I got to say, make sure you watch every single lesson from the start. This is the third lesson. So, we already showed you in the previous lesson how to connect MCP to claude. And in that case, this is a very simple example of using MCP uh servers in cloud. Okay. Now, in this case, what we're doing is we're going to be breaking down these two nodes in NA10 and how you can use MCP server trigger and MCP client in NA10. Okay. So, first we have MCP server trigger, right? So with MCP server trigger if you click as you can see you will have a test URL and you will have a production URL. So test URL is if you understand web hooks and if you don't understand web hooks make sure to watch some of our other courses in our premium community. We'll be also releasing a NA10 course as well for beginners. But uh essentially every web hook has this code. This is a SSE code for MCP server. Okay. Okay, you don't have to know everything right now, but test URL is being used when it's the workflow workflow is not active and when the workflow is active, you're using production URL. Okay, you can also add authentication to make your MCP server more secure. Okay, but we're not going to go too deep into it. Okay, so with MCP server, what you what you're essentially doing is you're connecting multiple different tools to your MCP server. So for example, I can go here and I can connect a Google sheet tool. Okay, get rows and then I can go here. Get rows from let me just switch the account here. Get rows from error logs from this list. Okay, and you know let's say we have this MCP server trigger and we have like thousands of tools here, right? Imagine you have like thousands of tools. Then what you can do is you can essentially use an MCP client to connect to that MCP server trigger. But how how can you connect MCP client to an MCP server trigger? Well, you need to go into an MCP server trigger and obviously make sure that your workflow is active here. You want to go to production URL. You copy that production URL. You go here and you paste that production URL in there. Okay. Now what ha what is happening is that MCP client is connected to an MCP server trigger but there is one thing that is missing and that is an AI agent. So you need to go with an AI agent here and obviously that AI agent right here has a chat input. So let me go here with chat trigger. Okay. So we have a chat trigger that is connected to an AI agent. We have a tool. In this case it's an MCP client that is connected to an MCP server trigger. So what is happening when we're sending a message here? Let's say we're sending a message. Can you check what data I have in my Google spreadsheet? What will happen is AI agent along with an AI model here which I'm about to show you right now will call this MCP client. That MCP client will call MCP server trigger and then MCP server trigger will decide which tool to use. Okay. So to repeat, when you go into a chat and when you ask something, for example, can you please check how many rows I have in my Google spreadsheet? AI agent will call the AI model. AI model will call the MCP client. MCP client will call the MCP server trigger and then MCP server right here. Server trigger will call a tool that is needed for that specific task. Now obviously in the previous like videos and courses and lessons we showed you that you know you could use AI agent and you can connect thousands of tools to an AI agent but this is really great and you know you can use MCP uh servers and MCP in general uh to make complex things simpler. Okay. So you can use a single AI agent with tools, right? If your task is straightforward, right? So if you have like input, process, output, you can like you don't need to use long-term memory or like roll separation and stuff like that. Obviously that's more for advanced people. But if we take a look like for example this right here, right? I have an uh MCP server trigger. I have a Google sheet connected to it. And obviously here we have a production URL since this is the workflow is active. We have a production URL. We copy that production URL. We connect an AI agent here to that MCP client. We paste that production URL here. Okay. And we connected also open router chat model here. So by the way with open router if you go to open router right here. Just let me show you that if you create a free account, you can go to keys and you can create a a API key here and then what you can do is you can go here add that API key and you have access to like 50 plus uh large language models. Okay. And in here uh you have GPT 3.5 Turbo which is a free model and let's say we want to now interact with our MCP server trigger. We can go to our chat and we can say as you can see this is what I said here. Can I get information from my sheet? And as you can see the MCP server trigger or actually how as you can see here you can see uh exact step by step what happened is open router chat model called the MCP client. MCP client then went in and called the MCP server trigger. Right? So that's what happened and this is exactly how it happened step by step. Okay. And as you can see, I got here the row number, the um the row names and also the column name as well, which is really great. Okay, so again, this MCP client can be attached to an AI agent and that MCP client will talk and u converse with the MCP server. Then MCP server will talk with a tool and then MCP server will send that information back to an MCP client. So again, you can use MCPs if you want agents to talk, think, and plan together. So I can have multiple different MCP server triggers here. I can add maybe another right here. MCP server trigger as you can see. And I can have multiple MCP server triggers, right? I can have one which will talk with only Google Sheets. I can have another one which will talk only with Google Gmail, let's say. And I can connect them right here. I can connect another MCP client tool and I can connect that MCP client tool to this one and this one will talk with Gmail, right? This one will talk with Google sheet. So you can create an army of MCPL CL uh servers that are talking with clients. Later on you can connect that with AI agents inside of uh one workflow, right? Or you can create uh like a workflow where you have only server server triggers and then you can create another workflow where you're just having this AI agent with those MCP clients that are calling those MCP servers from another workflow. Okay. So that's what you can have right. So again like tasks that require specialized logic uh like a market analysis customer support uh if you're building like a framework of agents then MCP is really great for that. Okay. So now you kind of get the fundamentals of MCPS in NA10. Obviously in the next couple of lessons we will break down exactly how you can build more complex workflows. Uh so in the next lesson we will build multiple different server triggers and also I will break them down and then we'll also have an AI agent that will call those server triggers. Uh so yeah stay tuned for that. Hopefully if uh this makes sense u hopefully it makes sense and hopefully my explanation skills are great here. Um if not make sure to uh again you know reach out to me or anyone in the team in the premium community and we'll be able to assist you with anything you want if you have any questions around MCPS. So uh that is how you use MCPS in NA10. These are the fundamentals. Obviously we'll dive deeper into MCPS as we go but that's pretty much the fundamentals. So yeah hopefully you enjoyed this lesson. We'll see you in the next one. Okay. So, welcome to lesson number four in the uh MCP course uh in our premium community. So, um the first thing that I wanted to show you in this uh this is going to be a very short lesson by the way uh is uh authorization and how to do credentials. So, uh as you can see each MCP server trigger right here has a credential right here. So credentials are being used for secure reasons just so you can secure your MCP server because if you can just give away this to anyone then anyone can have access to your MCP server. But when you actually edit the path right here. So for example, you can edit the path to be uh for example school community like an example or if if this is around Google sheet MCP then that production URL changes as you can see. So that's one way how you can secure your MCP server. Right. Now, another way how you can secure it is you can create a credential for your MCP server. For example, I can go here. I can create a new credential. And here I can put any uh password for this credential, right? So, I can put any bearer token. I can pretty much uh you know create a password for this. As you can see, this credential uses authorization header. To use a custom header, use a custom O credential instead. So for example if if we go here and as you can see this is uh my uh bearer token I can actually change this and then when I change bearer token when I put the authentication to be bearer or header O usually I'll do the bearer authentication you can also do the header O if you do the header O uh then you'll need to create a new credential here and then you can put the name for example Google sheet MCP and then value could be 1 2 3 4 5 right and then when you save this right now you have a header o you have a pad that is custom path right here let me just exit out of this uh and you also have a unique production URL this makes your MCP server unique it makes it more secure because then if I want to go to my MCP client what I need to do is I need to first go to my MCP server trigger I need to copy the production Europe because the workflow is active. If it's not active, we're using the test URL, but we're using right now the production URL since the workflow is active. We go here and we paste that workflow u production URL here as you can see. Now, from there we have header O which in this case we can just select the header O right here which is the the header O that we just uh set up here as you can see header O account 2. We can also uh make this or rename this to make sure we know that this is MCP for Google Sheets. We save this and now we know if we go to MCP client that this is MCP for Google Sheets. Okay, so we have the SEC endpoint or URL here. We also have set up the credentials for header O and obviously we want all tools to be included. And now if we save and sometimes you need to refresh this. Uh you can go to your chat here and you can say what uh or we can say where can you check row three in my Google Sheets. Then as you can see it will talk with an MCP client. And obviously you know this will be an error when trying to check row three in Google Sheets just because we don't have any row in Google Sheets that is row three. Okay, that's why that basically happened. But uh as you can see, this is how it works, right? We can obviously say, can you give me more can you give me more info about my Google Sheets? And then as you can see, uh okay, it seems like there is an error while trying to access your Google Sheets. Um okay, so basically what happening here is it's not reading correctly. So, we have it here. Error logs. We need to reconnect the account. But basically, that's uh that's what I wanted to show you how this works. I just wanted to show you how you can uh authorize and create authorization and credentials for your header O and then for your bearer O. So, there's like three different uh authorization techniques. None is you can just use a pad and then you can just use production URL. bearer. You can uh create a bearer uh uh o or credential here. It's just like a simple password or like an API key that you will create. Um and then you also have a header O where it's also like a name and then value. And then you can all obviously name that as well as bearer O. You can also name it right here however you want. After you have that, you pretty much secured your MCP server and then you know anyone who is trying to connect to your MCP server won't be able to connect to your MCP server because you need to actually go to your MCP client and you need to add the URL. You need to also add the authentication and only you know the password. Obviously make sure the passwords are uh a bit more complex than what I just showed you. I just show you like one two three four five, right? you can generate passwords with chat GPT or something like that. Uh and that could be a really good way to actually go and u do that. So obviously this is it for for this u video lesson. In the next video lesson, we're going to be building from scratch uh a one um MCP server trigger and then an AI agent that has a memory connected to it uh that has you know this like LLM connected to it and then MCP client multiple MCP clients so that you can see how that works in u you know in real practice. So yeah, that's pretty much it for this video. Hopefully you learned a couple of things and we'll see you in the next video. Okay, now that we went through all of the fundamentals about MCPs, now it's time to actually build uh an MCP server with uh an MCP client that is connected to an AI agent. Okay, so let's start building. Right, so we we can just name this uh MCP. Um I'll just name it like that. And what we can do first is let's first go here and add the first step. And this first step is going to be an MCP server trigger. Okay. So, what we're going to be doing is we're going to be doing uh three different MCP server triggers. Okay. So, we have another server right here. And then we'll have another MCP server trigger as well. Okay. So, why do we do that? because we're going to be connecting a set of one tools here, a set of secondary tools, and a set of third uh tools right here. So, a set of first uh tools here will be Google sheet. Okay, so it's going to be um obviously we can go here, we can sign in with Google. It's very simple. I already did that. I'll go with my personal Google Sheet account here. Uh, we're going to be getting rows. Okay. From the scraped emails. Let's see. I think scraped emails. We can do that. Yeah, let's do scraped emails here. Um, okay. So, here we're getting rows. Oh, oops. So, let me just go here and let me just get rows. So, I'll just name it like that. Okay. So, here we will have like Google Sheets tools. Here I have an idea to have like Gmail tools. And then here we'll have some other tools. So as you can see again let's go with Google sheet because we'll have like uh create a new sheet. No append row create a new row in a sheet. And then that will be as well our sheet here. Let me just switch back to my account. Uh we said scrape emails. Okay. And then obviously it's going to be sheet leads which is sheet one. And then as you can see here uh append row this is just going to be uh defined by the model which means that the AI agent will define where we want to uh actually go and append row. Um so yeah that's going to be it. This is going to be called append row. Append row. Okay. So we have these two uh tools right here connected. MCP server trigger. We're just going to be naming it Google Sheet MCP server. Okay. Obviously, we're going to be adding uh here a path which is going to be called Google Sheet MCP server. And then authentication, we can do beer o uh we can do just beer o for this. We're going to be naming it Google sheet mcp server. So, I'm just showing you this just because I want to show you every single thing that I showed you in the course already. And we're going to be adding a bearer token. 1 2 3 4 5. Okay. Let's save. That is going to be it. Okay. So, now we have Google Sheet MCP here. Um I'm just going to be zooming out a little bit here. Then, uh we have an MCP server trigger which is going to be called Gmail. Gmail MCP server. Okay, this we're going to be naming it Gmail MCP server. Obviously the authentication is going to be and then we're going to be we're going with a bearer O but in this case we have like Google sheet MCP server but we can create a new credential here and we can do it with Gmail MCP server. This could be one, two, three, four, five, six. Okay. Or let let me actually do the same. One, two, three, four, five. Again, you can make this much better. I'm just doing this as an example. Then we're going with a Gmail tool. Okay. Again, you connect Gmail account here. Sign in with Google. And then you set automatically message. Send message to. This is going to be decided by AI model. So if we click this, it's going to be decided by the AI agent. Subject is going to be also decided by an AI agent. Text and message is going to be decided by an AI agent. So this is going to be send email. Okay. Okay. So we have that as well. And then we're going to be going here adding a Gmail here as well. And we're going to be not sending a message. But in this case operation is going to be mark as unread and then the message ID was going to be decided mark as unread. Right? So those are two tools here and then we're going to be having um as well tools here. So this one let me see which which tools can I go with this. So you can either call another NA10 workflow as well. You can do an HTTP request tool as well. I mean that's also something that you can do. You you can do a code tool as well. But let me actually see I can do Google Drive tool for this one. Okay. I'm I'm also going to be showing you HTTP request nodes as well. But for now um in this case I'm just going to be showing you like this. Okay. So this is going to be file and then download the file. and then a file. So here we have Google Drive account. So could not load the list. Okay, let me actually go here and let me authenticate this again. Um, okay. Is this an error? So let me actually see if I can do this. Okay, the O client was deleted. Okay, so in this case, uh, we're going to be using something else because it's been deleted. So let me go to tools. So let me go to a tool that I already used and for this case let me actually find it here. So since I wanted to show you also how you can integrate the HTTP request I wanted to show you that uh since Google Drive is you know I have to go through the entire credentials. So, I'll go here and I'll name this um I'm going to name this uh tool search the internet MCP server. Okay, we're going to be obviously changing this internet MCP. We're going to be adding a bearer authentication here. We can also add header for this one. Let's add header for this one just so I can show you. Uh and then uh we're going to be doing this search the internet mcp. Okay, name is going to be internet mcp. 1 2 3 1 2 3 4 5. Okay, let's save. So once this is saved, okay, what we're going to be using is we're going to be using a HTTP request tool. And in this tool, what we're going to be using is we're going to be using Tavi uh AI. So, Tavi AI is a tool that uh helps you to research the internet based on a query. Okay? So, this is how it works, right? So, if we go to the documentation here, as you can see, this is what we're going to be adding in our uh HTTP request. Now what I did is I obviously generated an API key here. But what I also did is I went to documentation here. I went to quick start and here if I scroll down I get this curl command. This curl command is a way that you can authorize your HTTP request. Okay? So you can copy this and currently I don't have any settings here to actually go and import this here. So what I'm going to be doing is I'm just going to be showing you how to do it here. So if you just use a standalone HTTP request here, what you can do is you can double click import curl, paste the curl command, import it here. And here as you can see, you get this autopop populated which is really awesome. Okay. So what I can do now is I can simply uh you know copy that data in here. So what I did is I can go here which is post. Okay. If I go here, this is post. I'm also going to be doing this as well. So I'm just going to be adding u get the user query and search the internet for the for that specific query. Okay, we have search here obviously. Okay, and then uh obviously here is sending headers. We have authorization bearer. Okay, so again we're sending headers. authorization because this HTTP request is a little bit different. Um, oh, by field below. Actually, we don't need that. And this is where our uh Taval API key goes. So, we just copy this. By the way, you can just go here to create a key. And I'm just going to be pasting that key here. Okay. Let me go let me see again what we have. We have send body, JSON, using fields below, query, and then we have a query here. Okay. So that's also what we can do. So here we go send body. Okay, let me go here. Send body. And then we have using fields below. Using field below. Okay. So this is actually going to be called like this. Okay. Query using fields below. So let me check if everything is all right here. Okay. Using fields below as you can see. So that's all good. Okay, we can obviously name this um search the internet. Okay, then obviously this uh is a placeholder. So currently it says who is Leo Messi? Uh and I'm just going to be showing this. I'm not going to be going into complicated details. However, if you want this MCP trigger to actually search the internet and to actually search for your query, you will need to add your own query here. Like a query that is dynamically changed. Currently, it's not dynamically changed. That's why you can't actually go and search for anything else unless you are asking who is Leo Messi. Okay, we're going to be deleting this node because right now we set this up. Okay, right now we have the MCP servers right here. We connected the tools. We added and changed the path. We added the credentials. Now everything is ready to be connected to an AI agent. Now let's hit save. I'm going to be activating this workflow because we're going to be using a production URL for this one. Uh and again, it's better to activate the workflow to see if this is working. Okay. Now, what I'm going to be doing is I'm going to be adding a trigger here or not a trigger. I'm going to be adding an AI agent which will be connected here to a trigger which oops let me actually go here chat trigger that is going to be connected to the AI agent and then obviously the AI agent chat model is going to be open router. Now I showed you how to connect open router. However, let me actually go back and let me show you that again. You go to open router. You create an account. You go to keys. You create an API key. You can name it test. Create it. And you have the key here. You can copy that key. And you can just go here and paste that key in here. Okay. And then what I did is I'm just going to be using free model which is 3.5 Turbo. This is the best free model I uh came across. Uh, and then I have that right here. Memory is obviously going to be adding simple memory connected chat trigger node because it's coming from a chat trigger node, right? So, memory is usually connected to where the chat is coming from or where you're chatting, which is simple memory right here connected to the chat. And then tool is going to be so we're we're going to be connecting three different tools here, right? We're going to be connecting this MCP server trigger, which is Google Sheet MCP server trigger, Gmail MCP server trigger, and then search the internet MCP server trigger. Okay, so let's go here and let's go with a client MCP client tool. And the first one that we're connecting here is going to be the Google, let me actually put it like this, is going to be the Google sheet MCP. So, we double click on it. We copy the production URL, not the test URL because we're inactive. Okay. And then we're actually going here bearer O. And then here we're going with a Google sheet MCP. And that's pretty much it. We've connected that right here. We're going to be connecting another one. MCP client tool. This one. We go to production URL. We copy this. We simply paste it. And we're going here with a bear o gmail. Okay, since this is a Gmail one. And then we're adding another one which in this case is going to be the last one. And if you remember in the last one we used header O. Okay, production URL. Copy. We copy that here. Heather O. And then we have search the internet mcp. Okay, so that's it. Right now we have the we have everything working. So now what I do is I save. I refresh. I always like to refresh because sometimes errors happen. I go here, open chat. Can you add a row in my Google sheet called test? Okay, as you can see, it's calling this tool right here. And as you can see, a new row has been successfully added to your Google sheet name test. As you can see, then what we can do is we can test the Gmail node or the Gmail MCP client. Can you unread my latest email from my inbox? It should call this one actually. Okay, so this one has an error. Encountered an error trying to mark the email as unread. It seems there was an issue with an email ID. So yeah, you need to provide a valid email ID to mark the email as unread. Currently, we don't have an ID, but this is working. So we just didn't We can send an email, by the way. So let's do that. Send an email to my email here with the subject line test and an email body test one two three. Okay, as you can see it's calling this tool. The email with the subject line test has been successfully sent. And as as you can see or you cannot see it right now, but uh I actually got it on my phone here. So this is the the test. Okay, it a little bit lagging here. Okay, so the next one we have is an MCP client 2 which is an internet search the internet. So here since I have a query that is u who is leo messi I can go here and I can say who is le messi and then currently as you can see we're getting here the answer I don't know why this uh this actually failed to execute it okay so something happened here in the in this MCP server even though we call the MCP client it still gave us who is Leonel Messi because of the open router chat model right here. So make sure you're aware of that because sometimes what happens is that last node right since it's connected here to an HTTP request node sometimes it can get uh you know uh it can like give you an error which in this case it did give us an error. Okay. By the way, if this node is not working for you, like in this case, HTTP request is not working for you. What I did is I added here a little test that I like to do. Uh so I added a manual trigger and I added an HTTP request node and I just imported curl from here as I showed you earlier and I just went in and test the step and if it's testing correctly right here, it should all be good to go as you can see. So if it's testing correctly then you can just go here and change that. Um and then you know obviously we added here a chat input which in this case that that doesn't make sense to to actually go with it with that because the model will actually uh do its own thing here. But you can for this one you don't have to worry about that. You can just say uh you know uh what is what is you know who is Leonel Messi? Again, we're just going to be adding that as it is. Uh because for this one, I just wanted to show you how MCPS work. Uh in this case, you can also, you know, go here and you can test it out with this one. We are going to be deleting that. But this is pret

Original Description

n8n MCP Tutorial: How to Build MCP Servers in n8n (Beginner to Pro) ✅ self-host n8n and save tons of money with Hostinger: https://www.hostg.xyz/SHIoC I just recorded full n8n MCP tutorial on how to build MCP servers in n8n from beginner to pro level. If you really want to learn what are MCP servers, why people use MCP servers in n8n and why they are so powerful, watch this video until the end. This is the only free MCP course you need to watch. Timestamps: 00:00 - What is MCP? 08:23 - MCP vs AI Agents - Key Differences 15:23 - How to Connect MCP to Claude 25:41 - MCP in n8n (Fundamentals) 34:28 - MCP Security & Credentials 40:53 - Building First MCP Workflow in n8n 1:00:03 - Building MCP AI Assistant (Live Build) for inquiries: promotions@fuelyourdigital.com
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Playlist UUGl9734Tc2Fe5rqSlYN91rw · Tin Rovic · 40 of 50

1 Building a weather-to-Slack workflow example
Building a weather-to-Slack workflow example
Tin Rovic
2 Integration with HTTP request nodes
Integration with HTTP request nodes
Tin Rovic
3 Automate SEO Keyword Research + SEO Optimization + Posting With AI Agent
Automate SEO Keyword Research + SEO Optimization + Posting With AI Agent
Tin Rovic
4 Blog Writing AI Agent Setup To Automate SEO Keyword Research
Blog Writing AI Agent Setup To Automate SEO Keyword Research
Tin Rovic
5 How To Build Content Summarizer With Firebase And n8n
How To Build Content Summarizer With Firebase And n8n
Tin Rovic
6 WordPress Setup to Automate Your WordPress Blog with N8N & AI
WordPress Setup to Automate Your WordPress Blog with N8N & AI
Tin Rovic
7 Adding A Chat Model to Automate Your WordPress Blog
Adding A Chat Model to Automate Your WordPress Blog
Tin Rovic
8 Testing PDF Contract Generator in N8N
Testing PDF Contract Generator in N8N
Tin Rovic
9 AI Agent Setup To Build a PDF Contract Generator in N8N
AI Agent Setup To Build a PDF Contract Generator in N8N
Tin Rovic
10 WordPress Setup to Automate Your WordPress Blog with N8N & AI
WordPress Setup to Automate Your WordPress Blog with N8N & AI
Tin Rovic
11 Adding A Chat Model to Automate Your WordPress Blog
Adding A Chat Model to Automate Your WordPress Blog
Tin Rovic
12 This AI Blogging System Turns YouTube Video Into Blogs (No-Code Tutorial)
This AI Blogging System Turns YouTube Video Into Blogs (No-Code Tutorial)
Tin Rovic
13 Blotato API Review: This AI System Creates & Posts Viral Faceless POV Videos (n8n No-Code Tutorial)
Blotato API Review: This AI System Creates & Posts Viral Faceless POV Videos (n8n No-Code Tutorial)
Tin Rovic
14 Perspective.co Review: Best Funnel & Landing Page Builder in 2026
Perspective.co Review: Best Funnel & Landing Page Builder in 2026
Tin Rovic
15 This ONE Platform Connects Your AI to 70+ Integrations!
This ONE Platform Connects Your AI to 70+ Integrations!
Tin Rovic
16 Nano Banana Tutorial: Create INSANE Product Photos with Gemini 2.5 Flash
Nano Banana Tutorial: Create INSANE Product Photos with Gemini 2.5 Flash
Tin Rovic
17 I Copied FERN's YouTube Channel With AI From Scratch
I Copied FERN's YouTube Channel With AI From Scratch
Tin Rovic
18 Semrush AI SEO Review: How to Dominate AI Search Results in 2026 (Rank #1 on AI Overview)
Semrush AI SEO Review: How to Dominate AI Search Results in 2026 (Rank #1 on AI Overview)
Tin Rovic
19 Sora 2 Is CRAZY! How to Get Sora 2 Access For FREE (Worldwide)
Sora 2 Is CRAZY! How to Get Sora 2 Access For FREE (Worldwide)
Tin Rovic
20 How to Build Your First AI Agent in 15 Minutes (No Coding Required)
How to Build Your First AI Agent in 15 Minutes (No Coding Required)
Tin Rovic
21 From Zero to My First AI Agent in 10 Minutes Without n8n (No Code)
From Zero to My First AI Agent in 10 Minutes Without n8n (No Code)
Tin Rovic
22 My First AI Agent in 15 Minutes (No Coding Required)
My First AI Agent in 15 Minutes (No Coding Required)
Tin Rovic
23 How I Rank My AI Blog #1 on Google (3 Simple Steps)
How I Rank My AI Blog #1 on Google (3 Simple Steps)
Tin Rovic
24 How To Build A $10,000 Website In 5 Minutes With AI
How To Build A $10,000 Website In 5 Minutes With AI
Tin Rovic
25 How to Create a Stunning Website With OnePage AI as an Agency
How to Create a Stunning Website With OnePage AI as an Agency
Tin Rovic
26 This AI Agent Finds Local Business Leads in Seconds (No Code Tutorial)
This AI Agent Finds Local Business Leads in Seconds (No Code Tutorial)
Tin Rovic
27 Selling AI Automations is DUMB, Learn This Instead
Selling AI Automations is DUMB, Learn This Instead
Tin Rovic
28 SEO Is No Longer About Google… And No One Told Us
SEO Is No Longer About Google… And No One Told Us
Tin Rovic
29 Freepik's Hidden AI Feature Nobody's Talking About
Freepik's Hidden AI Feature Nobody's Talking About
Tin Rovic
30 How to Build Your First AI Agent in N8N (Tutorial for Beginners)
How to Build Your First AI Agent in N8N (Tutorial for Beginners)
Tin Rovic
31 How to Set Up N8N Self-Hosting Free (Tutorial for Beginners)
How to Set Up N8N Self-Hosting Free (Tutorial for Beginners)
Tin Rovic
32 I Copied a 2.5M Follower AI Monk Using n8n + InfiniteTalk (No-Code Tutorial)
I Copied a 2.5M Follower AI Monk Using n8n + InfiniteTalk (No-Code Tutorial)
Tin Rovic
33 How to Scrape Any Website With This N8N Workflow (For Free)
How to Scrape Any Website With This N8N Workflow (For Free)
Tin Rovic
34 How to Setup OpenClaw (Clawdbot) for Beginners (Without MAC MINI)
How to Setup OpenClaw (Clawdbot) for Beginners (Without MAC MINI)
Tin Rovic
35 This FREE AI Agent Finds Clients on Autopilot in n8n (CRAZY)
This FREE AI Agent Finds Clients on Autopilot in n8n (CRAZY)
Tin Rovic
36 How to Install OpenClaw (Clawdbot) For FREE (Without VPS, AWS or MAC Mini)
How to Install OpenClaw (Clawdbot) For FREE (Without VPS, AWS or MAC Mini)
Tin Rovic
37 How to Use OpenClaw Better Than 99% of People
How to Use OpenClaw Better Than 99% of People
Tin Rovic
38 OpenClaw Just Got a Massive Upgrade
OpenClaw Just Got a Massive Upgrade
Tin Rovic
39 This n8n AI Agent Manages Your Business (AI Project Manager)
This n8n AI Agent Manages Your Business (AI Project Manager)
Tin Rovic
n8n MCP Tutorial: How to Build MCP Servers in n8n (Beginner to Pro)
n8n MCP Tutorial: How to Build MCP Servers in n8n (Beginner to Pro)
Tin Rovic
41 How to Create High CTR UGC Ads For Fashion: Full Step-by-Step Tutorial
How to Create High CTR UGC Ads For Fashion: Full Step-by-Step Tutorial
Tin Rovic
42 How to Make Calling AI Agent for Real Estate (Full Tutorial)
How to Make Calling AI Agent for Real Estate (Full Tutorial)
Tin Rovic
43 How to Scrape 100+ Websites With OpenClaw (Step-by-Step)
How to Scrape 100+ Websites With OpenClaw (Step-by-Step)
Tin Rovic
44 How to Use Manus AI to Create Content For YouTube (Quick & Easy)
How to Use Manus AI to Create Content For YouTube (Quick & Easy)
Tin Rovic
45 Manus AI + GoHighLevel = Unlimited Leads on Autopilot
Manus AI + GoHighLevel = Unlimited Leads on Autopilot
Tin Rovic
46 Nano Banana Pro + Kling 2.5 Turbo = Cinematic AI Product Videos
Nano Banana Pro + Kling 2.5 Turbo = Cinematic AI Product Videos
Tin Rovic
47 How to Scrape Real Estate Leads With OpenClaw (Step-by-Step Setup)
How to Scrape Real Estate Leads With OpenClaw (Step-by-Step Setup)
Tin Rovic
48 How to Make an AI Appointment Setter That Qualifies Leads (SMS, Instagram, Facebook, WhatsApp)
How to Make an AI Appointment Setter That Qualifies Leads (SMS, Instagram, Facebook, WhatsApp)
Tin Rovic
49 How to Automate Real Estate Lead Qualification With AI (Step-by-Step)
How to Automate Real Estate Lead Qualification With AI (Step-by-Step)
Tin Rovic
50 How to Deploy OpenClaw in ONE CLICK! (Without VPS, AWS or MAC Mini)
How to Deploy OpenClaw in ONE CLICK! (Without VPS, AWS or MAC Mini)
Tin Rovic

This video tutorial teaches viewers how to build MCP servers in n8n and integrate them with various tools and services to create complex workflows. Viewers will learn how to create MCP servers, connect them to different tools, and use them to perform tasks such as data retrieval and email sending.

Key Takeaways
  1. Create a new MCP server in n8n
  2. Connect the MCP server to a tool or service, such as Google Sheets or Gmail
  3. Use the MCP client to perform a task, such as data retrieval or email sending
  4. Authenticate and authorize the MCP server using bearer tokens or other methods
  5. Use HTTP requests and curl to interact with the MCP server and perform tasks
💡 MCP servers can be used to create complex workflows that integrate multiple tools and services, and can be used to perform a wide range of tasks, from data retrieval to email sending and internet searching.

Related AI Lessons

How to Create a Second Version of Yourself Inside Obsidian Using AI (Step-by-Step Guide)
Learn to create a second version of yourself inside Obsidian using AI with a step-by-step guide
Medium · ChatGPT
How to prepare for Spain civil service TIC exam using AI in 2026
Learn how to prepare for the Spain civil service TIC exam using AI in 2026, boosting your chances of success with technology-driven study techniques
Dev.to · David García
Going Viral! How I Created AI Kissing Videos Step by Step Easily Using AIAI.com
Create viral AI kissing videos using AIAI.com in a step-by-step process, leveraging AI technology for creative content creation
Medium · AI
How to prepare TIC teacher exams in Spain with AI (oposiciones 2026)
Prepare for TIC teacher exams in Spain using AI with these actionable steps
Dev.to AI

Chapters (7)

What is MCP?
8:23 MCP vs AI Agents - Key Differences
15:23 How to Connect MCP to Claude
25:41 MCP in n8n (Fundamentals)
34:28 MCP Security & Credentials
40:53 Building First MCP Workflow in n8n
1:00:03 Building MCP AI Assistant (Live Build)
Up next
Low-Tech, High-Impact: Replacing Your Receptionist With a $15 AI Phone System
Maximum Lawyer
Watch →