{
  "name": "MCP server with AI agent as a tool context reducer",
  "nodes": [
    {
      "id": "0535b49f-14da-4127-a723-2647d8f8eb9e",
      "name": "MCP Server Trigger",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        -1840,
        280
      ]
    },
    {
      "id": "0c5003ed-20e2-4952-b20a-f01496037a13",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -3180,
        640
      ]
    },
    {
      "id": "85c1c401-ac3e-46c2-9fa0-a20e8ad3d578",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -2120,
        640
      ]
    },
    {
      "id": "2fa49b82-2c86-4076-974c-1ed57be5bdc5",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -2480,
        660
      ]
    },
    {
      "id": "a7be6db4-25b5-490c-8d1e-91473edf76c7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2360,
        80
      ],
      "parameters": {
        "width": 460,
        "height": 500,
        "content": "## GitHub AI Agent (Tools Agent)\n🤖 Specialized GitHub Agent\n- Direct connection to GitHub MCP Server\n- Processes natural language GitHub requests\n- Reduces LLM context overhead\n- Handles all GitHub AP"
      }
    },
    {
      "id": "7cdfaa60-61bd-43d1-9aff-f27f2012e9b9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1880,
        80
      ],
      "parameters": {
        "width": 340,
        "height": 500,
        "content": "## 🖥️  MCP Server Trigger\n🔧 MCP Server Trigger\n- Receives GitHub operation requests\n- Single parameter: \"request\" (natural language)\n- Triggers specialized GitHub agent workflow"
      }
    },
    {
      "id": "94b86861-9993-4de0-a56a-a3d4dd829d9b",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2980,
        80
      ],
      "parameters": {
        "width": 600,
        "height": 500,
        "content": "# 🖥️ MCP Server Github Agent Tool\n\n📋 Architecture Overview\n\nThis workflow implements the MCP Agent pattern:\n\n1. Single entry point (MCP Trigger)\n\n2. Specialized agent (GitHub focus)\n\n3. Context delega"
      }
    },
    {
      "id": "4f6833d0-85c7-4035-8a8a-c627b1181d76",
      "name": "Github Agent",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -1780,
        440
      ]
    },
    {
      "id": "0d381148-29a4-4f0d-abe4-b32a409414d5",
      "name": "Github API",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        -1760,
        640
      ]
    },
    {
      "id": "382e14d0-747f-4901-9224-cb7c8fe60958",
      "name": "Github AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -2260,
        340
      ]
    },
    {
      "id": "47f6acc4-d405-4203-a157-f050f249b37a",
      "name": "Set Github Username",
      "type": "n8n-nodes-base.set",
      "position": [
        -2860,
        640
      ]
    },
    {
      "id": "291e3f21-ab26-4a3e-be10-bfb0add9cf76",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2980,
        600
      ],
      "parameters": {
        "width": 340,
        "height": 380,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Set GitHub Username Node\n⚙️ Configuration Required\n- Replace \"your-github-username\" with actual username\n- Used for GitHub API authentication context\n- Essential for proper API calls"
      }
    },
    {
      "id": "117bbca5-4a6b-4c11-96bb-98efb561ac1d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2620,
        600
      ],
      "parameters": {
        "width": 360,
        "height": 380,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n## OpenAI Chat Model Node\n🧠 AI Processing Engine\n- Requires OpenAI API key configuration  \n- Powers intelligent GitHub operation understanding\n- Optimized for GitHub-specific tasks"
      }
    },
    {
      "id": "c6b138ca-a993-4251-ab28-29ba37b93b67",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2240,
        600
      ],
      "parameters": {
        "width": 340,
        "height": 380,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Simple Memory Node\n💾 Conversation Context\n- Maintains operation history\n- Enables multi-step GitHub workflows\n- Reduces repetitive context processing"
      }
    },
    {
      "id": "d322205a-413c-4c85-a0de-07c996d77733",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1880,
        600
      ],
      "parameters": {
        "width": 340,
        "height": 380,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n## MCP Client Node\n💾 Github Tools\n- Handles calls to the Github API\n- Manages repos and issues\n- One node connected to an MCP server"
      }
    }
  ],
  "connections": {
    "Github API": {
      "ai_tool": [
        [
          {
            "node": "Github AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Github Agent": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Github AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Github AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Set Github Username": {
      "main": [
        [
          {
            "node": "Github AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Set Github Username",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}