{
  "name": "Build your own FileSystem MCP server",
  "nodes": [
    {
      "id": "24be8907-684e-4b57-9642-6f4a45ca7af3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        -280
      ],
      "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": "d5845d0a-648f-4bc1-b087-bc0d17506ed3",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        -400
      ],
      "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": "fe9f1c8e-8334-4732-be3a-5ee49036e11e",
      "name": "FileSystem MCP Server",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        -180,
        -140
      ]
    },
    {
      "id": "fb49782f-d8de-480b-a470-e37adb2e3036",
      "name": "ListDirectory",
      "type": "n8n-nodes-base.executeCommandTool",
      "position": [
        -300,
        60
      ]
    },
    {
      "id": "8fa93054-bcf5-4fbc-9825-df16be063eb2",
      "name": "CreateDirectory",
      "type": "n8n-nodes-base.executeCommandTool",
      "position": [
        -200,
        160
      ]
    },
    {
      "id": "aafe884d-0e6e-476a-92fe-b2111f624417",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        400,
        40
      ]
    },
    {
      "id": "d85925b6-d58d-43b5-a6ca-3e43cbc81121",
      "name": "Operation",
      "type": "n8n-nodes-base.switch",
      "position": [
        580,
        40
      ]
    },
    {
      "id": "e9ec2928-5e33-4213-a53a-92b7d840d49e",
      "name": "readOneOrMultipleFiles",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        840,
        140
      ]
    },
    {
      "id": "77ba2a48-b4b9-4a23-818d-e028a7762514",
      "name": "ReadFiles",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        40,
        160
      ]
    },
    {
      "id": "2ddf9a9a-cade-41c0-a068-482345452d4b",
      "name": "WriteFiles",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        140,
        60
      ]
    },
    {
      "id": "a5d9e11b-0583-4c67-b30b-be1d4185b891",
      "name": "writeOneOrMultipleFiles",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        840,
        -60
      ]
    },
    {
      "id": "de2f715c-b6d1-4702-9d39-2527108b5706",
      "name": "SearchDirectory",
      "type": "n8n-nodes-base.executeCommandTool",
      "position": [
        -80,
        240
      ]
    },
    {
      "id": "a4918bb1-8882-45c8-a05c-a3e22912cc0f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        -280
      ],
      "parameters": {
        "width": 740,
        "height": 660,
        "content": "## 2. Use Custom Workflow Tool for More Complex Commands\n[Learn more about the Execute Command tool](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executecommand/)\n\n"
      }
    },
    {
      "id": "ebf6c15b-e4e0-4db0-bb4e-36e204fb6a47",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -740
      ],
      "parameters": {
        "width": 460,
        "height": 1120,
        "content": "## Try It Out!\n### This n8n demonstrates how to build a simple FileSystem MCP server. Connecting to this server allows MCP clients and agents to list, read and create directories and files on the loca"
      }
    }
  ],
  "connections": {
    "Operation": {
      "main": [
        [
          {
            "node": "writeOneOrMultipleFiles",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "readOneOrMultipleFiles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ReadFiles": {
      "ai_tool": [
        [
          {
            "node": "FileSystem MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "WriteFiles": {
      "ai_tool": [
        [
          {
            "node": "FileSystem MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "ListDirectory": {
      "ai_tool": [
        [
          {
            "node": "FileSystem MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "CreateDirectory": {
      "ai_tool": [
        [
          {
            "node": "FileSystem MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "SearchDirectory": {
      "ai_tool": [
        [
          {
            "node": "FileSystem MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Operation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}