{
  "name": "15 Your books as an MCP server",
  "nodes": [
    {
      "id": "ecbdd775-14ba-4653-8b27-d8acc4f4f684",
      "name": "MCP server",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "typeVersion": 2.1,
      "position": [
        0,
        300
      ],
      "parameters": {
        "authentication": "bearerAuth",
        "path": "books",
        "instructions": "Use business_overview for questions about invoices and quotes. Only use add_lead when the user explicitly asks for it."
      },
      "notes": "Only reachable with the secret token",
      "notesInFlow": true,
      "webhookId": "1071a46a-cdf1-51ac-b2d4-69d64374b36e"
    },
    {
      "id": "5164fd73-f863-4f60-bb2f-3a549bf7939f",
      "name": "business_overview",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "typeVersion": 2.2,
      "position": [
        0,
        520
      ],
      "parameters": {
        "description": "Returns open invoices with days overdue, pending quotes, totals and what is open per client. Everything is already calculated.",
        "source": "database",
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultName": "12 Business overview (helper for the agent)"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": []
        }
      }
    },
    {
      "id": "91c38a45-cfa4-4f57-be23-f3a080f38584",
      "name": "add_lead",
      "type": "n8n-nodes-base.dataTableTool",
      "typeVersion": 1,
      "position": [
        240,
        520
      ],
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Adds a new lead to the lead list. Pass name, email, company and question.",
        "resource": "row",
        "operation": "insert",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultName": "leads"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "name": "={{ $fromAI('name', 'name of the lead', 'string') }}",
            "email": "={{ $fromAI('email', 'email address', 'string') }}",
            "company": "={{ $fromAI('company', 'company name, may be empty', 'string') }}",
            "question": "={{ $fromAI('question', 'what the lead wants help with', 'string') }}",
            "source": "mcp"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "displayName": "email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "company",
              "displayName": "company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "question",
              "displayName": "question",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "source",
              "displayName": "source",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "d8924f76-e36c-4793-9f41-1de606bd99a8",
      "name": "Read me",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -40,
        -160
      ],
      "parameters": {
        "content": "## Your books as an MCP server\nTested on November 11, 2026, with n8n 2.47.3 and MCP Inspector: both tools listed and called, wrong token rejected (403).\n\n**Fill in:** a Bearer credential with a long secret token, template 12 in 'business_overview', and the *leads* table.\n\nMCP URL after publishing: https://<your-n8n>/mcp/books",
        "height": 220,
        "width": 520,
        "color": 7
      }
    }
  ],
  "connections": {
    "business_overview": {
      "ai_tool": [
        [
          {
            "node": "MCP server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "add_lead": {
      "ai_tool": [
        [
          {
            "node": "MCP server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  }
}