{
  "name": "Build an MCP server with Google Calendar and custom functions",
  "nodes": [
    {
      "id": "6a36842b-b214-4683-9129-ad44f4b79117",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        440,
        -180
      ]
    },
    {
      "id": "f7c9aaa7-9ba7-4bbe-909b-3085ed60a387",
      "name": "SearchEvent",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        2060,
        180
      ]
    },
    {
      "id": "47f6077d-de8a-46f7-8d3a-3a21596dea1f",
      "name": "CreateEvent",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        2180,
        180
      ]
    },
    {
      "id": "7e3573c8-d4b5-4bd2-9aac-3bcfca1c8eb4",
      "name": "UpdateEvent",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        2300,
        180
      ]
    },
    {
      "id": "fae46aa7-02c9-40d3-8f59-b46533e6a93c",
      "name": "DeleteEvent",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        2420,
        180
      ]
    },
    {
      "id": "da58e521-7e80-4d28-84fd-17732728855e",
      "name": "Google Calendar MCP",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        2060,
        -20
      ]
    },
    {
      "id": "9a8490a0-eacf-4b7a-b6fd-e8d17a5cf25a",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        1440,
        880
      ]
    },
    {
      "id": "c2430651-b604-4aff-bdc8-c51a7de9fcc1",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        1660,
        860
      ]
    },
    {
      "id": "77df0d2c-ed4d-4da9-a218-acf4fd06cf13",
      "name": "Convert Text to Upper Case",
      "type": "n8n-nodes-base.set",
      "position": [
        2000,
        520
      ]
    },
    {
      "id": "15e7489b-b1eb-4be1-80b0-0cb94d05daa3",
      "name": "Convert Text to Lower Case",
      "type": "n8n-nodes-base.set",
      "position": [
        2000,
        720
      ]
    },
    {
      "id": "75bc9895-ccad-48b6-bd99-965a62f36f2a",
      "name": "Convert Text",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        1440,
        180
      ]
    },
    {
      "id": "b2b8419d-f068-41ad-bcda-a057ddc82924",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        240,
        -180
      ]
    },
    {
      "id": "3f4bee1a-18c8-45be-8038-b192f771e4d4",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        540,
        40
      ]
    },
    {
      "id": "165cd445-13e6-4215-966a-0cd1cc4cb795",
      "name": "Calendar MCP",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        1080,
        60
      ]
    },
    {
      "id": "3e2e655a-0d95-489e-9e4e-79415db90bbe",
      "name": "My Functions",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        920,
        60
      ]
    },
    {
      "id": "8fbf3a7b-171e-42f1-96f0-b4862a800721",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1320,
        -180
      ],
      "parameters": {
        "width": 620,
        "height": 520,
        "content": "## Activate the workflow to make the MCP Trigger work\nIn order to make the MCP server available, you need to activate the workflow.\n\nThen copy the Production URL of the MCP Trigger and paste it in the"
      }
    },
    {
      "id": "783b47d1-8b6d-4d45-903f-812dc46d80de",
      "name": "My Functions Server",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        1440,
        -20
      ]
    },
    {
      "id": "31432882-2953-440c-9144-ba129ab2a8f7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        -180
      ],
      "parameters": {
        "width": 440,
        "height": 520,
        "content": "## MCP Clients\nFor every tool here you need to obtain he corresponding Production URL from the MCP Triggers on the right 👉"
      }
    },
    {
      "id": "65269a4d-d6db-4767-b8bc-0992bfe42d17",
      "name": "Random user data",
      "type": "n8n-nodes-base.debugHelper",
      "position": [
        2000,
        1020
      ]
    },
    {
      "id": "2c97af29-d923-49a4-91e2-b6ff5d0fe322",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -180
      ],
      "parameters": {
        "width": 660,
        "height": 640,
        "content": "# Try these example requests with the AI Agent\n\n### My Functions MCP\n1. Use your tools to convert this text to lower case: `EXAMPLE TeXt`\n\n2. Use your tools to convert this text to upper case: `exampl"
      }
    },
    {
      "id": "77f8d96d-11da-4323-9925-58267da607c3",
      "name": "Generate random user data",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        1600,
        180
      ]
    },
    {
      "id": "89d36f19-c7b4-4f53-9aec-2977bbd74de8",
      "name": "Return only some fields",
      "type": "n8n-nodes-base.set",
      "position": [
        2220,
        1020
      ]
    },
    {
      "id": "a8cf7d60-b3d8-41cd-84d8-5cc1c299f33f",
      "name": "Joke Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2000,
        1220
      ]
    },
    {
      "id": "76847e5d-2cc1-46f6-b0a6-0be81a5d0fea",
      "name": "Random Jokes",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        1760,
        180
      ]
    },
    {
      "id": "2a34f767-7bf0-4c7c-8882-6dde62670383",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1320,
        360
      ],
      "parameters": {
        "width": 1260,
        "height": 1060,
        "content": "## The My Functions MCP calls this sub-workflow every time.\nA subworkflow is a separate workflow that can be called by other workflows and is able to receive parameters.\nLearn more about sub-workflows"
      }
    },
    {
      "id": "eda3b2a5-845a-413f-b866-759fe5e1a0b9",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1960,
        -180
      ],
      "parameters": {
        "width": 620,
        "height": 520,
        "content": "## Google Calendar tools require credentials\nIf you don't have your Google Credentials set up in n8n yet, watch [this](https://www.youtube.com/watch?v=3Ai1EPznlAc) video to learn how to do it.\n\nIf you"
      }
    },
    {
      "id": "4b100035-d803-46aa-8540-08e69d7f2179",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        1160
      ],
      "parameters": {
        "width": 660,
        "height": 180,
        "content": "# Need help?\nFor getting help with this workflow, please create a topic on the community forums here:\nhttps://community.n8n.io/c/questions/"
      }
    },
    {
      "id": "74ad0058-87b6-4a91-88a5-a0cb72bce84d",
      "name": "OpenAI 4o",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        400,
        40
      ]
    },
    {
      "id": "c7f95bf5-23ed-4296-a2e0-dfb9fdebde94",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        160
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "## Why model 4o? 👆\nAfter testing 4o-mini it had some difficulties handling the calendar requests, while the 4o model handled it with ease.\n\nDepending on your prompt and tools, 4o-mini might be able to"
      }
    },
    {
      "id": "f5c974cc-4277-4ab4-ada6-cad1d16dda80",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -340
      ],
      "parameters": {
        "width": 3060,
        "height": 140,
        "content": ""
      }
    },
    {
      "id": "a304ab81-9ef6-485d-b35a-76d2cc3d5c91",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        -300
      ],
      "parameters": {
        "width": 800,
        "height": 80,
        "content": "# Learn How to Build an MCP Server and Client"
      }
    },
    {
      "id": "148904d6-f94b-4ec0-a026-2e5fb921c07f",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        480
      ],
      "parameters": {
        "width": 660,
        "height": 660,
        "content": "# Author\n![Solomon](https://gravatar.com/avatar/79aa147f090807fe0f618fb47a1de932669e385bb0c84bf3a7f891ae7d174256?r=pg&d=retro&size=200)\n### Solomon\nFreelance consultant from Brazil, specializing in au"
      }
    },
    {
      "id": "36aeb3a3-bcc3-4d50-84f9-87065f908248",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -460,
        1020
      ],
      "parameters": {
        "width": 620,
        "height": 80,
        "content": "### 💡 **Want to learn advanced n8n skills and earn money building workflows?**\n‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎Check out [Scrapes Academy](https://www.skool.com/scrapes/about?ref=21f10ad99f4d46ba9b8aaea8c9f58c34)"
      }
    }
  ],
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Convert Text to Upper Case",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Convert Text to Lower Case",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Random user data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Joke Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI 4o": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "CreateEvent": {
      "ai_tool": [
        [
          {
            "node": "Google Calendar MCP",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "DeleteEvent": {
      "ai_tool": [
        [
          {
            "node": "Google Calendar MCP",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "SearchEvent": {
      "ai_tool": [
        [
          {
            "node": "Google Calendar MCP",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "UpdateEvent": {
      "ai_tool": [
        [
          {
            "node": "Google Calendar MCP",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Calendar MCP": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Convert Text": {
      "ai_tool": [
        [
          {
            "node": "My Functions Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "My Functions": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Random Jokes": {
      "ai_tool": [
        [
          {
            "node": "My Functions Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Random user data": {
      "main": [
        [
          {
            "node": "Return only some fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate random user data": {
      "ai_tool": [
        [
          {
            "node": "My Functions Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}