Back to catalog

n8n-mcp-orchestrator

Expert MCP (Model Context Protocol) orchestration with n8n workflow automation. Master bidirectional MCP integration, expose n8n workflows as AI agent tools, consume MCP servers in workflows, build agentic systems, orchestrate multi-agent workflows, and create production-ready AI-powered automation pipelines with Claude Code integration.

  • Category: discovered
  • Tags: github, community
  • Version: 1.0.0
  • Author: walid
  • Downloads: 0
  • Updated: 2025-11-22

Download the latest version (v1.0.0) from this page.

SKILL.md

---
name: n8n-mcp-orchestrator
description: Expert MCP (Model Context Protocol) orchestration with n8n workflow automation. Master bidirectional MCP integration, expose n8n workflows as AI agent tools, consume MCP servers in workflows, build agentic systems, orchestrate multi-agent workflows, and create production-ready AI-powered automation pipelines with Claude Code integration.
---

# n8n MCP Orchestrator

A comprehensive skill for orchestrating AI agents and workflows using n8n's Model Context Protocol (MCP) integration. This skill enables bidirectional MCP patterns, agentic workflow automation, and production-ready AI-powered systems with Claude Code integration.

## When to Use This Skill

Use this skill when:

- Building AI-powered automation workflows with n8n
- Exposing n8n workflows as tools for AI agents (Claude Code, Claude Desktop)
- Consuming external MCP servers from n8n workflows
- Orchestrating multi-agent systems and agentic workflows
- Creating tool-using AI agents with n8n backend
- Integrating Claude Code with business process automation
- Building context-aware automation with MCP resources
- Coordinating complex workflows across multiple AI agents
- Developing production-ready AI orchestration pipelines
- Implementing bidirectional MCP communication patterns
- Creating autonomous agent systems with workflow orchestration
- Building AI-first automation with 400+ service integrations

## Core Concepts

### Model Context Protocol (MCP)

The Model Context Protocol is an open standard for connecting AI assistants to external systems:

- **Bidirectional Communication**: Clients and servers can both initiate requests
- **Resource Management**: Expose data and context as resources
- **Tool Invocation**: AI agents can execute tools (functions/workflows)
- **Prompt Templates**: Provide structured prompts to AI systems
- **Security**: Built-in authentication and authorization patterns
- **Scalability**: Designed for production AI orchestration

### MCP Architecture Components

**1. MCP Servers**
- Expose capabilities (tools, resources, prompts) to AI clients
- Can be standalone services or embedded in applications
- Handle authentication, rate limiting, and security
- n8n workflows can act as MCP servers

**2. MCP Clients**
- Connect to MCP servers and invoke their capabilities
- AI assistants like Claude Code and Claude Desktop
- n8n workflows can act as MCP clients

**3. Resources**
- Data sources and context exposed by MCP servers
- Examples: documents, database records, API responses
- AI agents can read resources for context

**4. Tools**
- Functions/workflows that AI agents can invoke
- Accept parameters and return results
- n8n workflows become AI-callable tools

**5. Prompts**
- Structured prompt templates for AI interactions
- Include context, instructions, and variables
- Guide AI behavior in specific scenarios

### n8n's Bidirectional MCP Capability

**n8n as MCP Server** (Expose workflows as tools):
- MCP Server Trigger node activates workflow when called by AI
- Workflows become tools that Claude Code can invoke
- Enable AI agents to automate complex business processes
- Return structured data to AI clients

**n8n as MCP Client** (Call external MCP servers):
- MCP Client Tool node invokes external MCP servers
- Call tools from other MCP-compatible services
- Orchestrate multiple MCP servers in single workflow
- Build complex automation chains

### Key MCP Nodes in n8n

**1. MCP Server Trigger**
- Workflow entry point for MCP tool invocations
- Receives parameters from AI agents
- Returns results to calling AI client
- Supports authentication and validation

**2. MCP Client Tool**
- Call external MCP server tools
- Pass parameters to remote tools
- Handle responses and errors
- Chain multiple MCP calls

## n8n as MCP Server

### Exposing Workflows as AI Agent Tools

When you create a workflow with an MCP Server Trigger, that workflow becomes a tool that AI agents can invoke.

**Architecture Pattern:**

