{"id":1556,"date":"2026-06-19T02:06:28","date_gmt":"2026-06-19T00:06:28","guid":{"rendered":"https:\/\/pletzenauer.com\/2026\/06\/19\/model-context-protocol-mcp-n8n\/"},"modified":"2026-06-19T02:11:45","modified_gmt":"2026-06-19T00:11:45","slug":"model-context-protocol-mcp-explained-n8n-example","status":"publish","type":"post","link":"https:\/\/pletzenauer.com\/en\/2026\/06\/19\/model-context-protocol-mcp-explained-n8n-example\/","title":{"rendered":"Model Context Protocol (MCP) Explained Simply &#8211; With an n8n Example"},"content":{"rendered":"<p>Anyone who builds AI agents knows the problem: for every function of a connected service, you have to define a separate tool. Search for a calendar entry, create one, change it, delete it \u2013 that quickly adds up to four separate building blocks, and that is for just a single service. With many integrations, the maintenance effort grows accordingly. The <strong>Model Context Protocol (MCP)<\/strong> takes a different approach: it standardizes how a language model communicates with a service \u2013 and drastically reduces the number of building blocks you need. This post summarizes the concept and a concrete hands-on example with n8n.<\/p>\n<div style=\"background:#FFE6D6;border-left:4px solid #F26A21;padding:16px 20px;border-radius:6px;margin:24px 0;\">\n<strong>Key takeaways<\/strong><\/p>\n<ul>\n<li>MCP standardizes how a language model understands the context of a service \u2013 that is, what it can do and how to address it.<\/li>\n<li>Instead of connecting every single function separately, an <em>MCP server<\/em> (in front of the service) and an <em>MCP client<\/em> (in the agent) are enough.<\/li>\n<li>The agent gets by with two steps: <em>listing<\/em> functions (List Tools) and <em>executing<\/em> functions (Execute Tool).<\/li>\n<li>In n8n, you can replicate this with an environment variable, a community node, and two MCP client tools.<\/li>\n<li>MCP is a young technology: there are known security concerns \u2013 in production environments, caution is warranted.<\/li>\n<\/ul>\n<\/div>\n<figure style=\"margin:28px 0;\"><img decoding=\"async\" src=\"https:\/\/pletzenauer.com\/wp-content\/uploads\/2026\/06\/1488-1.png\" alt=\"Two-column comparison: on the left, the classic tool-per-function integration with many building blocks; on the right, MCP with only two steps, List Tools and Execute Tool.\" style=\"width:100%;height:auto;border-radius:8px;border:1px solid #E5E2DE;\"\/><figcaption style=\"font-size:0.9em;color:#6b6b6b;margin-top:8px;\">Instead of connecting every function individually, the agent gets by with two MCP operations.<\/figcaption><\/figure>\n<h2>What MCP actually solves<\/h2>\n<p>The basic idea of the Model Context Protocol is in the name: a language model should understand the <strong>context<\/strong> of an application. In concrete terms, that means: what can this application do? What is it for? And how do I carry out actions in it?<\/p>\n<p>Traditionally, when building an agent, you connect every tool individually \u2013 each function is its own building block. With Google Calendar, for example: a tool to search for entries, one to update, one to delete, one to create. Four functions for one service. With complex agents that have many connected services, this quickly adds up to dozens of building blocks.<\/p>\n<h2>Server, client, and the unified schema<\/h2>\n<p>MCP works with two roles:<\/p>\n<ul>\n<li><strong>MCP server:<\/strong> sits in front of the actual service (e.g., Airbnb or Google Calendar) and describes how to interact with that service.<\/li>\n<li><strong>MCP client:<\/strong> sits in the agent and retrieves and calls the server&#8217;s functions.<\/li>\n<\/ul>\n<p>In the current implementation \u2013 in n8n, for example \u2013 two steps are enough instead of many individual tools:<\/p>\n<ol>\n<li><strong>List Tools:<\/strong> the agent asks the server which functions are available.<\/li>\n<li><strong>Execute Tool:<\/strong> the agent calls a specific function with the matching parameters.<\/li>\n<\/ol>\n<p>The decisive element is the <strong>unified schema<\/strong>. No matter which service is behind it, the response to a List Tools request is always structured the same way. Per function, it contains the name, a description, and a schema with the allowed parameters. Contents and parameters differ from service to service \u2013 the structure stays constant. That is exactly what the protocol specifies and standardizes.<\/p>\n<h3>An example with the Airbnb tool<\/h3>\n<p>If you ask the agent what options the Airbnb tool offers, it fetches the function list itself via the List Tools tool. What comes back includes:<\/p>\n<ul>\n<li><strong>Airbnb Search:<\/strong> search for listings with filters and pagination \u2013 such as location, check-in and check-out dates, number of adults, children, infants, and pets, plus price range.<\/li>\n<li><strong>Airbnb Listing Details:<\/strong> detailed information about a specific listing via its listing ID.<\/li>\n<\/ul>\n<p>The agent did not need to be given anything here \u2013 it obtained the available functions, their descriptions, and the parameter schema by itself. In the schema you see, for example, a text field <code>location<\/code> (city, state, etc.), the date fields for check-in and check-out, the number of adults, as well as minimum and maximum price.<\/p>\n<p>If you then make a concrete request \u2013 say, accommodation in Bangkok for six people at a maximum of 50 euros per night \u2013 the agent runs in two stages: it first calls List Tools (it has not memorized anything, since no memory is active), recognizes the necessary parameters from the schema, and runs the search via Execute Tool. The result \u2013 say, accommodation with three beds for around 35 euros per night \u2013 comes back, and that with only two added tools. If Airbnb offered more functions, for instance to manage your own listings, these could be mapped via the same schema without defining further building blocks.<\/p>\n<h2>How to replicate MCP in n8n<\/h2>\n<p>The following steps show the setup using the Airbnb example. It is a good one to try out because it does not require an API key.<\/p>\n<ol>\n<li><strong>Set the environment variable:<\/strong> set <code>N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE<\/code> to <code>true<\/code>. This allows community nodes to access tools. With a Docker installation (e.g., on a Hetzner server), you add this in the <code>environment<\/code> section of the <code>docker-compose<\/code> file and restart the instance.<\/li>\n<li><strong>Create the AI agent:<\/strong> create an AI agent and assign a model (GPT-4.1 Mini in the video).<\/li>\n<li><strong>Install the community node:<\/strong> under <em>Settings &rarr; Community Nodes<\/em>, install the <code>n8n-nodes-mcp<\/code> package and confirm the notice about installing unverified code from public sources.<\/li>\n<li><strong>Add the MCP client tool:<\/strong> via the plus next to <em>Tools<\/em>, search for &#8220;MCP.&#8221; Caution: do not confuse it with n8n&#8217;s own <em>MCP Client Tool<\/em> \u2013 the community variant is recognizable by the box icon and is currently more comprehensive.<\/li>\n<li><strong>Create credentials:<\/strong> the available connection types are Command Line, Server-Sent Events, and HTTP Streamable. The example stays with Command Line. The correct values are in the repository of the respective MCP server, in the installation section. For Airbnb: command <code>npx<\/code>, arguments entered step by step \u2013 <code>-y<\/code>, the package <code>@openbnb\/mcp-server-airbnb<\/code>, and optionally <code>--ignore-robots-txt<\/code>.<\/li>\n<\/ol>\n<blockquote><p><strong>Note on robots.txt:<\/strong> the option <code>--ignore-robots-txt<\/code> bypasses a website&#8217;s access rules. For a demo, this is acceptable \u2013 in production environments, you should respect the robots.txt of the respective services.<\/p><\/blockquote>\n<h3>Setting up the two operations<\/h3>\n<p>Next, you need two MCP client tools with different operations:<\/p>\n<ul>\n<li><strong>List Tools:<\/strong> name the tool, for example, &#8220;Airbnb List Tools&#8221; and state in the description that it is used to retrieve all available Airbnb tools. A test click (Execute Step) should return the familiar function list with name, description, and schema.<\/li>\n<li><strong>Execute Tool:<\/strong> a second MCP client tool with the Execute Tool operation. Description: for executing Airbnb tools, which can be listed via the List Tools tool. You pass the tool name as an expression, so the agent decides for itself which function to call; you leave the tool parameters open so it determines them itself.<\/li>\n<\/ul>\n<p>After cleaning up and saving, you can test the agent \u2013 for instance, again with the Bangkok request. It fetches the function list, returns it to the model, decides on the search, and delivers matching accommodations. Exactly the behavior from the concept section, now in your own workflow.<\/p>\n<h2>Beyond n8n \u2013 and a word on security<\/h2>\n<p>MCP is not limited to automation platforms. Desktop applications such as Claude Desktop can also be connected to MCP servers. This lets you delegate tasks in chat to locally installed programs \u2013 a frequently cited example is controlling the 3D software Blender via MCP, where someone with no Blender knowledge creates renderings. The MCP server runs locally, while the language model itself still runs via the cloud service.<\/p>\n<p>For all the enthusiasm, keep in mind: MCP is a young development. There are already <strong>security concerns<\/strong>, and security vulnerabilities have been found. In production environments in particular, the technology should be handled with caution \u2013 it is worth watching how it develops further before building critical processes on top of it.<\/p>\n<h2>Conclusion<\/h2>\n<p>The Model Context Protocol is a pragmatic standardization approach: via an MCP server, a language model learns by itself what a service can do and how to address it \u2013 instead of predefining every function individually. For complex AI agents, this means noticeably fewer building blocks and less maintenance effort; in the n8n example, two steps are enough: list and execute. The approach is convincing, but still young. If you try it out, you should start with non-critical services and, in production environments, take the open security questions seriously.<\/p>\n<p><strong>Source:<\/strong> <a href=\"https:\/\/www.youtube.com\/watch?v=ujHOD52ybyo\" target=\"_blank\" rel=\"noopener\">Model Context Protocol (MCP): Erkl\u00e4rung &amp; n8n Tutorial (Deutsch)<\/a> \u2013 YouTube channel Philip Thomas.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Was ist das Model Context Protocol (MCP) und wie vereinfacht es KI-Agenten? Konzept, Praxisbeispiel mit n8n und Airbnb sowie Sicherheitshinweise im \u00dcberblick.<\/p>\n","protected":false},"author":1,"featured_media":1503,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[80,17],"tags":[88,108,109,110,91,111,112],"class_list":["post-1556","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-80","category-automatisierung","tag-automatisierung","tag-ki-agenten","tag-mcp","tag-model-context-protocol","tag-n8n","tag-schnittstellen","tag-workflow"],"_links":{"self":[{"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/posts\/1556","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/comments?post=1556"}],"version-history":[{"count":2,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/posts\/1556\/revisions"}],"predecessor-version":[{"id":1576,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/posts\/1556\/revisions\/1576"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/media\/1503"}],"wp:attachment":[{"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/media?parent=1556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/categories?post=1556"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/tags?post=1556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}