AutomationFlowsGeneral › Mcp Client 示例工作流

Mcp Client 示例工作流

MCP Client 示例工作流. Uses n8n-nodes-mcp. Event-driven trigger; 6 nodes.

Event trigger★★★★☆ complexity6 nodesN8N Nodes Mcp
General Trigger: Event Nodes: 6 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "MCP Client \u793a\u4f8b\u5de5\u4f5c\u6d41",
  "nodes": [
    {
      "parameters": {},
      "id": "manual-trigger-001",
      "name": "\u624b\u52a8\u89e6\u53d1",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        100,
        200
      ]
    },
    {
      "parameters": {
        "connectionType": "stdio",
        "command": "python",
        "args": [
          "-m",
          "mcp_server"
        ],
        "operation": "listTools",
        "toolName": "",
        "toolArguments": {}
      },
      "id": "mcp-client-001",
      "name": "MCP\u5ba2\u6237\u7aef",
      "type": "n8n-nodes-mcp.mcpClient",
      "typeVersion": 1,
      "position": [
        300,
        200
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "response-data",
              "name": "mcp_response",
              "type": "object",
              "value": "={{ $json }}"
            },
            {
              "id": "timestamp",
              "name": "processed_at",
              "type": "string",
              "value": "={{ new Date().toISOString() }}"
            },
            {
              "id": "tools-count",
              "name": "tools_count",
              "type": "number",
              "value": "={{ $json.tools ? $json.tools.length : 0 }}"
            }
          ]
        }
      },
      "id": "set-response-001",
      "name": "\u5904\u7406\u54cd\u5e94",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [
        500,
        200
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "success-condition",
              "leftValue": "={{ $('MCP\u5ba2\u6237\u7aef').item.json.success }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "equal"
              }
            }
          ],
          "combinator": "and"
        }
      },
      "id": "if-success-001",
      "name": "\u68c0\u67e5\u6210\u529f",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        700,
        200
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "success-message",
              "name": "message",
              "type": "string",
              "value": "MCP\u8fde\u63a5\u6210\u529f\uff01\u53d1\u73b0 {{ $('\u5904\u7406\u54cd\u5e94').item.json.tools_count }} \u4e2a\u53ef\u7528\u5de5\u5177"
            },
            {
              "id": "status",
              "name": "status",
              "type": "string",
              "value": "success"
            }
          ]
        }
      },
      "id": "success-output-001",
      "name": "\u6210\u529f\u8f93\u51fa",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [
        900,
        100
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "error-message",
              "name": "message",
              "type": "string",
              "value": "MCP\u8fde\u63a5\u5931\u8d25\uff1a{{ $('MCP\u5ba2\u6237\u7aef').item.json.error || '\u672a\u77e5\u9519\u8bef' }}"
            },
            {
              "id": "status",
              "name": "status",
              "type": "string",
              "value": "error"
            }
          ]
        }
      },
      "id": "error-output-001",
      "name": "\u9519\u8bef\u8f93\u51fa",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [
        900,
        300
      ]
    }
  ],
  "connections": {
    "\u624b\u52a8\u89e6\u53d1": {
      "main": [
        [
          {
            "node": "MCP\u5ba2\u6237\u7aef",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MCP\u5ba2\u6237\u7aef": {
      "main": [
        [
          {
            "node": "\u5904\u7406\u54cd\u5e94",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u5904\u7406\u54cd\u5e94": {
      "main": [
        [
          {
            "node": "\u68c0\u67e5\u6210\u529f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u68c0\u67e5\u6210\u529f": {
      "main": [
        [
          {
            "node": "\u6210\u529f\u8f93\u51fa",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\u9519\u8bef\u8f93\u51fa",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "saveDataErrorExecution": "all",
    "saveDataSuccessExecution": "all",
    "saveManualExecutions": true,
    "saveExecutionProgress": true,
    "executionOrder": "v1",
    "timezone": "Asia/Shanghai"
  },
  "staticData": null,
  "tags": [
    {
      "createdAt": "2025-01-20T00:00:00.000Z",
      "updatedAt": "2025-01-20T00:00:00.000Z",
      "id": "mcp-demo",
      "name": "MCP\u793a\u4f8b"
    }
  ],
  "triggerCount": 1,
  "meta": {
    "templateCredsSetupCompleted": true,
    "description": "\u6f14\u793a\u5982\u4f55\u4f7f\u7528n8n-nodes-mcp\u5305\u8fde\u63a5MCP\u670d\u52a1\u5668\u5e76\u83b7\u53d6\u53ef\u7528\u5de5\u5177\u5217\u8868",
    "version": "1.0.0",
    "author": "N8N MCP\u4e13\u5bb6\u667a\u80fd\u4f53",
    "category": "MCP\u96c6\u6210\u793a\u4f8b"
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

MCP Client 示例工作流. Uses n8n-nodes-mcp. Event-driven trigger; 6 nodes.

Source: https://github.com/Poghappy/n8n-automation-workspace/blob/cd04fccbb6baa84b74f3885903eb2372402da78b/workflows/mcp-client-demo.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

Product - Google Search Console API Examples. Uses httpRequest. Event-driven trigger; 36 nodes.

HTTP Request
General

Metavoir Creative Intake To Review Brief. Event-driven trigger; 21 nodes.

General

Retry on fail except for known error Template. Uses stopAndError, noOp, stickyNote, manualTrigger. Event-driven trigger; 19 nodes.

Stop And Error
General

Retry on fail except for known error Template. Uses stopAndError. Event-driven trigger; 19 nodes.

Stop And Error
General

02 - Flow Control Demo (IF & Switch). Event-driven trigger; 16 nodes.