{
  "name": "Build your own CUSTOM API MCP server",
  "nodes": [
    {
      "id": "4bdd4360-b518-4b46-81fa-0d3183ce642d",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        680,
        260
      ]
    },
    {
      "id": "74bdcff0-0615-4d81-82ff-ff8340939399",
      "name": "Operation",
      "type": "n8n-nodes-base.switch",
      "position": [
        1040,
        260
      ]
    },
    {
      "id": "8850cd57-9bc1-43b7-9366-7d91afc7bc42",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -120
      ],
      "parameters": {
        "width": 680,
        "height": 660,
        "content": "## 1. Set up an MCP Server Trigger\n[Read more about the MCP Server Trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcptrigger)"
      }
    },
    {
      "id": "ad541df3-44ed-4ef4-af91-841dc9986b4c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        -120
      ],
      "parameters": {
        "width": 600,
        "height": 260,
        "content": "## 2. Build Your MCP Server from Existing APIs\n[Read more about the HTTP Request Node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest)\n\nN8N allows any organisation to q"
      }
    },
    {
      "id": "962cb379-8916-4a9f-8a7b-5aa9d31d5d88",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -240
      ],
      "parameters": {
        "width": 380,
        "height": 100,
        "content": "### Always Authenticate Your Server!\nBefore going to production, it's always advised to enable authentication on your MCP server trigger."
      }
    },
    {
      "id": "27163110-36d7-46f3-92fc-dce7d000655e",
      "name": "Paycaptain MCP Server",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        80,
        40
      ]
    },
    {
      "id": "13a69580-de33-489a-85c8-582877efbfe0",
      "name": "Update Employee",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        380,
        260
      ]
    },
    {
      "id": "68c066f0-657c-46cb-a9fe-b31e9850c512",
      "name": "Get Employee",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        240,
        360
      ]
    },
    {
      "id": "87661e95-b618-4701-b0f3-9f0532d5fc75",
      "name": "Get Employees",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1380,
        60
      ]
    },
    {
      "id": "866868e2-e0b0-4d8d-bf3c-57d68fea8b86",
      "name": "Search Employees",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        100,
        260
      ]
    },
    {
      "id": "679a2413-448f-43d8-98fc-7fd8b83775e7",
      "name": "Log Call",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        860,
        260
      ]
    },
    {
      "id": "7723947c-94a3-4bf1-b6c8-b595027a33dc",
      "name": "Filter Matches",
      "type": "n8n-nodes-base.filter",
      "position": [
        1580,
        60
      ]
    },
    {
      "id": "f4d1ddd9-dde7-437f-9aa2-969ea0832f71",
      "name": "Aggregate Search Results",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2020,
        60
      ]
    },
    {
      "id": "45076cec-f554-44ae-b314-e43ba080abb5",
      "name": "Get Employees1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1380,
        260
      ]
    },
    {
      "id": "b6f3a56f-5cd2-4f4d-904b-49e82ec591b8",
      "name": "Filter Matching ID",
      "type": "n8n-nodes-base.filter",
      "position": [
        1580,
        260
      ]
    },
    {
      "id": "ecc2d8d5-4a23-4bfd-840b-63c28980462f",
      "name": "Strip Sensitive Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        1800,
        260
      ]
    },
    {
      "id": "77a71a55-f0cf-4f76-b697-b31dba447f30",
      "name": "Strip Sensitive Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1800,
        60
      ]
    },
    {
      "id": "86f73b12-afc8-4694-a79d-45c908cc88dd",
      "name": "Update Employee1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1800,
        460
      ]
    },
    {
      "id": "122fe6f7-3bcd-4f29-a95c-c727a799e1fd",
      "name": "Valid Fields Only",
      "type": "n8n-nodes-base.set",
      "position": [
        1380,
        460
      ]
    },
    {
      "id": "13e5f143-1abf-444c-b86c-ae51fe839894",
      "name": "Has Valid Request?",
      "type": "n8n-nodes-base.if",
      "position": [
        1580,
        460
      ]
    },
    {
      "id": "b98f1d73-a994-4040-b421-75e626ec4ce6",
      "name": "Get Error Response",
      "type": "n8n-nodes-base.set",
      "position": [
        1800,
        640
      ]
    },
    {
      "id": "cb140f3f-571c-49a4-a24d-dcee11c5b7e1",
      "name": "Get Success Response",
      "type": "n8n-nodes-base.set",
      "position": [
        2020,
        460
      ]
    },
    {
      "id": "39cd1188-5f2e-45ce-8bbc-0586812491ec",
      "name": "Aggregate Get Response",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2020,
        260
      ]
    },
    {
      "id": "d9c1ed21-29e4-41a6-9855-36f1568f7944",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        -360
      ],
      "parameters": {
        "width": 400,
        "height": 220,
        "content": "![](https://cdn.prod.website-files.com/6628137b611845ebff95551f/6628137b611845ebff9556e7_paycaptain-logo.svg#full-width)\n**Website**: https://paycaptain.com\n**DeveloperHub**: https://developer.paycapt"
      }
    },
    {
      "id": "efc7ab35-202d-4a1f-98ce-7ae310c22250",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -640
      ],
      "parameters": {
        "width": 440,
        "height": 1180,
        "content": "## Try It Out!\n### This n8n demonstrates how any organisation can quickly and easily build and offer MCP servers to their customers or internal staff to improve productivity.\n\nThis MCP example uses Pa"
      }
    }
  ],
  "connections": {
    "Log Call": {
      "main": [
        [
          {
            "node": "Operation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Operation": {
      "main": [
        [
          {
            "node": "Get Employees",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Employees1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Valid Fields Only",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Employee": {
      "ai_tool": [
        [
          {
            "node": "Paycaptain MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Employees": {
      "main": [
        [
          {
            "node": "Filter Matches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Matches": {
      "main": [
        [
          {
            "node": "Strip Sensitive Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Employees1": {
      "main": [
        [
          {
            "node": "Filter Matching ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Employee": {
      "ai_tool": [
        [
          {
            "node": "Paycaptain MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Search Employees": {
      "ai_tool": [
        [
          {
            "node": "Paycaptain MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Update Employee1": {
      "main": [
        [
          {
            "node": "Get Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Valid Fields Only": {
      "main": [
        [
          {
            "node": "Has Valid Request?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Matching ID": {
      "main": [
        [
          {
            "node": "Strip Sensitive Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Valid Request?": {
      "main": [
        [
          {
            "node": "Update Employee1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Error Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Strip Sensitive Fields": {
      "main": [
        [
          {
            "node": "Aggregate Search Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Strip Sensitive Fields1": {
      "main": [
        [
          {
            "node": "Aggregate Get Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Log Call",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}