SolutionsCraft
← Automation

Automation · 3 min read

Connect an External MCP Server to an n8n AI Agent with the MCP Client Tool Node

An earlier post covered the MCP Server Trigger node: turning an n8n workflow into a tool an external AI assistant can call. The MCP Client Tool node does the reverse — it lets an n8n AI Agent call tools hosted on someone else's MCP server, including a server you don't run in n8n at all. Point an agent at any MCP-compliant endpoint and its tools show up alongside your other n8n tool nodes, ready to be called mid-conversation.

Before you start

You'll need an n8n AI Agent workflow (or a willingness to build a small one) and the URL of an MCP server to connect to. This walkthrough reuses the MCP server from the earlier post — the same n8n instance can be both an MCP server for one workflow and an MCP client for another — but any SSE-based MCP endpoint works the same way.

Step 1: Add an AI Agent node

Create a new workflow and add an AI Agent node. The AI Agent needs a Chat Model connected before it can do anything — click the Chat Model connector on the node and pick a provider (OpenAI, Anthropic, Ollama, or any other supported Chat Model sub-node). Without a model attached, the agent has no way to decide which tool to call.

Step 2: Add the MCP Client Tool node

With the AI Agent node open, click the + under Tools and add an MCP Client Tool node. This is a sub-node — it doesn't run on its own, it plugs into the agent as one of its available tools.

Step 3: Point it at the external MCP server

In the MCP Client Tool node's panel, set the SSE Endpoint field to the MCP server's URL — for an n8n MCP Server Trigger, this is the same /mcp/<path>/sse URL from that workflow's trigger node panel. For a third-party MCP server, use whatever SSE endpoint its documentation gives you.

Set Authentication to match what the server expects. The node supports Bearer Auth, a Header Auth credential (for a single custom header), Multiple Headers Auth (for servers that need more than one, like an API key plus a username), OAuth2, or None if the server doesn't require authentication. If you're connecting to the MCP Server Trigger from the earlier post, choose Bearer Auth and use the same token you generated there.

Step 4: Choose which tools to expose

The Tools to Include field controls how much of the external server's tool catalog the agent sees:

  • All — every tool the server exposes is available to the agent.
  • Selected — pick specific tools by name, and only those are exposed.
  • All Except — expose everything except the tools you list in Tools to Exclude.

Start with Selected and pick one tool while you're testing. An agent handed a large, unfiltered tool list is more likely to call the wrong one — narrowing the set is often the fastest fix if the agent seems to guess instead of reasoning about which tool applies.

Step 5: Test it from the agent's chat

Save and activate the workflow, then open the AI Agent node's chat panel and ask for something that maps to one of the exposed tools, in plain English. If the connection and auth are correct, the agent lists the MCP server's tool(s) internally, calls the right one, and returns the result in its reply.

Tip: If the agent can't see any tools, double check the SSE endpoint first — a URL pointing at the base MCP path instead of the /sse suffix is the most common cause, and it fails silently rather than throwing a clear connection error.

What's next

A single AI Agent can hold multiple MCP Client Tool nodes side by side, each pointed at a different external server — combining your own n8n-hosted tools with a partner's or vendor's MCP server in one conversation. Between this node and the MCP Server Trigger from the earlier post, the same n8n instance can sit on both ends of an MCP connection: serving tools to one agent while consuming another's.

Get new tutorials by email

No spam, unsubscribe anytime.