Build Your First MCP Server with n8n

How to build your first MCP Server with n8n

This template shows you how to use MCP Server and Client functionality in n8n with official nodes.

After the release of the new MCP functionality I decided to experiment a little and came up with a template that will help you use this amazing feature.

:warning: Requires n8n version 1.88.0 or higher.

In this example, we use Google Calendar and custom functions as two separate MCP Servers, demonstrating how to integrate both native and custom tools.

How it works

The AI Agent connects to two MCP Servers. Each MCP Trigger (Server) generates a URL exposing its tools. This URL is used by an MCP Client linked to the AI Agent.

Whenever you make changes to the tools, there’s no need to modify the MCP Client. It automatically keeps the AI Agent informed on how to use each tool, even if you change them over time.

That’s the power of MCP :raised_hands:

Template link

https://n8n.io/workflows/3514

Check out my other templates

:point_right: https://n8n.io/creators/solomon/

4 Likes

Hi, which do you think is better: using both components in one flow or in different flows?

1 Like

That depends on the complexity of the project.

  • If you are using your MCP server in many workflows and/or with external tools like Claude Desktop, it would be better to save it separately, in its own workflow for better organization and maitenance.

  • If you are using it for a small project, but still would like to see the server’s executions separately, it is also good to put it into a separate workflow.

  • If you don’t care about the above or is simply testing the feature, leave it on the same workflow.

1 Like

Thank you, this is really neat!

Quick question on architecture: in terms of performance and efficiency, would it be better to use MCP Servers like this, or would it make more sense to just call the tools directly within a workflow (or group them in sub-flows)?

Curious where MCP really shines compared to more traditional approaches…

MCP is an extra layer, so if you measured performance, it might be slower.

But I believe the difference would be negligible unless you’re handling large volumes of traffic and need very low latency responses.

The advantages of MCP is it being reusable and simpler to change, because when you change the server, you change the tool usage for every client at once.

1 Like

A follow-up question: so what you’re saying is that, eventually, when n8n support the MCP server for Google Callendar that does not need specific tools, we can simply plug the new node and we’re ready to go, is that it?

1 Like

Exactly. No need to configure every action (create, update, delete…)

MCP will be able to tell the AI Agent what tools are available and how to use them.

With this template you can see how that works by creating your own MCP server.

Whenever you add or change the tools on the server, you don’t have to change anything on the client side to make it work with the new settings.

So, what’s the real benefit here if you have to build each individual tool? If I have to have a node for a calendar search, and I have to tell it how to do so and define the parameters, what’s the point of MCP? What am I missing?