n8n-mcp-server-rules

n8n-mcp-server-rules is a cursor rule for Cursor from ifmelate/n8n-workflow-builder-mcp. It costs 0 tokens per session (6,147 once invoked), scanned A, original, MIT.

Rules for an AI coding agent that builds n8n workflows. n8n is a visual tool for connecting services and automating multi-step tasks.

In plain words
What is it for?
Use it to create workflows, find available nodes, add or edit steps, remove steps, and connect them, including AI steps.
Why use it?
They help the agent create and edit workflow files in an orderly way, while choosing ready-made nodes where possible instead of putting too much logic in custom code.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to create workflows, find available nodes, add or edit steps, remove steps, and connect them, including AI steps.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/ifmelate/n8n-workflow-builder-mcp/n8n-mcp-server-rules
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/ifmelate/n8n-workflow-builder-mcp

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for n8n-mcp-server-rules

README.md
[![agentmods](https://agentmods.dev/badge/rules/ifmelate/n8n-workflow-builder-mcp/n8n-mcp-server-rules/github.svg)](https://agentmods.dev/rules/ifmelate/n8n-workflow-builder-mcp/n8n-mcp-server-rules)
Your own site
<a href="https://agentmods.dev/rules/ifmelate/n8n-workflow-builder-mcp/n8n-mcp-server-rules"><img src="https://agentmods.dev/badge/rules/ifmelate/n8n-workflow-builder-mcp/n8n-mcp-server-rules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for n8n-mcp-server-rules

Your own site · 80×15
<a href="https://agentmods.dev/rules/ifmelate/n8n-workflow-builder-mcp/n8n-mcp-server-rules"><img src="https://agentmods.dev/badge/rules/ifmelate/n8n-workflow-builder-mcp/n8n-mcp-server-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 6,147 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.06147
Opus 5 $0.00000 $0.03073
Sonnet 5 $0.00000 $0.01229
Haiku 4.5 $0.00000 $0.00615

Measured 9d ago against content hash 9330e1d4c45e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

n8n-mcp-server-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rules/n8n-mcp-server-rules.mdc · 463 lines

How it starts

The opening of the file, as written. The whole thing — 463 lines — stays where its author put it; the contents beside it link to each section on GitHub.

  • Scope & goal

    • This rule guides Cursor/agents to use the exposed MCP tools to build n8n workflows from scratch, add/edit nodes, and wire connections (including AI nodes) safely and predictably. Prefer to use MCP tools for AI agent if user didn't concrete this moment directly.
    • Start every session by ensuring a valid workspace and workflow file exists.
    • AVOID "node_type": "code" as much as possible. Use Specialized/Concise nodes that provide functionality out of the box.
    • Start with linear workflow - make connection right there when you add a node.
  • Core tools (as implemented today)

    • create_workflow(workflow_name, workspace_dir)
    • list_workflows(limit?, cursor?)
    • get_workflow_details(workflow_name, workflow_path?)
    • list_available_nodes(search_term ?, n8n_version?, limit?, cursor?, tags?, token_logic?)
    • get_n8n_version_info()
    • add_node(workflow_name, node_type, position?, parameters?, node_name?, typeVersion?, webhookId?, workflow_path?, connect_from?, connect_to?)
    • edit_node(workflow_name, node_id, node_type?, node_name?, position?, parameters?, typeVersion?, webhookId?, workflow_path?, connect_from?, connect_to?)
    • delete_node(workflow_name, node_id, workflow_path?)
    • add_connection(workflow_name, source_node_id, source_node_output_name, target_node_id, target_node_input_name, target_node_input_index?)
    • add_ai_connections(workflow_name, agent_node_id, model_node_id?, tool_node_ids?, memory_node_id?, embeddings_node_id?, vector_store_node_id?, vector_insert_node_id?, vector_tool_node_id?, dry_run?, idempotency_key?)
    • compose_ai_workflow(workflow_name, plan, dry_run?, idempotency_key?)
    • validate_workflow(workflow_name, workflow_path?, strict_main_chain?, dry_run?)
    • connect_main_chain(workflow_name, workflow_path?, dry_run?, idempotency_key?)
    • list_template_examples(node_type?, template_name?, limit?, cursor?)
  • Quick-start recipes

    • Create a new workflow
      {
        "workflow_name": "my_first_flow",
        "workspace_dir": "/absolute/path/to/project"
      }
      
    • Optimized discovery (single call for multiple related nodes)
      • Prefer one multi-token query over multiple separate calls. Search defaults to OR logic and tag-style synonyms.
      • Examples:
        { "search_term": "webhook trigger" }
        
        { "search_term": "llm agent tool memory" }
        
        { "search_term": "vector embedding", "limit": 25 }
        
        • Require intersection of all terms:
        { "search_term": "webhook trigger", "token_logic": "and" }
        
        • Disable synonym expansion for strict tokens:
        { "search_term": "webhook trigger", "tags": false }
        
        • Paginate when results exceed the limit:
        { "search_term": "http request", "limit": 20, "cursor": "20" }
        
    • Node parameter previews (default)
      • list_available_nodes returns a compact propertiesPreview for each node by default. Use it to pick nodes and pre-fill sensible parameters without opening the full schema.
      • Preview fields: name, displayName, type, default (if present), required (true only), and up to 5 optionValues.
      • Example result item:
        {
          "nodeType": "@n8n/n8n-nodes-langchain.informationExtractor",
          "displayName": "Information Extractor",
          "parameterCount": 4,
          "propertiesPreview": [
            { "name": "text", "displayName": "Text", "type": "string", "default": "" },
            { "name": "From Attribute Descriptions", "displayName": "From Attribute Descriptions", "type": "options", "default": "fromAttributes", "optionValues": ["fromAttributes"] },
            { "name": "attributes", "displayName": "Attributes", "type": "fixedCollection", "required": true },
            { "name": "options", "displayName": "Options", "type": "collection", "optionValues": ["systemPromptTemplate"] }
          ]
        }
        
      • Prefer using propertiesPreview to generate UI hints or starter parameter payloads when calling add_node/edit_node.
    • Add a node (type casing auto-normalized)
      {
        "workflow_name": "my_first_flow",
        "node_type": "openai",
        "node_name": "OpenAI LLM",
        "position": { "x": 200, "y": 120 },
        "parameters": { "model": "gpt-4o", "temperature": 0.2 }
      }
      
    • Connect two nodes (IDs from previous tool results)
      {
        "workflow_name": "my_first_flow",
        "source_node_id": "<NODE_ID_A>",
        "source_node_output_name": "main",
        "target_node_id": "<NODE_ID_B>",
        "target_node_input_name": "main",
        "target_node_input_index": 0
      }
      
    • Wire AI agent, model, tools, memory (preferred for LangChain AI nodes)
      {
        "workflow_name": "my_first_flow",
        "agent_node_id": "<AGENT_ID>",
        "model_node_id": "<MODEL_ID>",
        "tool_node_ids": ["<TOOL_ID_1>", "<TOOL_ID_2>"],
        "memory_node_id": "<MEMORY_ID>",
        "embeddings_node_id": "<EMBEDDINGS_ID>",
        "vector_store_node_id": "<VECTOR_STORE_ID>",
        "vector_tool_node_id": "<VECTOR_TOOL_ID>",
        "dry_run": false,
        "idempotency_key": "optional-key-for-safe-retries"
      }
      
    • Add a node and connect immediately (from existing → new)
      {
        "workflow_name": "my_first_flow",
        "node_type": "httpRequest",
        "position": { "x": 600, "y": 200 },
        "connect_from": [
          {
            "source_node_id": "<EXISTING_NODE_ID>",
            "source_node_output_name": "main",
            "target_node_input_name": "main",
            "target_node_input_index": 0
          }
        ]
      }
      
    • Add a node and connect immediately (new → existing)
      {
        "workflow_name": "my_first_flow",
        "node_type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
        "position": { "x": 800, "y": 260 },
        "connect_to": [
          {
            "target_node_id": "<AGENT_NODE_ID>",
            "source_node_output_name": "ai_languageModel",
            "target_node_input_name": "ai_languageModel"
          }
        ]
      }
      

Read the full file on GitHub · 463 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 463 lines · 0 tokens per session scan A 9330e1d4c45e

Subscribe to this mod's changes

n8n-mcp-server-rules is a cursor rule published in the GitHub repository ifmelate/n8n-workflow-builder-mcp (52 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 6,147 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.