n8n-mcp

v0.3.0
io.github.ratamaha-git/n8n-mcp Checked 1 hour ago Published 6 months ago

MCP server for n8n: generate, lint, explain failed executions, drive live n8n via REST.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

n8n_scaffold_node

Scaffold a TypeScript skeleton for an n8n custom node from a plain-English description. Returns a single TypeScript file implementing INodeType with description, credentials reference, and an execute method stub.

ParameterTypeDescription
description *stringPlain-English description of what the node should do.
nodeNamestringOptional PascalCase node class name, e.g. 'DiscordRateLimited'. Derived from the description if omitted.

n8n_generate_workflow

Generate a valid n8n workflow JSON from a plain-English description. Handles webhook/schedule/RSS triggers, common action nodes (Slack, Google Sheets, Discord, Gmail, Notion, HTTP), and AI Agent setups (LangChain root agent + chat model + memory + optional HTTP tool, wired with ai_languageModel / ai_memory / ai_tool connections). Returns workflow JSON with unique node IDs, connections, positions, and typeVersion on every node.

ParameterTypeDescription
description *stringPlain-English workflow description, e.g. 'Stripe webhook -> Slack message + Google Sheets row'.
namestringOptional workflow name. Derived from the first sentence of the description if omitted.

n8n_lint_workflow

Lint an n8n workflow JSON. Returns concrete errors and warnings: missing credentials, deprecated node types (Function -> Code, spreadsheetFile -> convertToFile/extractFromFile), broken connections, missing or non-numeric typeVersion, duplicate node names or IDs, AI Agent missing ai_languageModel sub-node, Webhook missing webhookId, IF node still on v1 condition schema.

ParameterTypeDescription
workflow *n8n workflow as either a parsed object or a JSON string.

n8n_explain_execution

Diagnose a failed or surprising n8n execution. Paste the execution JSON (from the n8n UI 'Show details' or `GET /executions/:id?includeData=true`); returns a per-node summary highlighting nodes that returned 0 items, unresolved `={{ ... }}` expressions, errors with hints, and LLM token usage. Hits the most common debugging pain point: items 'silently disappearing' between nodes.

ParameterTypeDescription
execution *n8n execution object as either a parsed object or a JSON string. Accepts both the REST API shape (`{ data: { resultData: { runData, error, lastNodeExecuted } }, finished, status, ... }`) and the raw `…

n8n_list_workflows

List workflows from a live n8n instance (requires N8N_API_URL + N8N_API_KEY env vars). Returns id, name, active, nodeCount, updatedAt, tags. Filter by active, tags, name. Use this when the user asks 'what workflows do I have?' or before n8n_get_workflow.

ParameterTypeDescription
activebooleanFilter by active status. Omit to return both.
limitnumberPage size (n8n default: 100, max: 250).
namestringFilter by exact workflow name.
tagsstringComma-separated tag names to filter by.

n8n_get_workflow

Fetch a single workflow JSON by id from a live n8n instance (requires N8N_API_URL + N8N_API_KEY). Returns the full nodes/connections payload — pair with n8n_lint_workflow to audit a deployed workflow.

ParameterTypeDescription
id *stringWorkflow ID.

n8n_create_workflow

Create a workflow on a live n8n instance (requires N8N_API_URL + N8N_API_KEY). Strips read-only fields (id, active, createdAt, ...) before posting. Workflows are created inactive — call n8n_activate_workflow afterward. Pairs with n8n_generate_workflow for end-to-end 'describe -> deploy'.

ParameterTypeDescription
workflow *Workflow JSON to create (typically the output of n8n_generate_workflow). Either a parsed object or a JSON string.

n8n_activate_workflow

Activate or deactivate a workflow on a live n8n instance (requires N8N_API_URL + N8N_API_KEY). Pass `active: false` to deactivate.

ParameterTypeDescription
id *stringWorkflow ID.
activebooleanDefaults to true (activate). Set false to deactivate.

n8n_list_executions

List recent executions from a live n8n instance (requires N8N_API_URL + N8N_API_KEY). Filter by workflowId, status (success|error|waiting), limit. Pass `includeData: true` to get the full execution body (large) — pair with n8n_explain_execution to diagnose a specific failure.

ParameterTypeDescription
includeDatabooleanInclude full execution data (large). Default false — pair with n8n_explain_execution.
limitnumberPage size (n8n default: 100, max: 250).
statusstringFilter by status: success | error | waiting.
workflowIdstringFilter by workflow ID.