skills/n8n-mcp-tools-expert/SKILL.md
Expert guide for using n8n-mcp MCP tools effectively. Use when searching for nodes, validating configurations, accessing templates, managing workflows, managing credentials, auditing instance security, or using any n8n-mcp tool. Provides tool selection guidance, parameter formats, and common patterns. IMPORTANT — Always consult this skill before calling any n8n-mcp tool — it prevents common mistakes like wrong nodeType formats, incorrect parameter structures, and inefficient tool usage. If the user mentions n8n, workflows, nodes, or automation and you have n8n MCP tools available, use this skill first.
npx skillsauth add czlonkowski/n8n-skills n8n-mcp-tools-expertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Master guide for using n8n-mcp MCP server tools to build workflows.
n8n-mcp provides tools organized into categories:
n8n_generate_workflow, hosted-only)n8n_manage_datatable)n8n_manage_credentials)n8n_audit_instance)| Tool | Use When | Speed |
|------|----------|-------|
| search_nodes | Finding nodes by keyword | <20ms |
| get_node | Understanding node operations (detail="standard") | <10ms |
| validate_node | Checking configurations (mode="full") | <100ms |
| n8n_create_workflow | Creating workflows | 100-500ms |
| n8n_update_partial_workflow | Editing workflows (MOST USED!) | 50-200ms |
| validate_workflow | Checking complete workflow | 100-500ms |
| n8n_deploy_template | Deploy template to n8n instance | 200-500ms |
| n8n_generate_workflow | NL → workflow (proposals → deploy), hosted-only | 2-15s |
| n8n_manage_datatable | Managing data tables and rows | 50-500ms |
| n8n_manage_credentials | Credential CRUD + schema discovery | 50-500ms |
| n8n_audit_instance | Security audit (built-in + custom scan) | 500-5000ms |
| n8n_autofix_workflow | Auto-fix validation errors | 200-1500ms |
Workflow:
1. search_nodes({query: "keyword"})
2. get_node({nodeType: "nodes-base.name"})
3. [Optional] get_node({nodeType: "nodes-base.name", mode: "docs"})
Example:
// Step 1: Search
search_nodes({query: "slack"})
// Returns: nodes-base.slack
// Step 2: Get details
get_node({nodeType: "nodes-base.slack"})
// Returns: operations, properties, examples (standard detail)
// Step 3: Get readable documentation
get_node({nodeType: "nodes-base.slack", mode: "docs"})
// Returns: markdown documentation
Common pattern: search → get_node (18s average)
Workflow:
1. validate_node({nodeType, config: {}, mode: "minimal"}) - Check required fields
2. validate_node({nodeType, config, profile: "runtime"}) - Full validation
3. [Repeat] Fix errors, validate again
Common pattern: validate → fix → validate (23s thinking, 58s fixing per cycle)
Workflow:
1. n8n_create_workflow({name, nodes, connections})
2. n8n_validate_workflow({id})
3. n8n_update_partial_workflow({id, operations: [...]})
4. n8n_validate_workflow({id}) again
5. n8n_update_partial_workflow({id, operations: [{type: "activateWorkflow"}]})
Common pattern: iterative updates (56s average between edits)
Three structural mistakes in generated node JSON break the n8n UI even when the workflow validates:
credentials block with a placeholder ID. A fake ID like "id": "REPLACE_ME" renders the credential selector permanently disabled and non-clickable in the n8n UI ("No credentials yet") — the user has to recreate the node from scratch. If you don't know the real credential ID, omit the credentials block entirely; an absent block shows a normal empty dropdown the user can click. Use n8n_manage_credentials({action: "list"}) to discover real credential IDs first.// ❌ Breaks the credential selector
"credentials": {"httpHeaderAuth": {"id": "REPLACE_ME", "name": "My API Key"}}
// ✅ Unknown ID → omit credentials block; user picks in UI
// ✅ Known ID (from n8n_manage_credentials list) → use the real ID
Generate UUID v4 values for node id — not human-readable strings like "http-list-node". n8n's frontend uses node IDs for form binding and credential component initialization; non-UUID IDs cause subtle UI breakage.
Use the current typeVersion for each node — check get_node rather than hardcoding remembered versions (e.g. httpRequest is at 4.4+, not 4.2).
Two different formats for different tools!
// Use SHORT prefix
"nodes-base.slack"
"nodes-base.httpRequest"
"nodes-base.webhook"
"nodes-langchain.agent"
Tools that use this:
// Use FULL prefix
"n8n-nodes-base.slack"
"n8n-nodes-base.httpRequest"
"n8n-nodes-base.webhook"
"@n8n/n8n-nodes-langchain.agent"
Tools that use this:
// search_nodes returns BOTH formats
{
"nodeType": "nodes-base.slack", // For search/validate tools
"workflowNodeType": "n8n-nodes-base.slack" // For workflow tools
}
Problem: "Node not found" error
// WRONG
get_node({nodeType: "slack"}) // Missing prefix
get_node({nodeType: "n8n-nodes-base.slack"}) // Wrong prefix
// CORRECT
get_node({nodeType: "nodes-base.slack"})
Problem: Huge payload, slower response, token waste
// WRONG - Returns 3-8K tokens, use sparingly
get_node({nodeType: "nodes-base.slack", detail: "full"})
// CORRECT - Returns 1-2K tokens, covers 95% of use cases
get_node({nodeType: "nodes-base.slack"}) // detail="standard" is default
get_node({nodeType: "nodes-base.slack", detail: "standard"})
When to use detail="full":
Better alternatives:
get_node({detail: "standard"}) - for operations list (default)get_node({mode: "docs"}) - for readable documentationget_node({mode: "search_properties", propertyQuery: "auth"}) - for specific propertyProblem: Too many false positives OR missing real errors
Profiles:
minimal - Only required fields (fast, permissive)runtime - Values + types (recommended for pre-deployment)ai-friendly - Reduce false positives (for AI configuration)strict - Maximum validation (for production)// WRONG - Uses default profile
validate_node({nodeType, config})
// CORRECT - Explicit profile
validate_node({nodeType, config, profile: "runtime"})
What happens: ALL nodes sanitized on ANY workflow update
Auto-fixes:
Cannot fix:
// After ANY update, auto-sanitization runs on ALL nodes
n8n_update_partial_workflow({id, operations: [...]})
// → Automatically fixes operator structures
Problem: Complex sourceIndex calculations for multi-output nodes
Old way (manual):
// IF node connection
{
type: "addConnection",
source: "IF",
target: "Handler",
sourceIndex: 0 // Which output? Hard to remember!
}
New way (smart parameters):
// IF node - semantic branch names
{
type: "addConnection",
source: "IF",
target: "True Handler",
branch: "true" // Clear and readable!
}
{
type: "addConnection",
source: "IF",
target: "False Handler",
branch: "false"
}
// Switch node - semantic case numbers
{
type: "addConnection",
source: "Switch",
target: "Handler A",
case: 0
}
Problem: Using parameters instead of updates
// WRONG
n8n_update_partial_workflow({
id: "wf-123",
operations: [{
type: "updateNode",
nodeName: "HTTP Request",
parameters: {url: "..."} // ❌ Wrong key
}]
})
// CORRECT
n8n_update_partial_workflow({
id: "wf-123",
operations: [{
type: "updateNode",
nodeName: "HTTP Request",
updates: {url: "..."} // ✅ Correct key
}]
})
Problem: Credentials not attaching to nodes
// WRONG - credentials as flat object
updates: {credentials: "myApiKey"}
// CORRECT - credentials nested by type with id and name
updates: {
credentials: {
httpHeaderAuth: {
id: "abc123",
name: "My API Key"
}
}
}
Problem: Less helpful tool responses
// WRONG - No context for response
n8n_update_partial_workflow({
id: "abc",
operations: [{type: "addNode", node: {...}}]
})
// CORRECT - Better AI responses
n8n_update_partial_workflow({
id: "abc",
intent: "Add error handling for API failures",
operations: [{type: "addNode", node: {...}}]
})
Common workflow: 18s average between steps
// Step 1: Search (fast!)
const results = await search_nodes({
query: "slack",
mode: "OR", // Default: any word matches
limit: 20
});
// → Returns: nodes-base.slack, nodes-base.slackTrigger
// Step 2: Get details (~18s later, user reviewing results)
const details = await get_node({
nodeType: "nodes-base.slack",
includeExamples: true // Get real template configs
});
// → Returns: operations, properties, metadata
Typical cycle: 23s thinking, 58s fixing
// Step 1: Validate
const result = await validate_node({
nodeType: "nodes-base.slack",
config: {
resource: "channel",
operation: "create"
},
profile: "runtime"
});
// Step 2: Check errors (~23s thinking)
if (!result.valid) {
console.log(result.errors); // "Missing required field: name"
}
// Step 3: Fix config (~58s fixing)
config.name = "general";
// Step 4: Validate again
await validate_node({...}); // Repeat until clean
Most used update tool: 99.0% success rate, 56s average between edits
// Iterative workflow building (NOT one-shot!)
// Edit 1
await n8n_update_partial_workflow({
id: "workflow-id",
intent: "Add webhook trigger",
operations: [{type: "addNode", node: {...}}]
});
// ~56s later...
// Edit 2
await n8n_update_partial_workflow({
id: "workflow-id",
intent: "Connect webhook to processor",
operations: [{type: "addConnection", source: "...", target: "..."}]
});
// ~56s later...
// Edit 3 (validation)
await n8n_validate_workflow({id: "workflow-id"});
// Ready? Activate!
await n8n_update_partial_workflow({
id: "workflow-id",
intent: "Activate workflow for production",
operations: [{type: "activateWorkflow"}]
});
See SEARCH_GUIDE.md for:
See VALIDATION_GUIDE.md for:
See WORKFLOW_GUIDE.md for:
// Search by keyword (default mode)
search_templates({
query: "webhook slack",
limit: 20
});
// Search by node types
search_templates({
searchMode: "by_nodes",
nodeTypes: ["n8n-nodes-base.httpRequest", "n8n-nodes-base.slack"]
});
// Search by task type
search_templates({
searchMode: "by_task",
task: "webhook_processing"
});
// Search by metadata (complexity, setup time)
search_templates({
searchMode: "by_metadata",
complexity: "simple",
maxSetupMinutes: 15
});
get_template({
templateId: 2947,
mode: "structure" // nodes+connections only
});
get_template({
templateId: 2947,
mode: "full" // complete workflow JSON
});
// Deploy template to your n8n instance
n8n_deploy_template({
templateId: 2947,
name: "My Weather to Slack", // Custom name (optional)
autoFix: true, // Auto-fix common issues (default)
autoUpgradeVersions: true // Upgrade node versions (default)
});
// Returns: workflow ID, required credentials, fixes applied
Generates an n8n workflow from a natural-language description via a multi-step flow with a review checkpoint. Hosted-only — self-hosted instances receive a redirect message rather than a workflow.
Two paths:
Path A — pick a proposal (default; cheapest, recommended):
// Step 1: Get up to 5 proposals (NOT deployed)
n8n_generate_workflow({
description: "Send a Slack message every morning at 9am with a daily standup reminder"
})
// → { status: "proposals", proposals: [{id, name, description, flow_summary, credentials_needed}, ...] }
// Step 2: Deploy the proposal you want
n8n_generate_workflow({
description: "Send a Slack message every morning at 9am with a daily standup reminder",
deploy_id: "uuid-from-proposals"
})
// → { status: "deployed", workflow_id, workflow_name, workflow_url, node_count, node_summary }
Path B — fresh generation (when no proposal fits):
// Step 1: Skip the proposal cache, get a preview (NOT deployed)
n8n_generate_workflow({
description: "Webhook → transform JSON → POST to REST API",
skip_cache: true
})
// → { status: "preview", ... }
// Step 2: Deploy the preview
n8n_generate_workflow({
description: "Webhook → transform JSON → POST to REST API",
confirm_deploy: true
})
// → { status: "deployed", ... }
Description tips (more specific = better results):
Caveats:
{hosted_only: true, ...} with a redirect messagen8n_validate_workflow({id}) after deployment to catch any issuesn8n_deploy_template (curated templates) or n8n_create_workflow (full control)When to use which:
| Goal | Tool |
|------|------|
| Pick from a curated 2,700+ template library | n8n_deploy_template |
| Describe what you want in plain English (hosted only) | n8n_generate_workflow |
| Build node-by-node with full control | n8n_create_workflow |
Two surfaces, don't confuse them:
n8n_manage_datatable(below) — MCP tool for managing tables and rows from outside a workflow (e.g. creating tables during workflow scaffolding, seeding data, or inspecting state from Claude). Covered here.nodes-base.dataTablenode — the in-workflow node you drop into a workflow to read/write rows during execution. For its parameter shapes, operation values, filter syntax, and gotchas (e.g. thedeleteRowsreserved-word workaround, theid isNotEmptytrick for "all rows"), see n8n-node-configuration → OPERATION_PATTERNS.md → Storage Nodes → Data Table.Rule of thumb: use the MCP tool to set up a table once and the workflow node to read/write rows on every execution.
Unified tool for managing n8n data tables and rows. Supports CRUD operations on tables and rows with filtering, pagination, and dry-run support.
Table Actions: createTable, listTables, getTable, updateTable, deleteTable
Row Actions: getRows, insertRows, updateRows, upsertRows, deleteRows
// Create a data table
n8n_manage_datatable({
action: "createTable",
name: "Contacts",
columns: [
{name: "email", type: "string"},
{name: "score", type: "number"}
]
})
// Get rows with filter
n8n_manage_datatable({
action: "getRows",
tableId: "dt-123",
filter: {
filters: [{columnName: "status", condition: "eq", value: "active"}]
},
limit: 50
})
// Insert rows
n8n_manage_datatable({
action: "insertRows",
tableId: "dt-123",
data: [{email: "[email protected]", score: 10}],
returnType: "all"
})
// Update with dry run (preview changes)
n8n_manage_datatable({
action: "updateRows",
tableId: "dt-123",
filter: {filters: [{columnName: "score", condition: "lt", value: 5}]},
data: {status: "inactive"},
dryRun: true
})
// Upsert (update or insert)
n8n_manage_datatable({
action: "upsertRows",
tableId: "dt-123",
filter: {filters: [{columnName: "email", condition: "eq", value: "[email protected]"}]},
data: {score: 15},
returnData: true
})
Filter conditions: eq, neq, like, ilike, gt, gte, lt, lte
Best practices:
dryRun: true before bulk updates/deletes to verify filter correctnessstring, number, boolean, date)returnType: "count" (default) for insertRows to minimize response sizedeleteRows requires a filter - cannot delete all rows without oneUnified tool for managing n8n credentials. Supports full CRUD operations, schema discovery, and reverse-lookup of which workflows use each credential.
Actions: list, get, create, update, delete, getSchema
Optional flag: includeUsage (boolean, default false) — on list and get, attaches a usedIn: [{id, name, active}] array and usageCount to every credential by reverse-scanning workflows. Default behavior is unchanged when omitted.
// List all credentials
n8n_manage_credentials({action: "list"})
// → Returns: id, name, type, createdAt, updatedAt (never exposes secrets)
// Get credential by ID
n8n_manage_credentials({action: "get", id: "123"})
// → Returns: credential metadata (data field stripped for security)
// Discover required fields for a credential type
n8n_manage_credentials({action: "getSchema", type: "httpHeaderAuth"})
// → Returns: required fields, types, descriptions
// Create credential
n8n_manage_credentials({
action: "create",
name: "My Slack Token",
type: "slackApi",
data: {accessToken: "xoxb-..."}
})
// Update credential
n8n_manage_credentials({
action: "update",
id: "123",
name: "Updated Name",
data: {accessToken: "xoxb-new-..."},
type: "slackApi" // Optional, needed by some n8n versions
})
// Delete credential
n8n_manage_credentials({action: "delete", id: "123"})
// List credentials WITH the workflows that reference each one
n8n_manage_credentials({action: "list", includeUsage: true})
// → Each credential gains: usedIn: [{id, name, active}], usageCount: N
// Response may include usageScanError if the workflow scan failed
// (base credential list still returned in that case)
// Get one credential and the workflows that reference it
n8n_manage_credentials({action: "get", id: "123", includeUsage: true})
// → Adds usedIn and usageCount; on scan failure, response sets
// usageScanError and omits usedIn/usageCount
When to use includeUsage:
deleten8n_audit_instance (e.g., shared/over-privileged credentials)includeUsage caveats:
n8n_audit_instance); archived workflows are excluded by n8nusageScanError field rather than failing the whole callSecurity:
get, create, and update responses strip the data field (defense-in-depth)get action falls back to list+filter if direct GET returns 403/405 (not all n8n versions expose this endpoint)Best practices:
getSchema before create to discover required fields for a credential typedata field contains the actual secret values — provide it only on create/updatedelete, run get with includeUsage: true to see what breaksSecurity audit tool that combines n8n's built-in audit with custom deep scanning of all workflows.
// Full audit (default — runs both built-in + custom scan)
n8n_audit_instance()
// Built-in audit only (specific categories)
n8n_audit_instance({
categories: ["credentials", "nodes"],
includeCustomScan: false
})
// Custom scan only (specific checks)
n8n_audit_instance({
customChecks: ["hardcoded_secrets", "unauthenticated_webhooks"]
})
Built-in audit categories: credentials, database, nodes, instance, filesystem
Custom deep scan checks:
hardcoded_secrets — Detects 50+ patterns for API keys, tokens, passwords (OpenAI, AWS, Stripe, GitHub, Slack, etc.) plus PII (email, phone, credit card). Secrets are masked in output (first 6 + last 4 chars).unauthenticated_webhooks — Flags webhook/form triggers without authenticationerror_handling — Flags workflows with 3+ nodes and no error handlingdata_retention — Flags workflows saving all execution data (success + failure)Parameters (all optional):
categories — Array of built-in audit categoriesincludeCustomScan — Boolean (default: true)customChecks — Array subset of the 4 custom checksdaysAbandonedWorkflow — Days threshold for abandoned workflow detectionOutput: Actionable markdown report with:
// Overview of all tools
tools_documentation()
// Specific tool details
tools_documentation({
topic: "search_nodes",
depth: "full"
})
// Code node guides
tools_documentation({topic: "javascript_code_node_guide", depth: "full"})
tools_documentation({topic: "python_code_node_guide", depth: "full"})
// Comprehensive AI workflow guide — accessed via tools_documentation
// (there is no standalone ai_agents_guide tool)
tools_documentation({topic: "ai_agents_guide", depth: "full"})
// Returns: Architecture, connections, tools, validation, best practices
// Quick health check
n8n_health_check()
// Detailed diagnostics
n8n_health_check({mode: "diagnostic"})
// → Returns: status, env vars, tool status, API connectivity
Always Available (no n8n API needed):
Requires n8n API (N8N_API_URL + N8N_API_KEY):
If API tools unavailable, use templates and validation-only workflows.
Detail Levels (mode="info", default):
minimal (~200 tokens) - Basic metadata onlystandard (~1-2K tokens) - Essential properties + operations (RECOMMENDED)full (~3-8K tokens) - Complete schema (use sparingly)Operation Modes:
info (default) - Node schema with detail leveldocs - Readable markdown documentationsearch_properties - Find specific properties (use with propertyQuery)versions - List all versions with breaking changescompare - Compare two versionsbreaking - Show only breaking changesmigrations - Show auto-migratable changes// Standard (recommended)
get_node({nodeType: "nodes-base.httpRequest"})
// Get documentation
get_node({nodeType: "nodes-base.webhook", mode: "docs"})
// Search for properties
get_node({nodeType: "nodes-base.httpRequest", mode: "search_properties", propertyQuery: "auth"})
// Check versions
get_node({nodeType: "nodes-base.executeWorkflow", mode: "versions"})
Modes:
full (default) - Comprehensive validation with errors/warnings/suggestionsminimal - Quick required fields check onlyProfiles (for mode="full"):
minimal - Very lenientruntime - Standard (default, recommended)ai-friendly - Balanced for AI workflowsstrict - Most thorough (production)// Full validation with runtime profile
validate_node({nodeType: "nodes-base.slack", config: {...}, profile: "runtime"})
// Quick required fields check
validate_node({nodeType: "nodes-base.webhook", config: {}, mode: "minimal"})
| Tool | Response Time | Payload Size | |------|---------------|--------------| | search_nodes | <20ms | Small | | get_node (standard) | <10ms | ~1-2KB | | get_node (full) | <100ms | 3-8KB | | validate_node (minimal) | <50ms | Small | | validate_node (full) | <100ms | Medium | | validate_workflow | 100-500ms | Medium | | n8n_manage_credentials | 50-500ms | Small-Medium | | n8n_audit_instance | 500-5000ms | Large | | n8n_create_workflow | 100-500ms | Medium | | n8n_update_partial_workflow | 50-200ms | Small | | n8n_deploy_template | 200-500ms | Medium |
patchNodeField for surgical edits to Code node content instead of replacing the entire nodeget_node({detail: "standard"}) for most use casesprofile: "runtime")branch, case) for clarityintent parameter in workflow updatesincludeExamples: true for real configsn8n_deploy_template for quick startsdetail: "full" unless necessary (wastes tokens)nodes-base.*)n8n-nodes-base.*) with search/validate toolsMost Important:
detail: "standard" (default) - covers 95% of use casesnodes-base.* (search/validate) vs n8n-nodes-base.* (workflows)runtime recommended)branch="true", case=0)activateWorkflow operation)n8n_manage_datatable (CRUD + filtering)n8n_manage_credentials (CRUD + schema discovery)n8n_audit_instance (built-in + custom deep scan)tools_documentation({topic: "ai_agents_guide", depth: "full"})Common Workflow:
For details, see:
Related Skills:
tools
--- name: n8n-code-tool description: Write JavaScript or Python for the n8n Custom Code Tool (@n8n/n8n-nodes-langchain.toolCode) — the AI-agent-callable tool, NOT the workflow Code node. Use when building a Code Tool attached to an AI Agent, writing code that an LLM will invoke, parsing the `query` input, returning a string result, defining an input schema for structured arguments (specifyInputSchema, jsonSchemaExample, DynamicStructuredTool), or troubleshooting errors like "Wrong output type re
tools
Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, batch processing, or scheduled tasks. Always consult this skill when the user asks to create, build, or design an n8n workflow, automate a process, or connect services — even if they don't explicitly mention 'patterns'. Covers webhook, API, database, AI, batch processing, and scheduled automation architectures.
testing
Operation-aware node configuration guidance. Use when configuring nodes, understanding property dependencies, determining required fields, choosing between get_node detail levels, or learning common configuration patterns by node type. Always use this skill when setting up node parameters — it explains which fields are required for each operation, how displayOptions control field visibility, and when to use patchNodeField for surgical edits vs full node updates.
tools
Write Python code in n8n Code nodes. Use when writing Python in n8n, using _input/_json/_node syntax, working with standard library, or need to understand Python limitations in n8n Code nodes. Use this skill when the user specifically requests Python for an n8n Code node. Note — JavaScript is recommended for 95% of use cases — only use Python when the user explicitly prefers it or the task requires Python-specific standard library capabilities (regex, hashlib, statistics). EXCEPTION — for Python in the AI-agent-callable Custom Code Tool (@n8n/n8n-nodes-langchain.toolCode), use the n8n-code-tool skill instead (input is _query, return must be a string).