@theflowgrammer breaks down n8n's new native MCP Server Trigger and AI Agent Tool, explaining exactly what MCP (Model Context Protocol) is, why it's important, and how to leverage it within your n8n workflows.
@anthropic-ai 's MCP is quickly becoming the go-to protocol in the AI community. Some community node implementations of the MCP protocol have existed previously but had various tech debt issues. n8n’s native implementation fixes those issues and is also available on n8n cloud.
📝 MCP Server Trigger config JSON for Claude Desktop 👇
{
"mcpServers": {
"n8n": {
"command": "npx",
"args": [
"-y",
"supergateway",
"--sse",
"REPLACE-ME-WITH-N8N-WEBHOOK-URL"
]
}
}
}
---
If you need a MCP Host other than an n8n AI Agent, try Claude Desktop (but you can use any): https://claude.ai/download
In this video:
- Max explains what MCP is.
- Max shows how to connect n8n’s MCP Server Trigger to Claude Desktop.
- Max shows how to connect n8n’s MCP Server Trigger to an n8n MCP Client tool in another workflow.
- Some free laughs
Chapters:
00:00 - Intro
00:24 - What is MCP?
02:19 - MCP Critiques
03:24 - MCP Server Trigger setup
08:48 - MCP Client Tool setup
10:43 - Wrap up
🔗 Links and Resources:
* Sign up at https://www.n8n.io and get 50% off for 12 months with coupon code MAX50 (apply the code after your free trial)!
* https://docs.n8n.io for documentation
* https://community.n8n.io for help whilst building
Оглавление (6 сегментов)
Intro
Hey flowmers, 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 N. So if you already know what MCP is, use the chapters to skip ahead.
What is MCP?
MCP is an abbreviation. It stands for model context protocol. It was designed and released by Anthropic, creator of the popular Clawude 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
MCP Critiques
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 wellestablished 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 NAND workflows? And I think that's a perfect segue to jump into the NAN canvas and check out the new MCP server and MCP client nodes within NAND.
MCP Server Trigger setup
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 custom workflows that you can build inside of Naden. I think it's going to be 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 Eniden 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 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 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 really sensitive for you. So that's how you set up the MCP server trigger in
MCP Client Tool setup
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 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.
Wrap up
So I just explained what MCP is, how you can set up an MCP server in Nitn 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 Nitn uh and go have fun. And if you haven't signed up for Nitn yet, u make sure to use my coupon code max 50 after your cloud trial. That's going to give you 50% off Niten 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 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 flowmer. You're awesome for watching this video and happy flowing.