Consuming External AI Tools with Model Context Protocol (MCP)
Learn to use the MCP Server Trigger to expose n8n workflows as open, discoverable tools that any MCP-compliant application can use.
In our last lesson, we gave our Triage Agent its first custom skill. By adding an internal Code node tool, we enabled the agent to look up the on-call engineer and assign tasks. This was yet another enhancement that eliminated another manual step for Alex’s team.
However, the logic for that on-call schedule is currently hard-coded inside our agent’s sub-workflow. This is not ideal. In a real engineering organization, the on-call rota would be managed by a separate team or a dedicated microservice. Our agent is still a closed system; it can use tools that are defined within its own workflow, but it can’t yet reach out and consume standardized tools provided by other systems.
In this lesson, we will introduce the Model Context Protocol (MCP), an open standard for making AI tools interoperable. You will learn how to make our agent consume an external MCP tool, allowing it to leverage capabilities provided by completely separate services.
What is MCP?
As AI agents and tools become more common, they need a standard way to communicate and share capabilities, just like websites use HTTP and APIs use OpenAPI specifications.
The Model Context Protocol (MCP) is an open-source protocol designed to enable AI agents and tools to discover and interact with each other in a standardized, predictable way. Think of MCP in these terms: if OpenAI’s function calling is a proprietary way for one agent to use tools, MCP is like an open standard (such as OpenAPI/Swagger or gRPC) for defining and calling AI tools. An MCP tool is effectively an AI microservice. It exposes its capabilities over a standard interface that any MCP-compliant agent can understand and use, regardless of the platform it’s built on.
Simulating an external service: The MCP Server Trigger
To demonstrate how our agent can consume an external tool, we first need to create one. We’ll build a very simple, separate n8n workflow that will act as our external “On-Call Rota Service.”
The MCP Server Trigger is the node that makes this possible. It transforms a regular n8n workflow into a discoverable, MCP-compliant tool endpoint.
Building the external tool
Create a new workflow and name it ...