```
┌─────────────────────────────────────────────────────────────────┐
│                    Claude Code / Claude Desktop                 │
│                                                                 │
│  Agent decides to use tool:                                     │
│  "I need to create a support ticket for this bug"              │
└─────────────────────────────────────────────────────────────────┘
                          │
                          ↓ MCP Tool Invocation
┌─────────────────────────────────────────────────────────────────┐
│                    n8n Workflow (MCP Server)                    │
│                                                                 │
│  ┌──────────────────────────────────────────────────────────┐  │
│  │ MCP Server Trigger                                        │  │
│  │ Tool: "create_support_ticket"                             │  │
│  │ Receives: {title, description, priority}                  │  │
│  └──────────────────────────────────────────────────────────┘  │
│                          │                                      │
│                          ↓                                      │
│  ┌──────────────────────────────────────────────────────────┐  │
│  │ HTTP Request: Call Jira API                               │  │
│  └──────────────────────────────────────────────────────────┘  │
│                          │                                      │
│                          ↓                                      │
│  ┌──────────────────────────────────────────────────────────┐  │
│  │ Slack Notification: Notify team                           │  │
│  └──────────────────────────────────────────────────────────┘  │
│                          │                                      │
│                          ↓                                      │
│  ┌──────────────────────────────────────────────────────────┐  │
│  │ Respond to MCP: Return ticket ID                          │  │
│  └──────────────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────────────────┘
                          │
                          ↓ MCP Response
┌─────────────────────────────────────────────────────────────────┐
│                    Claude Code                                  │
│                                                                 │
│  Receives: {ticketId: "JIRA-12345", status: "created"}        │
│  Continues conversation with user                              │
└─────────────────────────────────────────────────────────────────┘
```

### MCP Server Trigger Configuration

**Basic Setup:**

1. **Create New Workflow** in n8n
2. **Add MCP Server Trigger** node as entry point
3. **Configure Tool Definition**:
   - **Tool Name**: Unique identifier (e.g., "create_support_ticket")
   - **Description**: Clear description for AI to understand when to use
   - **Parameters**: Define input schema (JSON Schema format)
   - **Authentication**: Optional authentication settings

4. **Build Workflow Logic**: Add nodes to process the request
5. **Return Response**: Last node output becomes MCP response

**MCP Server Trigger Parameters:**

```json
{
  "toolName": "create_support_ticket",
  "description": "Create a support ticket in Jira with automatic team notification",
  "parameters": {
    "type": "object",
    "properties": {
      "title": {
        "type": "string",
        "description": "Brief ticket title"
      },
      "description": {
        "type": "string",
        "description": "Detailed problem description"
      },
      "priority": {
        "type": "string",
        "enum": ["low", "medium", "high", "critical"],
        "description": "Ticket priority level"
      },
      "component": {
        "type": "string",
        "description": "System component affected"
      }
    },
    "required": ["title", "description"]
  }
}
```

### Response Format

The final node output in your workflow is returned to the AI agent:

```json
{
  "success": true,
  "ticketId": "JIRA-12345",
  "url": "https://company.atlassian.net/browse/JIRA-12345",
  "assignee": "john.doe@company.com",
  "createdAt": "2025-10-20T10:30:00Z"
}
```

### Authentication Patterns

**1. API Key Authentication**
```json
{
  "authenticationType": "apiKey",
  "apiKeyHeader": "X-API-Key",
  "requiredScopes": ["workflows:execute"]
}
```

**2. OAuth 2.0**
```json
{
  "authenticationType": "oauth2",
  "authorizationUrl": "https://auth.company.com/oauth/authorize",
  "tokenUrl": "https://auth.company.com/oauth/token",
  "scopes": ["workflows:read", "workflows:execute"]
}
```

**3. No Authentication** (internal use only)
```json
{
  "authenticationType": "none"
}
```

## n8n as MCP Client

### Consuming External MCP Servers

The MCP Client Tool node allows n8n workflows to call external MCP servers and use their tools.

**Architecture Pattern:**

