AutomationFlowsAI & RAG › AI Agent with Mcp Client (call Any Mcp Server)

AI Agent with Mcp Client (call Any Mcp Server)

AI Agent with MCP Client (call any MCP server). Uses chatTrigger, agent, lmChatOpenRouter, mcpClientTool. Chat trigger; 6 nodes.

Chat trigger trigger★★☆☆☆ complexityAI-powered6 nodesChat TriggerAgentOpenRouter ChatMcp Client Tool
AI & RAG Trigger: Chat trigger Nodes: 6 Complexity: ★★☆☆☆ AI nodes: yes Added:

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "AI Agent with MCP Client (call any MCP server)",
  "nodes": [
    {
      "id": "5cbf56d6-a2b9-4777-b449-e78de71575e9",
      "name": "When Chat Message Received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.4,
      "position": [
        0,
        112
      ],
      "parameters": {
        "public": false,
        "options": {}
      }
    },
    {
      "id": "fb43da23-5e81-4a05-9d18-8896fd386a90",
      "name": "MCP Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        224,
        112
      ],
      "parameters": {
        "promptType": "auto",
        "options": {
          "systemMessage": "You are an assistant that can call tools exposed by a connected MCP server. Use the available MCP tools to answer the user request, then reply clearly."
        }
      }
    },
    {
      "id": "bc4bb628-438b-4269-af23-f12d4cf44480",
      "name": "LLM via OpenRouter",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        240,
        336
      ],
      "parameters": {
        "model": "anthropic/claude-sonnet-4"
      }
    },
    {
      "id": "09d2f1e7-d35d-4ab4-9c11-3b66ece7c816",
      "name": "MCP Server Tools",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1.2,
      "position": [
        368,
        336
      ],
      "parameters": {
        "endpointUrl": "https://your-mcp-server.example/mcp",
        "serverTransport": "httpStreamable",
        "authentication": "none",
        "include": "all",
        "options": {}
      }
    },
    {
      "id": "000f1d13-81d0-4573-abbd-4a541b4bc702",
      "name": "README",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -560,
        -180
      ],
      "parameters": {
        "color": 3,
        "width": 500,
        "height": 460,
        "content": "## Give an AI agent tools from any MCP server\n\n**Who's it for**\nBuilders who want an n8n AI agent to use tools exposed by an external MCP (Model Context Protocol) server.\n\n**How it works**\nA chat message goes to an AI Agent connected to an external MCP server via the MCP Client Tool node; the agent discovers and calls that server's tools, then replies.\n\n**How to set up**\n1. Add an OpenRouter credential to the model.\n2. In MCP Server Tools set your MCP endpointUrl (+ transport/auth if needed).\n3. Open the chat and ask something the server's tools can answer.\n\n**Requirements**\n- An OpenRouter account and a reachable MCP server endpoint.\n\n**How to customize**\n- Point at any MCP server; restrict tools via Include; swap the trigger or model."
      }
    },
    {
      "id": "df9ef99a-d343-463f-92c9-da4050676b88",
      "name": "Step note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -40,
        -190
      ],
      "parameters": {
        "color": 7,
        "width": 720,
        "height": 110,
        "content": "### Flow\nWhen Chat Message Received \u2192 MCP Agent (model + MCP Server Tools client) \u2192 reply."
      }
    }
  ],
  "connections": {
    "When Chat Message Received": {
      "main": [
        [
          {
            "node": "MCP Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLM via OpenRouter": {
      "ai_languageModel": [
        [
          {
            "node": "MCP Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "MCP Server Tools": {
      "ai_tool": [
        [
          {
            "node": "MCP Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

AI Agent with MCP Client (call any MCP server). Uses chatTrigger, agent, lmChatOpenRouter, mcpClientTool. Chat trigger; 6 nodes.

Source: https://github.com/DeveloperAlly/n8n/blob/aeb8ddaba080bdcba0096b7598bb3afb590717b7/templates/workflows/07-mcp-client-agent.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Describe any automation in plain English. This AI agent builds, validates, and deploys a working n8n workflow into your instance in seconds — no node dragging, no JSON editing, no guesswork.

Agent, Mcp Client Tool, OpenRouter Chat +3
AI & RAG

n8n-ejentum-harness-integration-patterns. Uses lmChatOpenRouter, memoryBufferWindow, chatTrigger, mcpClientTool. Chat trigger; 37 nodes.

OpenRouter Chat, Memory Buffer Window, Chat Trigger +3
AI & RAG

Build an MCP server with Airtable. Uses chatTrigger, agent, memoryBufferWindow, mcpClientTool. Chat trigger; 13 nodes.

Chat Trigger, Agent, Memory Buffer Window +4
AI & RAG

Build an MCP server with Airtable. Uses chatTrigger, agent, memoryBufferWindow, mcpClientTool. Chat trigger; 13 nodes.

Chat Trigger, Agent, Memory Buffer Window +4
AI & RAG

This template is designed for anyone who wants to integrate MCP with their AI Agents using Airtable. Whether you're a developer, a data analyst, or an automation enthusiast, if you're looking to lever

Chat Trigger, Agent, Memory Buffer Window +4