Manage and Execute n8n Workflows with MCP Server

This workflow streamlines managing and executing n8n workflows via an MCP server, enabling dynamic control and execution of workflows tagged for specific use. By handling workflow discovery, availability, and execution through Redis and subworkflow triggers, it reduces manual oversight and enhances automation precision.
executeWorkflowTrigger
n8n
set
+13
Workflow Identifier: 1232
NODES in Use: executeWorkflowTrigger, n8n, set, switch, redis, aggregate, filter, executeWorkflow, executeWorkflowTrigger, stickyNote, languageModelOpenAi, mcpTrigger, toolWorkflow, memoryBufferWindow, chatTrigger, mcpClientTool

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow lets an AI or other tools manage which n8n workflows to run without manual help.

It finds workflows tagged “mcp” inside n8n, keeps a list of active ones in Redis memory, and controls when to add or remove them.

The workflow also reads each subworkflow’s inputs so the AI knows what information to give when running it.

When asked, it runs selected approved workflows with input passed in from the user.

This stops mistakes like running wrong or outdated workflows and saves time by automating control of workflow execution.


Who Should Use This Workflow

Anyone managing many n8n workflows who wants to let an AI safely find, control, and run specific workflows.

This is ideal for automation teams needing less manual tracking of workflows and fewer errors from wrong runs.

Users with AI clients like Claude Desktop can connect to this workflow to request workflow lists or run them dynamically.


Tools and Services Used

  • n8n account with API access: To query and execute workflows.
  • Redis server: Stores the list of available workflows in memory.
  • Workflows tagged “mcp”: Only workflows with this tag are managed.
  • Execute Workflow Trigger node: Enables subworkflow input detection.
  • AI Agent or MCP client: Such as Claude Desktop to interact with the MCP server.
  • OpenAI API key (optional): Used for AI language model features inside n8n.

Beginner Step-by-Step: How to Use This Workflow in n8n

Download and Import

  1. Download the workflow file using the Download button on this page.
  2. Inside the n8n editor, click “Import from File” and upload the downloaded workflow.

Configure Credentials and IDs

  1. Add your n8n API Key or credentials to the n8n node that fetches workflows.
  2. Set up Redis credentials in the Redis node to enable memory storage.
  3. If needed, update any workflow IDs, email addresses, or channel names used in the nodes.
  4. Optionally, add your OpenAI API Key in the AI nodes to use language models.

Test and Activate

  1. Run the workflow once manually to confirm connections and permissions work.
  2. Activate the Webhook node (MCP Trigger) to get your webhook URL.
  3. Copy the webhook URL and provide it to your AI agent or MCP client for communication.
  4. Activate the whole workflow in n8n for production use.

For full control and better performance, you can consider self-host n8n to run this workflow.


Inputs, Processing, and Outputs

Inputs

  • Commands sent by AI agent via the Webhook node, such as add, remove, list, search, or execute workflows.
  • n8n API data filtered to workflows tagged “mcp”.
  • Redis stored array holding current active workflows.

Processing Steps

  • Filter workflows in n8n by tag “mcp”.
  • Extract workflow input schemas from subworkflow triggers.
  • Store and update workflows list in Redis under the key “mcp_n8n_tools”.
  • Switch and Filter nodes route commands for adding, removing, listing, or executing workflows.
  • Execute selected workflows dynamically using the Execute Workflow node without fixed input schema, allowing parameter passthrough.

Outputs

  • Updated Redis list of workflows allowed for execution.
  • Responses sent back to the AI agent about available workflows and execution results.
  • On-demand running workflows with AI-given parameters.

Common Issues and How to Fix Them

  • Missing workflow in Redis: The AI tries to run a workflow not added. Fix by using “AddWorkflow” command first.
  • Redis connection failure: Check and update Redis server URL and credentials in n8n settings.
  • Incorrect input parameters: Confirm each subworkflow has an Execute Workflow trigger node with proper input schema.
  • Miscalled webhook URL: Activate the Webhook node and copy the correct URL for the AI agent.

Customization Ideas

  • Change the workflow tag from “mcp” to a custom tag for different workflow groups.
  • Edit the Redis key “mcp_n8n_tools” if you want to separate memory pools.
  • Allow workflows without Execute Workflow triggers by using HTTP webhook calls instead.
  • Modify AI system messages in the AI Agent node to guide how it handles commands.
  • Improve input schema extraction by adding validation or documentation fields.

Results and Benefits

✓ Control over which workflows AI can use.

✓ Faster and safer workflow execution managed by AI agents.

✓ Automatically updated list of active workflows in memory.

✓ Reduced manual work and errors from running wrong workflows.

→ AI clients like Claude Desktop can talk directly to n8n workflows.

→ Scalable setup using Redis allows many workflows and parallel runs.


Additional Notes

Make sure all workflows tagged “mcp” are tested and have proper subworkflow triggers with input schemas.

Keep API keys, Redis access, and webhook URLs secure to protect workflow data.

Monitor logs after activation to catch issues quickly.

Frequently Asked Questions

No. This workflow relies on Execute Workflow trigger nodes to get input schema. Alternatives require custom changes using webhook calls.
The execution will fail. The workflow must be added first to the Redis stored list to be allowed for AI-driven execution.
Redis stores a live list of active workflows that the AI agent can use. This memory management avoids running unauthorized workflows.
Run the workflow manually once to check API and Redis connections. Then activate the webhook node to get the URL for the AI agent.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free