Master guide for using n8n-mcp MCP server tools to build workflows.
n8n-mcp provides tools organized into categories:
- Node Discovery → SEARCH_GUIDE.md
- Configuration Validation → VALIDATION_GUIDE.md
- Workflow Management → WORKFLOW_GUIDE.md
- Template Library - Search and deploy 2,700+ real workflows
- Documentation & Guides - Tool docs, AI agent guide, Code node guides
Quick Reference
| 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 |
Finding the Right Node
Workflow:
1. search_nodes({query: "keyword"})
2. get_node({nodeType: "nodes-base.name"})
3. [Optional] get_node({nodeType: "nodes-base.name", mode: "docs"})
Example:
javascript
1// Step 1: Search
2search_nodes({query: "slack"})
3// Returns: nodes-base.slack
4
5// Step 2: Get details
6get_node({nodeType: "nodes-base.slack"})
7// Returns: operations, properties, examples (standard detail)
8
9// Step 3: Get readable documentation
10get_node({nodeType: "nodes-base.slack", mode: "docs"})
11// Returns: markdown documentation
Common pattern: search → get_node (18s average)
Validating Configuration
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)
Managing Workflows
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)
Two different formats for different tools!
javascript
1// Use SHORT prefix
2"nodes-base.slack"
3"nodes-base.httpRequest"
4"nodes-base.webhook"
5"nodes-langchain.agent"
Tools that use this:
- search_nodes (returns this format)
- get_node
- validate_node
- validate_workflow
javascript
1// Use FULL prefix
2"n8n-nodes-base.slack"
3"n8n-nodes-base.httpRequest"
4"n8n-nodes-base.webhook"
5"@n8n/n8n-nodes-langchain.agent"
Tools that use this:
- n8n_create_workflow
- n8n_update_partial_workflow
Conversion
javascript
1// search_nodes returns BOTH formats
2{
3 "nodeType": "nodes-base.slack", // For search/validate tools
4 "workflowNodeType": "n8n-nodes-base.slack" // For workflow tools
5}
Common Mistakes
Problem: "Node not found" error
javascript
1// WRONG
2get_node({nodeType: "slack"}) // Missing prefix
3get_node({nodeType: "n8n-nodes-base.slack"}) // Wrong prefix
4
5// CORRECT
6get_node({nodeType: "nodes-base.slack"})
Mistake 2: Using detail="full" by Default
Problem: Huge payload, slower response, token waste
javascript
1// WRONG - Returns 3-8K tokens, use sparingly
2get_node({nodeType: "nodes-base.slack", detail: "full"})
3
4// CORRECT - Returns 1-2K tokens, covers 95% of use cases
5get_node({nodeType: "nodes-base.slack"}) // detail="standard" is default
6get_node({nodeType: "nodes-base.slack", detail: "standard"})
When to use detail="full":
- Debugging complex configuration issues
- Need complete property schema with all nested options
- Exploring advanced features
Better alternatives:
get_node({detail: "standard"}) - for operations list (default)
get_node({mode: "docs"}) - for readable documentation
get_node({mode: "search_properties", propertyQuery: "auth"}) - for specific property
Mistake 3: Not Using Validation Profiles
Problem: 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)
javascript
1// WRONG - Uses default profile
2validate_node({nodeType, config})
3
4// CORRECT - Explicit profile
5validate_node({nodeType, config, profile: "runtime"})
Mistake 4: Ignoring Auto-Sanitization
What happens: ALL nodes sanitized on ANY workflow update
Auto-fixes:
- Binary operators (equals, contains) → removes singleValue
- Unary operators (isEmpty, isNotEmpty) → adds singleValue: true
- IF/Switch nodes → adds missing metadata
Cannot fix:
- Broken connections
- Branch count mismatches
- Paradoxical corrupt states
javascript
1// After ANY update, auto-sanitization runs on ALL nodes
2n8n_update_partial_workflow({id, operations: [...]})
3// → Automatically fixes operator structures
Mistake 5: Not Using Smart Parameters
Problem: Complex sourceIndex calculations for multi-output nodes
Old way (manual):
javascript
1// IF node connection
2{
3 type: "addConnection",
4 source: "IF",
5 target: "Handler",
6 sourceIndex: 0 // Which output? Hard to remember!
7}
New way (smart parameters):
javascript
1// IF node - semantic branch names
2{
3 type: "addConnection",
4 source: "IF",
5 target: "True Handler",
6 branch: "true" // Clear and readable!
7}
8
9{
10 type: "addConnection",
11 source: "IF",
12 target: "False Handler",
13 branch: "false"
14}
15
16// Switch node - semantic case numbers
17{
18 type: "addConnection",
19 source: "Switch",
20 target: "Handler A",
21 case: 0
22}
Mistake 6: Not Using intent Parameter
Problem: Less helpful tool responses
javascript
1// WRONG - No context for response
2n8n_update_partial_workflow({
3 id: "abc",
4 operations: [{type: "addNode", node: {...}}]
5})
6
7// CORRECT - Better AI responses
8n8n_update_partial_workflow({
9 id: "abc",
10 intent: "Add error handling for API failures",
11 operations: [{type: "addNode", node: {...}}]
12})
Pattern 1: Node Discovery (Most Common)
Common workflow: 18s average between steps
javascript
1// Step 1: Search (fast!)
2const results = await search_nodes({
3 query: "slack",
4 mode: "OR", // Default: any word matches
5 limit: 20
6});
7// → Returns: nodes-base.slack, nodes-base.slackTrigger
8
9// Step 2: Get details (~18s later, user reviewing results)
10const details = await get_node({
11 nodeType: "nodes-base.slack",
12 includeExamples: true // Get real template configs
13});
14// → Returns: operations, properties, metadata
Pattern 2: Validation Loop
Typical cycle: 23s thinking, 58s fixing
javascript
1// Step 1: Validate
2const result = await validate_node({
3 nodeType: "nodes-base.slack",
4 config: {
5 resource: "channel",
6 operation: "create"
7 },
8 profile: "runtime"
9});
10
11// Step 2: Check errors (~23s thinking)
12if (!result.valid) {
13 console.log(result.errors); // "Missing required field: name"
14}
15
16// Step 3: Fix config (~58s fixing)
17config.name = "general";
18
19// Step 4: Validate again
20await validate_node({...}); // Repeat until clean
Pattern 3: Workflow Editing
Most used update tool: 99.0% success rate, 56s average between edits
javascript
1// Iterative workflow building (NOT one-shot!)
2// Edit 1
3await n8n_update_partial_workflow({
4 id: "workflow-id",
5 intent: "Add webhook trigger",
6 operations: [{type: "addNode", node: {...}}]
7});
8
9// ~56s later...
10
11// Edit 2
12await n8n_update_partial_workflow({
13 id: "workflow-id",
14 intent: "Connect webhook to processor",
15 operations: [{type: "addConnection", source: "...", target: "..."}]
16});
17
18// ~56s later...
19
20// Edit 3 (validation)
21await n8n_validate_workflow({id: "workflow-id"});
22
23// Ready? Activate!
24await n8n_update_partial_workflow({
25 id: "workflow-id",
26 intent: "Activate workflow for production",
27 operations: [{type: "activateWorkflow"}]
28});
Detailed Guides
See SEARCH_GUIDE.md for:
- search_nodes
- get_node with detail levels (minimal, standard, full)
- get_node modes (info, docs, search_properties, versions)
See VALIDATION_GUIDE.md for:
- Validation profiles explained
- validate_node with modes (minimal, full)
- validate_workflow complete structure
- Auto-sanitization system
- Handling validation errors
Workflow Management
See WORKFLOW_GUIDE.md for:
- n8n_create_workflow
- n8n_update_partial_workflow (17 operation types!)
- Smart parameters (branch, case)
- AI connection types (8 types)
- Workflow activation (activateWorkflow/deactivateWorkflow)
- n8n_deploy_template
- n8n_workflow_versions
Template Usage
Search Templates
javascript
1// Search by keyword (default mode)
2search_templates({
3 query: "webhook slack",
4 limit: 20
5});
6
7// Search by node types
8search_templates({
9 searchMode: "by_nodes",
10 nodeTypes: ["n8n-nodes-base.httpRequest", "n8n-nodes-base.slack"]
11});
12
13// Search by task type
14search_templates({
15 searchMode: "by_task",
16 task: "webhook_processing"
17});
18
19// Search by metadata (complexity, setup time)
20search_templates({
21 searchMode: "by_metadata",
22 complexity: "simple",
23 maxSetupMinutes: 15
24});
Get Template Details
javascript
1get_template({
2 templateId: 2947,
3 mode: "structure" // nodes+connections only
4});
5
6get_template({
7 templateId: 2947,
8 mode: "full" // complete workflow JSON
9});
Deploy Template Directly
javascript
1// Deploy template to your n8n instance
2n8n_deploy_template({
3 templateId: 2947,
4 name: "My Weather to Slack", // Custom name (optional)
5 autoFix: true, // Auto-fix common issues (default)
6 autoUpgradeVersions: true // Upgrade node versions (default)
7});
8// Returns: workflow ID, required credentials, fixes applied
javascript
1// Overview of all tools
2tools_documentation()
3
4// Specific tool details
5tools_documentation({
6 topic: "search_nodes",
7 depth: "full"
8})
9
10// Code node guides
11tools_documentation({topic: "javascript_code_node_guide", depth: "full"})
12tools_documentation({topic: "python_code_node_guide", depth: "full"})
AI Agent Guide
javascript
1// Comprehensive AI workflow guide
2ai_agents_guide()
3// Returns: Architecture, connections, tools, validation, best practices
Health Check
javascript
1// Quick health check
2n8n_health_check()
3
4// Detailed diagnostics
5n8n_health_check({mode: "diagnostic"})
6// → Returns: status, env vars, tool status, API connectivity
Always Available (no n8n API needed):
- search_nodes, get_node
- validate_node, validate_workflow
- search_templates, get_template
- tools_documentation, ai_agents_guide
Requires n8n API (N8N_API_URL + N8N_API_KEY):
- n8n_create_workflow
- n8n_update_partial_workflow
- n8n_validate_workflow (by ID)
- n8n_list_workflows, n8n_get_workflow
- n8n_test_workflow
- n8n_executions
- n8n_deploy_template
- n8n_workflow_versions
- n8n_autofix_workflow
If API tools unavailable, use templates and validation-only workflows.
Detail Levels (mode="info", default):
minimal (~200 tokens) - Basic metadata only
standard (~1-2K tokens) - Essential properties + operations (RECOMMENDED)
full (~3-8K tokens) - Complete schema (use sparingly)
Operation Modes:
info (default) - Node schema with detail level
docs - Readable markdown documentation
search_properties - Find specific properties (use with propertyQuery)
versions - List all versions with breaking changes
compare - Compare two versions
breaking - Show only breaking changes
migrations - Show auto-migratable changes
javascript
1// Standard (recommended)
2get_node({nodeType: "nodes-base.httpRequest"})
3
4// Get documentation
5get_node({nodeType: "nodes-base.webhook", mode: "docs"})
6
7// Search for properties
8get_node({nodeType: "nodes-base.httpRequest", mode: "search_properties", propertyQuery: "auth"})
9
10// Check versions
11get_node({nodeType: "nodes-base.executeWorkflow", mode: "versions"})
validate_node (Unified Validation)
Modes:
full (default) - Comprehensive validation with errors/warnings/suggestions
minimal - Quick required fields check only
Profiles (for mode="full"):
minimal - Very lenient
runtime - Standard (default, recommended)
ai-friendly - Balanced for AI workflows
strict - Most thorough (production)
javascript
1// Full validation with runtime profile
2validate_node({nodeType: "nodes-base.slack", config: {...}, profile: "runtime"})
3
4// Quick required fields check
5validate_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_create_workflow | 100-500ms | Medium |
| n8n_update_partial_workflow | 50-200ms | Small |
| n8n_deploy_template | 200-500ms | Medium |
Best Practices
Do
- Use
get_node({detail: "standard"}) for most use cases
- Specify validation profile explicitly (
profile: "runtime")
- Use smart parameters (
branch, case) for clarity
- Include
intent parameter in workflow updates
- Follow search → get_node → validate workflow
- Iterate workflows (avg 56s between edits)
- Validate after every significant change
- Use
includeExamples: true for real configs
- Use
n8n_deploy_template for quick starts
Don't
- Use
detail: "full" unless necessary (wastes tokens)
- Forget nodeType prefix (
nodes-base.*)
- Skip validation profiles
- Try to build workflows in one shot (iterate!)
- Ignore auto-sanitization behavior
- Use full prefix (
n8n-nodes-base.*) with search/validate tools
- Forget to activate workflows after building
Summary
Most Important:
- Use get_node with
detail: "standard" (default) - covers 95% of use cases
- nodeType formats differ:
nodes-base.* (search/validate) vs n8n-nodes-base.* (workflows)
- Specify validation profiles (
runtime recommended)
- Use smart parameters (
branch="true", case=0)
- Include intent parameter in workflow updates
- Auto-sanitization runs on ALL nodes during updates
- Workflows can be activated via API (
activateWorkflow operation)
- Workflows are built iteratively (56s avg between edits)
Common Workflow:
- search_nodes → find node
- get_node → understand config
- validate_node → check config
- n8n_create_workflow → build
- n8n_validate_workflow → verify
- n8n_update_partial_workflow → iterate
- activateWorkflow → go live!
For details, see:
Related Skills:
- n8n Expression Syntax - Write expressions in workflow fields
- n8n Workflow Patterns - Architectural patterns from templates
- n8n Validation Expert - Interpret validation errors
- n8n Node Configuration - Operation-specific requirements
- n8n Code JavaScript - Write JavaScript in Code nodes
- n8n Code Python - Write Python in Code nodes