{
  "name": "Route MCP tool calls through an intelligent gateway with Claude AI",
  "nodes": [
    {
      "id": "66160ed2-5cc3-44e7-b83e-6943a11b8691",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -32
      ],
      "parameters": {
        "width": 780,
        "height": 1356,
        "content": "This workflow transforms traditional REST APIs into structured, AI-accessible MCP (Model Context Protocol) tools. It provides a unified gateway that allows Claude AI to safely, granularly, and auditib"
      }
    },
    {
      "id": "cb6e4263-948a-4e42-8569-eea0a9f85916",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        400
      ],
      "parameters": {
        "width": 440,
        "height": 328,
        "content": "## 1. MCP Request Ingestion & Auth"
      }
    },
    {
      "id": "d0196017-b94f-40dd-81ec-326e2987e77a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        256
      ],
      "parameters": {
        "width": 780,
        "height": 684,
        "content": "## 2. Tool Registry + AI Intent Verification"
      }
    },
    {
      "id": "51fbd939-bbe4-4e39-916e-7ffb8f83678a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1936,
        240
      ],
      "parameters": {
        "width": 832,
        "height": 684,
        "content": "## 3. Rate Limit + Backend API Execution"
      }
    },
    {
      "id": "69b3df5c-bcf0-4bab-a6ca-caa805edd3ce",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2816,
        240
      ],
      "parameters": {
        "width": 1384,
        "height": 780,
        "content": "## 4. Response Normalization, Audit & MCP Return"
      }
    },
    {
      "id": "61030f05-d04c-43e8-83b7-069e51dc9f3a",
      "name": "Receive MCP Tool Request",
      "type": "n8n-nodes-base.webhook",
      "position": [
        720,
        560
      ]
    },
    {
      "id": "efa382e2-9e0c-4b98-81b3-68be7bc6b6b5",
      "name": "Validate Auth and MCP Schema",
      "type": "n8n-nodes-base.code",
      "position": [
        944,
        560
      ]
    },
    {
      "id": "78ab6519-9d00-4e6d-8f11-bcde34bbaafa",
      "name": "Lookup Tool in Registry",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1168,
        560
      ]
    },
    {
      "id": "3c4849da-39ce-4110-96b9-ec60be62dd55",
      "name": "Resolve Tool Config and Permissions",
      "type": "n8n-nodes-base.code",
      "position": [
        1392,
        560
      ]
    },
    {
      "id": "6456d589-0b35-4f77-a4bc-1855cb2decb8",
      "name": "Claude AI Intent and Safety Verification",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1616,
        560
      ]
    },
    {
      "id": "41a9e845-6021-42e3-af0d-80d2b3ae3b94",
      "name": "Claude AI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        1696,
        784
      ]
    },
    {
      "id": "5ae8c9a3-89f4-47a8-a7fc-e64a0227ceb7",
      "name": "Parse Intent Verification Result",
      "type": "n8n-nodes-base.code",
      "position": [
        1968,
        560
      ]
    },
    {
      "id": "b4066068-8642-4cfc-863f-49754a775cd9",
      "name": "Check Rate Limit and Quota",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2192,
        560
      ]
    },
    {
      "id": "f0ef3cd9-40d6-4e64-9880-ac242d68ef84",
      "name": "Enforce Rate Limit and Build Execution Context",
      "type": "n8n-nodes-base.code",
      "position": [
        2624,
        560
      ]
    },
    {
      "id": "00079328-2b7d-40f4-b383-551358cb28c8",
      "name": "Dry Run or Live Execution?",
      "type": "n8n-nodes-base.if",
      "position": [
        2848,
        560
      ]
    },
    {
      "id": "f371f3e8-2cc8-45c5-8eea-6ce360c4f9ba",
      "name": "Execute Backend API Call",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3072,
        464
      ]
    },
    {
      "id": "d3e19d50-2071-4d18-8f75-d8c3def67813",
      "name": "Build Dry Run Response",
      "type": "n8n-nodes-base.code",
      "position": [
        3072,
        656
      ]
    },
    {
      "id": "84a22c06-1b28-45a4-96e8-f11c8e332b78",
      "name": "Normalize Backend Response to MCP Schema",
      "type": "n8n-nodes-base.code",
      "position": [
        3296,
        560
      ]
    },
    {
      "id": "0659ca57-5d0c-4011-a18f-95829a839097",
      "name": "Send Security Alert on High Risk Calls",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        3520,
        368
      ]
    },
    {
      "id": "fc88cc64-10af-4958-a5b5-dfc656a4b2ef",
      "name": "Write Immutable Audit Log",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3520,
        560
      ]
    },
    {
      "id": "adb58eb8-ed7f-481e-b8dc-fd1442b14d79",
      "name": "Update Rate Limit Usage Log",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3520,
        752
      ]
    },
    {
      "id": "6427a4e0-e510-4387-8227-1d8ee472e6b7",
      "name": "Build Final MCP Tool Result",
      "type": "n8n-nodes-base.code",
      "position": [
        3744,
        560
      ]
    },
    {
      "id": "cccf20b2-69ec-482e-a9cd-eaeb30115bf5",
      "name": "Return MCP Tool Result to Caller",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3968,
        560
      ]
    },
    {
      "id": "62dd318d-4344-480e-b5d9-8f3a7237e993",
      "name": "Wait For Result",
      "type": "n8n-nodes-base.wait",
      "position": [
        2400,
        560
      ]
    }
  ],
  "connections": {
    "Claude AI Model": {
      "ai_languageModel": [
        [
          {
            "node": "Claude AI Intent and Safety Verification",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Wait For Result": {
      "main": [
        [
          {
            "node": "Enforce Rate Limit and Build Execution Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Dry Run Response": {
      "main": [
        [
          {
            "node": "Normalize Backend Response to MCP Schema",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lookup Tool in Registry": {
      "main": [
        [
          {
            "node": "Resolve Tool Config and Permissions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Backend API Call": {
      "main": [
        [
          {
            "node": "Normalize Backend Response to MCP Schema",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive MCP Tool Request": {
      "main": [
        [
          {
            "node": "Validate Auth and MCP Schema",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Immutable Audit Log": {
      "main": [
        [
          {
            "node": "Build Final MCP Tool Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Rate Limit and Quota": {
      "main": [
        [
          {
            "node": "Wait For Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dry Run or Live Execution?": {
      "main": [
        [
          {
            "node": "Execute Backend API Call",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Build Dry Run Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Final MCP Tool Result": {
      "main": [
        [
          {
            "node": "Return MCP Tool Result to Caller",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Rate Limit Usage Log": {
      "main": [
        [
          {
            "node": "Build Final MCP Tool Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Auth and MCP Schema": {
      "main": [
        [
          {
            "node": "Lookup Tool in Registry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Intent Verification Result": {
      "main": [
        [
          {
            "node": "Check Rate Limit and Quota",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Resolve Tool Config and Permissions": {
      "main": [
        [
          {
            "node": "Claude AI Intent and Safety Verification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Security Alert on High Risk Calls": {
      "main": [
        [
          {
            "node": "Build Final MCP Tool Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude AI Intent and Safety Verification": {
      "main": [
        [
          {
            "node": "Parse Intent Verification Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Backend Response to MCP Schema": {
      "main": [
        [
          {
            "node": "Send Security Alert on High Risk Calls",
            "type": "main",
            "index": 0
          },
          {
            "node": "Write Immutable Audit Log",
            "type": "main",
            "index": 0
          },
          {
            "node": "Update Rate Limit Usage Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enforce Rate Limit and Build Execution Context": {
      "main": [
        [
          {
            "node": "Dry Run or Live Execution?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}