```
┌─────────────────────────────────────────────────────────────────┐
│                    n8n Workflow                                 │
│                                                                 │
│  ┌──────────────────────────────────────────────────────────┐  │
│  │ Schedule Trigger: Every day at 9am                        │  │
│  └──────────────────────────────────────────────────────────┘  │
│                          │                                      │
│                          ↓                                      │
│  ┌──────────────────────────────────────────────────────────┐  │
│  │ MCP Client Tool                                           │  │
│  │ Server: "analytics-mcp-server"                            │  │
│  │ Tool: "generate_daily_report"                             │  │
│  │ Params: {date: "today"}                                   │  │
│  └──────────────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────────────────┘
                          │
                          ↓ MCP Request
┌─────────────────────────────────────────────────────────────────┐
│                    External MCP Server                          │
│                    (Analytics Service)                          │
│                                                                 │
│  Processes request, generates report, returns data             │
└─────────────────────────────────────────────────────────────────┘
                          │
                          ↓ MCP Response
┌─────────────────────────────────────────────────────────────────┐
│                    n8n Workflow (continued)                     │
│                                                                 │
│  ┌──────────────────────────────────────────────────────────┐  │
│  │ Email: Send report to stakeholders                        │  │
│  └──────────────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────────────────┘
```

### MCP Client Tool Configuration

**Basic Setup:**

1. **Add MCP Client Tool node** to workflow
2. **Configure MCP Server Connection**:
   - **Server URL**: MCP server endpoint
   - **Authentication**: API key, OAuth, or none
   - **Timeout**: Request timeout (default: 30s)

3. **Select Tool**: Choose from available tools on MCP server
4. **Provide Parameters**: Map workflow data to tool parameters
5. **Handle Response**: Process returned data in subsequent nodes

**MCP Client Tool Configuration:**

```json
{
  "serverUrl": "https://mcp.analytics-service.com",
  "authentication": {
    "type": "apiKey",
    "apiKey": "{{$credentials.analyticsApiKey}}"
  },
  "tool": "generate_daily_report",
  "parameters": {
    "date": "{{DateTime.now().toISODate()}}",
    "metrics": ["revenue", "users", "engagement"],
    "format": "json"
  },
  "timeout": 60000
}
```

### Discovering Available Tools

MCP servers expose their available tools through the protocol:

```json
{
  "tools": [
    {
      "name": "generate_daily_report",
      "description": "Generate daily analytics report",
      "parameters": {
        "type": "object",
        "properties": {
          "date": {"type": "string"},
          "metrics": {"type": "array"},
          "format": {"type": "string"}
        }
      }
    },
    {
      "name": "query_metrics",
      "description": "Query specific metrics",
      "parameters": {
        "type": "object",
        "properties": {
          "metric": {"type": "string"},
          "startDate": {"type": "string"},
          "endDate": {"type": "string"}
        }
      }
    }
  ]
}
```

## Claude Code Integration

### Connecting Claude Code to n8n Workflows

**Prerequisites:**
1. n8n instance running (self-hosted or cloud)
2. n8n workflow with MCP Server Trigger configured
3. Claude Code with MCP client capability

**Configuration Steps:**

**1. Create n8n MCP Server Workflow**

```
Workflow: "create_task"
┌──────────────────────────────────────┐
│ MCP Server Trigger                   │
│ Tool: create_task                    │
│ Params: title, description, due_date │
└──────────────────────────────────────┘
          ↓
┌──────────────────────────────────────┐
│ HTTP Request: POST to Todoist API    │
└──────────────────────────────────────┘
          ↓
┌──────────────────────────────────────┐
│ Return: Task created confirmation    │
└──────────────────────────────────────┘
```

**2. Get n8n MCP Server URL**

n8n exposes MCP servers at:
```
https://your-n8n-instance.com/mcp
```

**3. Configure Claude Code MCP Client**

Add to `mcp_config.json`:

```json
{
  "mcpServers": {
    "n8n-workflows": {
      "url": "https://your-n8n-instance.com/mcp",
      "apiKey": "your-n8n-api-key",
      "description": "n8n workflow automation tools",
      "tools": [
        "create_task",
        "send_email",
        "create_support_ticket",
        "generate_report"
      ]
    }
  }
}
```

**4. Use in Claude Code**

Claude Code automatically discovers and uses n8n tools:

```
User: "Create a task to review the PR tomorrow at 2pm"

Claude Code:
- Recognizes create_task tool from n8n
- Invokes: create_task(
    title="Review PR",
    description="Code review for authentication feature",
    due_date="2025-10-21T14:00:00Z"
  )
- n8n workflow executes
- Returns task confirmation
- Claude responds: "Task created in Todoist: Review PR (tomorrow at 2pm)"
```

### Bidirectional Claude Code ↔ n8n Integration

