Skip to main content

Overview

The n8n-MCP server provides 20 specialized tools designed to help AI agents build, validate, and manage n8n workflows efficiently. These tools are optimized to reduce token usage while providing comprehensive functionality.

Tool Categories

Discovery Tools

These tools help you find and explore n8n nodes.

tools_documentation

Get documentation for MCP tools themselves.
{
  "topic": "search_nodes",
  "depth": "essentials"  // or "full"
}
Call without parameters for a quick start guide, or use depth="full" for comprehensive documentation.

search_nodes

Search for n8n nodes by keyword with optional real-world examples.
{
  "query": "webhook",
  "limit": 20,
  "mode": "OR",  // "OR", "AND", or "FUZZY"
  "includeExamples": true,
  "source": "all"  // "all", "core", "community", "verified"
}
Search Modes:
  • OR - Match any word (default, broadest results)
  • AND - Match all words (narrower results)
  • FUZZY - Typo-tolerant matching
{
  "results": [
    {
      "nodeType": "n8n-nodes-base.webhook",
      "displayName": "Webhook",
      "description": "Receive web requests",
      "category": "Core Nodes",
      "examples": [
        {
          "templateId": 1234,
          "config": {
            "path": "my-webhook",
            "httpMethod": "POST"
          }
        }
      ]
    }
  ]
}

Configuration Tools

These tools provide node schemas and configuration details.

get_node

Get detailed node information with progressive detail levels.
{
  "nodeType": "nodes-base.httpRequest",
  "detail": "standard",  // "minimal", "standard", "full"
  "mode": "info",        // "info", "docs", "search_properties", etc.
  "includeTypeInfo": false,
  "includeExamples": false
}
Detail Levels:
  • minimal - ~200 tokens (basic info only)
  • standard - ~1-2K tokens (recommended, essential properties)
  • full - ~3-8K tokens (everything, use sparingly)
Modes:
  • info (default) - Node schema with properties
  • docs - Readable markdown documentation
  • search_properties - Find specific properties by query
  • versions - List available versions
  • compare - Compare two versions
  • breaking - Show breaking changes between versions
  • migrations - Migration guide between versions
Token Optimization: Start with detail="standard" which provides 10-20 essential properties instead of 200+. Use detail="full" only when you need advanced configuration options.

Validation Tools

Ensure your configurations are correct before execution.

validate_node

Validate a single node configuration with comprehensive error checking.
{
  "nodeType": "nodes-base.slack",
  "config": {
    "resource": "channel",
    "operation": "create"
  },
  "mode": "full",          // "full" or "minimal"
  "profile": "ai-friendly"  // "strict", "runtime", "ai-friendly", "minimal"
}
Validation Modes:
  • full - Comprehensive validation with errors/warnings/suggestions
  • minimal - Quick check for required fields only
Validation Profiles:
  • minimal - Only critical errors (missing required fields)
  • runtime - Errors that would cause runtime failures
  • ai-friendly - Balanced validation with helpful suggestions (default)
  • strict - Everything including best practices and security checks
Response Structure:
{
  "valid": boolean,
  "errors": [
    {
      "type": "missing_required" | "invalid_type" | "invalid_value",
      "property": "channel",
      "message": "Required property 'channel' is missing",
      "fix": "Add channel to your configuration"
    }
  ],
  "warnings": [
    {
      "type": "missing_common" | "security" | "best_practice",
      "property": "authentication",
      "message": "API endpoints typically require authentication",
      "suggestion": "Consider setting authentication"
    }
  ],
  "suggestions": ["Consider setting 'timeout' for better control"],
  "summary": {
    "hasErrors": false,
    "errorCount": 0,
    "warningCount": 1,
    "suggestionCount": 3
  }
}

validate_workflow

Validate an entire workflow including structure, connections, and expressions.
{
  "workflow": {
    "nodes": [...],
    "connections": {...}
  },
  "options": {
    "validateNodes": true,
    "validateConnections": true,
    "validateExpressions": true,
    "profile": "runtime"
  }
}
Essential before deployment: Always validate workflows before deploying to catch connection errors, invalid expressions, and configuration issues.

Template Tools

Discover and use pre-built workflow templates.

get_template

Get a specific template by ID.
{
  "templateId": 1234,
  "mode": "full"  // "nodes_only", "structure", "full"
}
Modes:
  • nodes_only - Just the node list (minimal)
  • structure - Nodes + connections
  • full - Complete workflow JSON

search_templates

Search for workflow templates using multiple strategies.
{
  "searchMode": "keyword",  // "keyword", "by_nodes", "by_task", "by_metadata"
  "query": "chatbot",       // For keyword mode
  "limit": 20,
  "offset": 0
}
Search Modes:

Building a New Workflow

  1. Search for nodes:
    search_nodes({"query": "http api", "mode": "OR"})
    
  2. Get node details:
    get_node({"nodeType": "nodes-base.httpRequest", "detail": "standard"})
    
  3. Validate configuration:
    validate_node({
      "nodeType": "nodes-base.httpRequest",
      "config": {"url": "https://api.example.com"},
      "mode": "full"
    })
    
  4. Validate complete workflow:
    validate_workflow({"workflow": {...}})
    

Using Templates

  1. Search for templates:
    search_templates({
      "searchMode": "by_task",
      "task": "slack_integration"
    })
    
  2. Get template details:
    get_template({"templateId": 1234, "mode": "full"})
    
  3. Modify and validate:
    validate_workflow({"workflow": modifiedTemplate})
    

Performance Tips

Token Optimization Best Practices:
  1. Use get_node with detail="standard" (95% smaller than full)
  2. Use mode="search_properties" to find specific properties
  3. Use validate_node with mode="minimal" for quick checks
  4. Use includeExamples=true only when you need real-world examples
  5. Use templates as starting points instead of building from scratch

Common Patterns

HTTP API Integration

// 1. Find HTTP nodes
const nodes = await search_nodes({query: "http", limit: 5})

// 2. Get standard configuration
const nodeInfo = await get_node({
  nodeType: "nodes-base.httpRequest",
  detail: "standard"
})

// 3. Validate your config
const validation = await validate_node({
  nodeType: "nodes-base.httpRequest",
  config: {
    url: "https://api.example.com/users",
    method: "POST",
    sendBody: true,
    contentType: "json"
  },
  profile: "ai-friendly"
})

Database Operations

// 1. Search for database nodes
const dbNodes = await search_nodes({
  query: "database postgres",
  mode: "AND"
})

// 2. Get documentation
const docs = await get_node({
  nodeType: "nodes-base.postgres",
  mode: "docs"
})

// 3. Validate with strict profile for production
const validation = await validate_node({
  nodeType: "nodes-base.postgres",
  config: {
    operation: "executeQuery",
    query: "SELECT * FROM users WHERE id = $1"
  },
  profile: "strict"
})

Error Handling

Common Validation Errors:
  • missing_required - Add the required property
  • invalid_type - Check the expected type (string, number, boolean, object)
  • invalid_value - Value not in allowed options or wrong format
  • invalid_configuration - Complex type structure is incorrect (filter, resourceLocator, etc.)

Next Steps

Node Search

Learn about full-text search and filtering

Validation

Deep dive into multi-level validation

Templates

Discover pre-built workflow templates

Workflows

Understand workflow structure and validation

Build docs developers (and LLMs) love