{
  "name": "Build your own SQLite MCP server",
  "nodes": [
    {
      "id": "fcbf7023-7e12-49d8-9c7d-4cb431c79905",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        460,
        260
      ]
    },
    {
      "id": "58c93321-ded9-48c1-812f-c35d160e257b",
      "name": "Operation",
      "type": "n8n-nodes-base.switch",
      "position": [
        640,
        260
      ]
    },
    {
      "id": "865ae43a-14ec-4aac-9396-d0aef1ab4a75",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -340,
        -100
      ],
      "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": "35551851-319a-47cf-87cd-a63b128300cc",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        -100
      ],
      "parameters": {
        "width": 820,
        "height": 720,
        "content": "## 2. Keep Secure by Preventing Raw SQL Statements\n[Read more about the Code Node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/)\n\nWhilst it may be easier to just let the Ag"
      }
    },
    {
      "id": "95c35568-e447-4634-afe8-c902ba5c7d2f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -340,
        -220
      ],
      "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": "2d0f98f8-043a-459c-8b77-634e06ee0f57",
      "name": "SQLite MCP Server",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        -160,
        60
      ]
    },
    {
      "id": "6f313137-eb8f-429b-a6c9-7b17e067dc5e",
      "name": "CreateRecord",
      "type": "n8n-nodes-base.code",
      "position": [
        940,
        260
      ]
    },
    {
      "id": "b2530656-bbf4-4316-8b8e-c5d27865e45f",
      "name": "UpdateRecord",
      "type": "n8n-nodes-base.code",
      "position": [
        940,
        440
      ]
    },
    {
      "id": "8c1b8bcb-20f1-4ef9-b646-9d89177651dd",
      "name": "ReadRecords",
      "type": "n8n-nodes-base.code",
      "position": [
        940,
        80
      ]
    },
    {
      "id": "87df3eed-b4d5-4a9c-bd82-0ad455449cd2",
      "name": "DescribeTables",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        -160,
        340
      ]
    },
    {
      "id": "4a0ba0d0-4955-44fd-92de-ad031ebb64cb",
      "name": "ListTables",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        -260,
        240
      ]
    },
    {
      "id": "69e8e720-7e91-4b46-8db5-1afdf1f3dbe0",
      "name": "CreateRecords",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -40,
        440
      ]
    },
    {
      "id": "f2e18ae5-89a0-4d61-805b-e777f11300a2",
      "name": "UpdateRows",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        100,
        360
      ]
    },
    {
      "id": "22645721-1b66-4a36-9be5-f1e5edde30f8",
      "name": "ReadRows",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        180,
        240
      ]
    },
    {
      "id": "2176742a-5a28-41c6-9cd7-ac3229ddcdb6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        -800
      ],
      "parameters": {
        "width": 440,
        "height": 1360,
        "content": "## Try It Out!\n**NOTE: This template is for Self-Hosted N8N Instances only.**\n\n### This n8n demonstrates how to build a simple SQLite MCP server to perform local database operations as well as use it "
      }
    },
    {
      "id": "5a9a4763-2952-4d95-8f35-25238affa049",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -340,
        -340
      ],
      "parameters": {
        "width": 380,
        "height": 100,
        "content": "### SELF-HOSTED ONLY\nThis template only works for self-hosted n8n instances as it reads the database file on disk."
      }
    }
  ],
  "connections": {
    "ReadRows": {
      "ai_tool": [
        [
          {
            "node": "SQLite MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Operation": {
      "main": [
        [
          {
            "node": "ReadRecords",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "CreateRecord",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "UpdateRecord",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ListTables": {
      "ai_tool": [
        [
          {
            "node": "SQLite MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "UpdateRows": {
      "ai_tool": [
        [
          {
            "node": "SQLite MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "CreateRecords": {
      "ai_tool": [
        [
          {
            "node": "SQLite MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "DescribeTables": {
      "ai_tool": [
        [
          {
            "node": "SQLite MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Operation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}