{
 "name": "[노드 한 장] MCP Client Tool · 자기 수학 서버 한 번 호출",
 "nodes": [
  {
   "id": "manual",
   "name": "Run manually",
   "type": "n8n-nodes-base.manualTrigger",
   "typeVersion": 1,
   "position": [
    0,
    0
   ],
   "parameters": {}
  },
  {
   "id": "agent",
   "name": "AI Agent",
   "type": "@n8n/n8n-nodes-langchain.agent",
   "typeVersion": 3.1,
   "position": [
    260,
    0
   ],
   "parameters": {
    "promptType": "define",
    "text": "직접 작성한 가상 샘플입니다. MCP Client Tool로 제공된 calculate_discount_total 도구를 정확히 한 번 호출하세요. query는 {\"unitPrice\":50000,\"quantity\":3,\"discountPercent\":10} JSON 문자열입니다. 도구의 반환값을 확인한 뒤 최종 답은 합계 숫자와 원만 출력하세요. 배송비·추가 세금은 없다고 가정합니다. 혼자 계산한 값을 도구 반환값 대신 쓰지 마세요.",
    "options": {
     "systemMessage": "자기 무해 수학 MCP 서버의 calculate_discount_total만 호출하는 실습 Agent입니다. 실제 도구 결과만 최종 답으로 사용하고 내부 사고 과정은 출력하지 마세요.",
     "maxIterations": 3,
     "returnIntermediateSteps": false,
     "enableStreaming": false,
     "forceToolCallOnFirstIteration": true
    }
   }
  },
  {
   "id": "model",
   "name": "OpenAI Chat Model",
   "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
   "typeVersion": 1.2,
   "position": [
    160,
    240
   ],
   "parameters": {
    "model": {
     "__rl": true,
     "mode": "list",
     "value": "gpt-4.1-mini",
     "cachedResultName": "gpt-4.1-mini"
    },
    "options": {
     "temperature": 0,
     "maxTokens": 200,
     "maxRetries": 0
    }
   }
  },
  {
   "id": "mcp",
   "name": "MCP Client Tool",
   "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
   "typeVersion": 1.4,
   "position": [
    440,
    240
   ],
   "parameters": {
    "endpointUrl": "YOUR_MCP_TEST_URL",
    "serverTransport": "httpStreamable",
    "authentication": "none",
    "include": "selected",
    "includeTools": [
     "calculate_discount_total"
    ],
    "options": {
     "timeout": 20000
    }
   }
  }
 ],
 "connections": {
  "Run manually": {
   "main": [
    [
     {
      "node": "AI Agent",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "OpenAI Chat Model": {
   "ai_languageModel": [
    [
     {
      "node": "AI Agent",
      "type": "ai_languageModel",
      "index": 0
     }
    ]
   ]
  },
  "MCP Client Tool": {
   "ai_tool": [
    [
     {
      "node": "AI Agent",
      "type": "ai_tool",
      "index": 0
     }
    ]
   ]
  }
 },
 "settings": {
  "executionOrder": "v1",
  "timezone": "Asia/Seoul"
 },
 "meta": {
  "templateCredsSetupCompleted": false,
  "source": "datapopcorn.ai/workflow/nodes"
 }
}