AI Agent Workflow Management Server (MCP) - n8n Workflow

Build a centralized n8n workflow Multi-Component Platform (MCP) server that lets AI agents discover, manage, and execute specialized n8n templates using Redis for state management.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

AI Developers & Prompt Engineers: Those needing a flexible way to turn complex business logic into callable AI tools using n8n. Automation Specialists: Users who want to centralize their n8n workflow library and expose filtered subsets to AI systems. Organizations using Redis: Teams already utilizing Redis for temporary state management within their n8n environment. Users building advanced AI applications: Anyone leveraging n8n templates to create sophisticated, multi-step AI processes.

Overview

The AI Agent Workflow Management Server solves the critical problem of providing large language models (LLMs) with reliable, executable, and specialized tools built on robust business logic. Instead of exposing every single n8n workflow, this solution introduces a concept of 'available' workflows stored in Redis memory.

This core n8n workflow acts as a dispatcher. It uses the n8n node to search for candidate workflows (tagged 'mcp'), saves the necessary execution metadata (including input schema parsed from the subworkflow n8n trigger) into Redis, and then allows the AI agent to list, add, remove, and execute these specialized n8n templates. This approach ensures that the agent only uses approved and documented tools, leading to predictable and powerful automation.

How it Works

This automation is structured around two main entry points: the MCP Server Trigger and the Execute Workflow Trigger.


  1. AI Tool Interaction (MCP Trigger): The N8N Workflows MCP Server node acts as the external API endpoint. It defines five crucial tools (Add, Remove, List, Search, Execute), all of which internally call the core logic of this n8n workflow via the When Executed by Another Workflow n8n trigger.

  2. State Management (Redis): The internal logic begins by fetching the current list of 'available' tools from Redis using the Get Memory n8n node.

  3. Operation Routing (Switch): The Operations n8n node routes the flow based on the requested action (e.g., addWorkflow, executeWorkflow).

  4. Adding Workflows: For addWorkflow or searchWorkflows, the workflow uses the n8n node to fetch all workflows tagged 'mcp' in the instance. The Simplify Workflows n8n node then parses the workflow's JSON to extract the input schema defined in its Subworkflow n8n trigger, adding this critical parameter information to the tool description.

  5. Execution: When the AI requests executeWorkflow, the system first checks if the requested workflow ID is present in the Redis 'available' list. If confirmed, the Execute Workflow with PassThrough Variables n8n node runs the target n8n workflow ID, passing the agent-provided parameters implicitly through the data stream.

Installation Guide

To deploy this comprehensive n8n workflow template, follow these steps:


  1. Import: Copy the provided JSON and import it directly into your n8n instance as a new n8n workflow.

  2. Credentials Setup:

n8n API Key: Configure the n8n API credential used by the Get MCP-tagged Workflows n8n node. This is essential for the searchWorkflows functionality to discover candidate n8n templates.
Redis: Set up the Redis credential used by the Get Memory and Store In Memory n8n nodes. This Redis connection is mandatory for tracking which workflows are currently 'available' to the agent.

  1. Target Workflows: Ensure that all n8n workflows you intend for the AI agent to use have the tag 'mcp' (as configured in the n8n node) and utilize an Execute Workflow Trigger (Subworkflow Trigger) with the input schema defined.

  2. Activate: Activate the main n8n workflow. The URL generated by the MCP Trigger is the production endpoint for your AI client (e.g., Claude Desktop).

Node Details

N8N Workflows MCP Server (MCP Trigger): This n8n trigger establishes the webhook endpoint for the Multi-Component Platform server, defining the entry point for AI clients and exposing the built-in toolWorkflow nodes.
When Executed by Another Workflow (Execute Workflow Trigger): The internal trigger used to receive commands from the various toolWorkflow nodes within this n8n workflow. It receives operation, workflowIds, and parameters data.
n8n node (Get MCP-tagged Workflows): Connects via the n8n API to query and retrieve a list of existing n8n workflows in the instance, filtered specifically by the tag 'mcp'.
Simplify Workflows (Set node): A critical n8n node that transforms the raw workflow data into a simplified tool format, meticulously extracting the input schema parameters from the target workflow's JSON to assist the AI in proper parameter formatting.
Redis node (Store In Memory / Get Memory): Used for persistent state management. It stores the array of currently 'available' tools under the key mcpn8ntools.
Operations (Switch node): Directs the flow based on the requested operation (addWorkflow, removeWorkflow, listWorkflows, etc.) received from the internal n8n trigger.


  • Execute Workflow with PassThrough Variables (Execute Workflow node): This n8n node dynamically executes the specified target n8n workflow ID, passing the AI-provided parameters implicitly by leveraging the passthrough functionality when no explicit input mapping is defined.

Related n8n Workflows

Free

Nodes: 18 Nodes
Updated: December 26 2025
View all
Created by
Jimleuk
Jimleuk

Freelance consultant based in the UK specialising in AI-powered automations. I work with select clients tackling their most challenging projects. For business enquiries, send me an email at [email protected] LinkedIn: https://www.linkedin.com/in/jimleuk/ X/Twitter: https://x.com/jimle_uk

Featured*