Back to Templates

Build and operate n8n workflows from Claude with Gemini and MCP tools

Created by

Created by: Țugui Dragoș || tuguidragos
Țugui Dragoș

Last update

Last update a day ago

Categories

Share


Quick Overview

This workflow exposes an MCP server endpoint for Claude Desktop and provides tools to build new n8n workflows from plain-English prompts using Google Gemini, plus tools to list, inspect, activate/deactivate workflows and review executions via the n8n Public API.

How it works

  1. Receives MCP tool requests on the MCP Server Trigger endpoint (path concierge) from a connected MCP client such as Claude Desktop.
  2. Routes “build workflow” requests to a sub-workflow that sends the plain-English description to Google Gemini and asks it to return strict n8n workflow JSON (nodes and connections).
  3. Normalizes the generated JSON, adds required workflow fields, and creates the new workflow by calling the n8n Public API.
  4. Returns a compact result containing the created workflow ID and a link, leaving the workflow inactive for review.
  5. Routes “operate” requests (list/get workflows, activate/deactivate, list/get executions) to a shared sub-workflow that maps each action to the correct n8n Public API endpoint.
  6. Calls the n8n Public API with an API-key header and returns a trimmed JSON response for lists and execution data.

Setup

  1. Import the MCP server workflow plus the two tool sub-workflows (Concierge Build Workflow and Concierge n8n Operate) and re-link each Tool Workflow node to the correct imported workflow ID.
  2. Create an n8n API key and configure an HTTP Header Auth credential that sends it as X-N8N-API-KEY for the HTTP Request nodes.
  3. Replace the https://YOUR_N8N_DOMAIN placeholders in the sub-workflows with your n8n instance base URL (with the Public API enabled).
  4. Add Google Gemini API credentials for the node that generates workflow JSON.
  5. Activate only the MCP server workflow to expose the Production URL, then configure Claude Desktop (for example via mcp-remote) to call that URL.
  6. For production use, switch the MCP trigger authentication to Bearer Auth and set the same token in your MCP client configuration.