8
n8n 中文网amn8n.com

加拿大节假日API MCP服务器

中级

这是一个Engineering, AI RAG领域的自动化工作流,包含 15 个节点。主要使用 HttpRequestTool, McpTrigger 等节点。 连接AI代理至加拿大节假日API,支持6省及节假日操作

前置要求
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "yP9uGLQmy5COX7bz",
  "meta": null,
  "name": "加拿大节假日 API MCP 服务器",
  "tags": [],
  "nodes": [
    {
      "id": "26a8df5c-db6d-43cd-94bd-9810f78f5a92",
      "name": "设置说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1380,
        -240
      ],
      "parameters": {
        "color": 4,
        "height": 1060,
        "content": "### ⚙️ 设置说明"
      },
      "typeVersion": 1
    },
    {
      "id": "1ff9f466-d977-439d-9038-dcc022355864",
      "name": "工作流概览",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1120,
        -240
      ],
      "parameters": {
        "width": 420,
        "height": 920,
        "content": "## 🛠️ 加拿大节假日 MCP 服务器 ✅ 6 个操作"
      },
      "typeVersion": 1
    },
    {
      "id": "88d82a73-f595-4dfe-a3e1-345ab61d4f7f",
      "name": "加拿大节假日 MCP 服务器",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        -620,
        -240
      ],
      "webhookId": "42046709-1e8c-4dcc-8608-5f28f5a6bd25",
      "parameters": {
        "path": "canada-holidays-mcp"
      },
      "typeVersion": 1
    },
    {
      "id": "6b54fafa-84dc-4c18-b64e-9d0ad3d78fb6",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        -100
      ],
      "parameters": {
        "color": 2,
        "width": 500,
        "height": 200,
        "content": "## 信息"
      },
      "typeVersion": 1
    },
    {
      "id": "01bca653-9e1a-40e0-884c-6f322987a420",
      "name": "获取 API 根目录",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -520,
        -60
      ],
      "parameters": {
        "url": "=https://canada-holidays.ca/api/v1",
        "options": {},
        "toolDescription": "Root"
      },
      "typeVersion": 4.2
    },
    {
      "id": "b679949c-71f9-4c6c-9746-2a80b0d19651",
      "name": "获取 API 架构",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -320,
        -60
      ],
      "parameters": {
        "url": "=https://canada-holidays.ca/api/v1/spec",
        "options": {},
        "toolDescription": "Get JSON schema"
      },
      "typeVersion": 4.2
    },
    {
      "id": "bd922cde-17ae-4ed7-a408-d942c744ac96",
      "name": "描述 - 信息",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        -60
      ],
      "parameters": {
        "width": 500,
        "height": 120,
        "content": "## 📋 信息"
      },
      "typeVersion": 1
    },
    {
      "id": "eecf420a-542e-400d-8ed7-ade3d47f2c7d",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        140
      ],
      "parameters": {
        "color": 3,
        "width": 500,
        "height": 200,
        "content": "## 节假日"
      },
      "typeVersion": 1
    },
    {
      "id": "84a77685-cb5e-4828-a1a8-a762ecf29481",
      "name": "列出所有节假日",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -520,
        180
      ],
      "parameters": {
        "url": "=https://canada-holidays.ca/api/v1/holidays",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "year",
              "value": "={{ $fromAI('year', 'A calendar year', 'number', 2023) }}"
            },
            {
              "name": "federal",
              "value": "={{ $fromAI('federal', 'A boolean parameter. If true or 1, will return only federal holidays. If false or 0, will return no federal holidays.', 'string') }}"
            },
            {
              "name": "optional",
              "value": "={{ $fromAI('optional', 'A boolean parameter. If false or 0 (default), will return only legislated holidays. If true or 1, will return optional holidays from Alberta and BC.', 'string', 'false') }}"
            }
          ]
        },
        "toolDescription": "Get all holidays\n\nParameters:\n- Query parameters:\n  • year (optional) - A calendar year\n  • federal (optional) - A boolean parameter. If true or 1, will return only federal holidays. If false or 0, will return no federal holidays.\n  • optional (optional) - A boolean parameter. If false or 0 (default), will return only legislated holidays. If true or 1, will return optional holidays from Alberta and BC."
      },
      "typeVersion": 4.2
    },
    {
      "id": "12c8c861-1b3e-4094-a5e8-9ae1cc0279b3",
      "name": "按 ID 获取节假日",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -320,
        180
      ],
      "parameters": {
        "url": "=https://canada-holidays.ca/api/v1/holidays/{{ $fromAI('holidayId', 'Primary key for a holiday', 'number') }}",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "year",
              "value": "={{ $fromAI('year', 'A calendar year', 'number', 2023) }}"
            },
            {
              "name": "optional",
              "value": "={{ $fromAI('optional', 'A boolean parameter. If false or 0 (default), will return provinces for which this is a legislated holiday. If true or 1, will return provinces which optionally celebrate this holiday.', 'string', 'false') }}"
            }
          ]
        },
        "toolDescription": "Get a holiday by id\n\nParameters:\n- Path parameters:\n  • holidayId (required) - Primary key for a holiday\n- Query parameters:\n  • year (optional) - A calendar year\n  • optional (optional) - A boolean parameter. If false or 0 (default), will return provinces for which this is a legislated holiday. If true or 1, will return provinces which optionally celebrate this holiday."
      },
      "typeVersion": 4.2
    },
    {
      "id": "ce0e58c1-04f3-4c9a-9240-4d22461087b3",
      "name": "描述 - 节假日",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        180
      ],
      "parameters": {
        "width": 500,
        "height": 120,
        "content": "## 📋 节假日"
      },
      "typeVersion": 1
    },
    {
      "id": "c049349a-1c8c-4fb5-9f67-c150db9b4762",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        380
      ],
      "parameters": {
        "color": 4,
        "width": 500,
        "height": 200,
        "content": "## 省份"
      },
      "typeVersion": 1
    },
    {
      "id": "6c878999-dbb6-4c39-90da-b9884756757a",
      "name": "列出所有省份",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -520,
        420
      ],
      "parameters": {
        "url": "=https://canada-holidays.ca/api/v1/provinces",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "year",
              "value": "={{ $fromAI('year', 'A calendar year', 'number', 2023) }}"
            },
            {
              "name": "optional",
              "value": "={{ $fromAI('optional', 'A boolean parameter. If false or 0 (default), will return only legislated holidays. If true or 1, will return optional holidays from Alberta and BC.', 'string', 'false') }}"
            }
          ]
        },
        "toolDescription": "Get all provinces\n\nParameters:\n- Query parameters:\n  • year (optional) - A calendar year\n  • optional (optional) - A boolean parameter. If false or 0 (default), will return only legislated holidays. If true or 1, will return optional holidays from Alberta and BC."
      },
      "typeVersion": 4.2
    },
    {
      "id": "a3ecbce6-be8c-405f-9002-8608968c456c",
      "name": "按 ID 获取省份",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -320,
        420
      ],
      "parameters": {
        "url": "=https://canada-holidays.ca/api/v1/provinces/{{ $fromAI('provinceId', 'A Canadian province abbreviation', 'string') }}",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "year",
              "value": "={{ $fromAI('year', 'A calendar year', 'number', 2023) }}"
            },
            {
              "name": "optional",
              "value": "={{ $fromAI('optional', 'A boolean parameter (AB and BC only). If false or 0 (default), will return only legislated holidays. If true or 1, will return optional holidays from Alberta and BC.', 'string', 'false') }}"
            }
          ]
        },
        "toolDescription": "Get a province or territory by abbreviation\n\nParameters:\n- Path parameters:\n  • provinceId (required) - A Canadian province abbreviation\n- Query parameters:\n  • year (optional) - A calendar year\n  • optional (optional) - A boolean parameter (AB and BC only). If false or 0 (default), will return only legislated holidays. If true or 1, will return optional holidays from Alberta and BC."
      },
      "typeVersion": 4.2
    },
    {
      "id": "46d3c8cc-f003-4fac-b200-377446393a7d",
      "name": "描述 - 省份",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        420
      ],
      "parameters": {
        "width": 500,
        "height": 120,
        "content": "## 📋 省份"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "shared": [
    {
      "role": "workflow:owner",
      "project": {
        "id": "G5fce9xGuBAsWBXe",
        "icon": null,
        "name": "David Ashby <david.ashby.lds@gmail.com>",
        "type": "personal",
        "createdAt": "2025-06-04T02:55:02.013Z",
        "updatedAt": "2025-06-04T02:56:01.361Z",
        "projectRelations": [
          {
            "role": "project:personalOwner",
            "user": {
              "id": "715c1c00-cb48-4712-9a32-f1f4b6db2b30",
              "role": "global:owner",
              "email": "david.ashby.lds@gmail.com",
              "disabled": false,
              "lastName": "Ashby",
              "settings": {
                "npsSurvey": {
                  "responded": true,
                  "lastShownAt": 1749357655581
                },
                "userActivated": true,
                "userActivatedAt": 1749075994495,
                "easyAIWorkflowOnboarded": true,
                "firstSuccessfulWorkflowId": "3N3vVikZb3MckFYm"
              },
              "createdAt": "2025-06-04T02:55:01.745Z",
              "firstName": "David",
              "isPending": false,
              "updatedAt": "2025-06-08T04:40:58.399Z",
              "mfaEnabled": false,
              "personalizationAnswers": {
                "version": "v4",
                "personalization_survey_n8n_version": "1.95.3",
                "personalization_survey_submitted_at": "2025-06-04T02:56:07.075Z"
              }
            },
            "userId": "715c1c00-cb48-4712-9a32-f1f4b6db2b30",
            "createdAt": "2025-06-04T02:55:02.013Z",
            "projectId": "G5fce9xGuBAsWBXe",
            "updatedAt": "2025-06-04T02:55:02.013Z"
          }
        ]
      },
      "createdAt": "2025-07-01T23:47:09.323Z",
      "projectId": "G5fce9xGuBAsWBXe",
      "updatedAt": "2025-07-01T23:47:09.323Z",
      "workflowId": "yP9uGLQmy5COX7bz"
    }
  ],
  "pinData": {},
  "settings": {
    "timezone": "America/New_York"
  },
  "createdAt": "2025-07-01T23:47:09.319Z",
  "updatedAt": "2025-07-01T23:47:50.000Z",
  "versionId": "f0456ddc-0a71-4826-843a-962b06de880b",
  "isArchived": false,
  "staticData": null,
  "connections": {
    "Get API Root": {
      "ai_tool": [
        [
          {
            "node": "Canada Holidays MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get API Schema": {
      "ai_tool": [
        [
          {
            "node": "Canada Holidays MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Holiday by ID": {
      "ai_tool": [
        [
          {
            "node": "Canada Holidays MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "List All Holidays": {
      "ai_tool": [
        [
          {
            "node": "Canada Holidays MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Province by ID": {
      "ai_tool": [
        [
          {
            "node": "Canada Holidays MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "List All Provinces": {
      "ai_tool": [
        [
          {
            "node": "Canada Holidays MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "triggerCount": 0
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 工程, AI RAG 检索增强

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量15
分类2
节点类型3
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
David Ashby

David Ashby

@cfomodz

A hacker by nature, programmer by trade ⚒️ I'm looking to collaborate on things that save human labor 📫 How to reach me Github👇 -> Discord

外部链接
在 n8n.io 查看

分享此工作流