Build your own N8N workflows MCP server
Needs changesWhat this workflow does
This AI workflow has 38 nodes and runs when an MCP client calls one of its tools (plus 2 other triggers). Along the way it connects Redis, MCP Client and OpenAI Chat Model.
How it runs
Trigger: When an MCP client calls one of its tools (plus 2 other triggers).
- Get Memory (Redis): get
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; 1 tool (MCP Client); memory: Simple Memory
- Operations (Switch): routes items into 5 branches
- Get MCP-tagged Workflows (n8n): uses n8n
- Convert to JSON (Edit Fields (Set)): sets 1 field: data
- listTools Success (Edit Fields (Set)): sets 1 field: response
- Get MCP-tagged Workflows (n8n): uses n8n
- Convert to JSON (Edit Fields (Set)): sets 1 field: data
- Filter: keeps only the items that match a condition
- Split Out: splits a list into separate items
…plus 17 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Agent (v1.8): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent (v1.8) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (17)
- Edit Fields (Set)
n8n-nodes-base.set - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Switch
n8n-nodes-base.switch - n8n
n8n-nodes-base.n8n - Filter
n8n-nodes-base.filter - Redis
n8n-nodes-base.redis - Split Out
n8n-nodes-base.splitOut - Aggregate
n8n-nodes-base.aggregate - AI Agent
@n8n/n8n-nodes-langchain.agent - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - MCP Client Tool
@n8n/n8n-nodes-langchain.mcpClientTool - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - If
n8n-nodes-base.if - MCP Server Trigger
@n8n/n8n-nodes-langchain.mcpTrigger - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - Execute Sub-workflow
n8n-nodes-base.executeWorkflow - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
From the author
This n8n template shows you how to create an MCP server out of your existing n8n workflows. With this, any MCP client connected can get more done with powerful end-to-end workflows rather than just simple tools. Designing agent tools for outcome rather than…