**Pattern 1: Claude triggers n8n workflow**
```
Claude Code → MCP Tool Call → n8n MCP Server → Workflow executes
```

**Pattern 2: n8n calls Claude via MCP**
```
n8n Workflow → MCP Client Tool → Claude API → AI processing → Response
```

**Combined Pattern: Agentic Workflow**
```
1. User asks Claude to analyze sales data
2. Claude calls n8n tool: get_sales_data()
3. n8n retrieves data from database
4. Claude analyzes data
5. Claude calls n8n tool: generate_report(analysis)
6. n8n creates PDF report and emails stakeholders
7. Claude confirms completion to user
```

## Agentic Workflow Patterns

### Pattern 1: Multi-Step Agent Workflow

**Scenario:** Customer support ticket processing

```
┌─────────────────────────────────────────────────────────────────┐
│ User: "Customer reports login issue"                            │
└─────────────────────────────────────────────────────────────────┘
                          │
                          ↓
┌─────────────────────────────────────────────────────────────────┐
│ Claude Code (Agent)                                             │
│ 1. Calls: create_support_ticket(issue_type="login")            │
└─────────────────────────────────────────────────────────────────┘
                          │
                          ↓
┌─────────────────────────────────────────────────────────────────┐
│ n8n Workflow 1: Create Ticket                                   │
│ - Create Jira ticket                                            │
│ - Notify support team in Slack                                  │
│ - Return ticket ID                                              │
└─────────────────────────────────────────────────────────────────┘
                          │
                          ↓
┌─────────────────────────────────────────────────────────────────┐
│ Claude Code (Agent)                                             │
│ 2. Calls: search_knowledge_base(query="login issues")          │
└─────────────────────────────────────────────────────────────────┘
                          │
                          ↓
┌─────────────────────────────────────────────────────────────────┐
│ n8n Workflow 2: Knowledge Search                                │
│ - Query internal docs                                           │
│ - Search past tickets                                           │
│ - Return relevant solutions                                     │
└─────────────────────────────────────────────────────────────────┘
                          │
                          ↓
┌─────────────────────────────────────────────────────────────────┐
│ Claude Code (Agent)                                             │
│ 3. Analyzes solutions                                           │
│ 4. Calls: update_ticket(id, suggested_solution)                │
└─────────────────────────────────────────────────────────────────┘
                          │
                          ↓
┌─────────────────────────────────────────────────────────────────┐
│ n8n Workflow 3: Update Ticket                                   │
│ - Update Jira with solution                                     │
│ - Auto-assign to engineer if complex                            │
│ - Send email to customer with workaround                        │
└─────────────────────────────────────────────────────────────────┘
```

### Pattern 2: Multi-Agent Orchestration

**Scenario:** Content creation pipeline with multiple specialized agents

```
┌─────────────────────────────────────────────────────────────────┐
│ Orchestrator Agent (Claude Code)                                │
│ "Create a blog post about our new feature"                      │
└─────────────────────────────────────────────────────────────────┘
                          │
        ┌─────────────────┼─────────────────┐
        ↓                 ↓                 ↓
┌──────────────┐  ┌──────────────┐  ┌──────────────┐
│ Research     │  │ Writing      │  │ SEO          │
│ Agent        │  │ Agent        │  │ Agent        │
└──────────────┘  └──────────────┘  └──────────────┘
        │                 │                 │
        ↓ MCP             ↓ MCP             ↓ MCP
┌──────────────┐  ┌──────────────┐  ┌──────────────┐
│ n8n: Gather  │  │ n8n: Generate│  │ n8n: Optimize│
│ data         │  │ content      │  │ for search   │
└──────────────┘  └──────────────┘  └──────────────┘
        │                 │                 │
        └─────────────────┼─────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────────────┐
│ n8n: Publishing Workflow                                        │
│ - Format content                                                │
│ - Upload images to CDN                                          │
│ - Publish to CMS                                                │
│ - Share on social media                                         │
│ - Notify marketing team                                         │
└─────────────────────────────────────────────────────────────────┘
```

### Pattern 3: Autonomous Agent Loop

**Scenario:** Continuous monitoring and remediation

```
┌─────────────────────────────────────────────────────────────────┐
│ n8n: Monitoring Workflow (runs every 5 minutes)                 │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ 1. Check system health metrics                              │ │
│ │ 2. If anomaly detected → Trigger MCP call to Claude        │ │
│ └─────────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────