AutomationFlowsAI & RAG › AI Weather Forecasts with Mcp Integration

AI Weather Forecasts with Mcp Integration

ByJaredCo @jaredco on n8n.io

This n8n workflow demonstrates how to integrate real-time weather intelligence into any automation using the Model Context Protocol (MCP). Get current conditions and 5-day forecasts with natural language queries like "What's the weather like in Miami?" or "Will it rain next…

Event trigger★★★★☆ complexityAI-powered6 nodesOpenAI ChatAgentHTTP Request Tool
AI & RAG Trigger: Event Nodes: 6 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #5026 — we link there as the canonical source.

This workflow follows the Agent → HTTP Request Tool 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
{
  "id": "DtcpXZZBN3IgksKb",
  "name": "WeatherTrax MCP Agent Demo",
  "tags": [],
  "nodes": [
    {
      "id": "5b4fa064-f1f9-4747-81a1-1d68f477850c",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -280,
        160
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "07d3bb38-9e4e-4054-96f7-f1a47585525b",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -220,
        -60
      ],
      "parameters": {
        "text": "={{ $json['Weather Request'] }}",
        "options": {
          "systemMessage": "\n\nWhen users ask about weather, you MUST call the connected weatherTool function with these exact parameters:\n- location: (string) The city or location name\n- query_type: (string) Either \"current\" for current weather or \"multi_day\" for forecasts\n- num_days: (integer) Number of days for forecast (only when using \"multi_day\")\n\nIMPORTANT: Always use the function call format for weather requests.\n\nExamples:\n- \"Weather in Boca Raton\" \u2192 Call weatherTool with location=\"Boca Raton\", query_type=\"current\"\n- \"5 day forecast for Miami\" \u2192 Call weatherTool with location=\"Miami\", query_type=\"multi_day\", num_days=5\n\nAlways extract the location from the user's request and call the weatherTool function."
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "3b6d46cd-5fd5-4e1b-be6e-ee1d38243a0d",
      "name": "MCP - WeatherTrax",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -40,
        160
      ],
      "parameters": {
        "url": "https://mcp-weathertrax.jaredco.com",
        "method": "POST",
        "options": {},
        "jsonBody": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('JSON', ``, 'json') }}",
        "sendBody": true,
        "specifyBody": "json",
        "toolDescription": "Get weather information for any location - supports current weather, forecasts, and multi-day predictions"
      },
      "typeVersion": 4.2
    },
    {
      "id": "f85c933c-bbbc-4258-beef-730376bcdd78",
      "name": "\ud83e\uddea View Results Here",
      "type": "n8n-nodes-base.code",
      "position": [
        140,
        -60
      ],
      "parameters": {
        "jsCode": "return [{ fullAgentOutput: $json, toolCall: $json.tool_call, toolParams: $json.tool_call?.input, message: '\u2705 Click this node to view the tool call and parsed input!' }]"
      },
      "typeVersion": 2
    },
    {
      "id": "c6beafa9-b079-4c91-8dde-c9b44c18b155",
      "name": "\ud83e\uddea Enter weather request",
      "type": "n8n-nodes-base.set",
      "position": [
        -440,
        -60
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "Weather Request",
              "value": "What is the weather in New York City?"
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "027ab837-512d-4fc5-9c5d-b7491e94e57d",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -680,
        -60
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a6ff7fde-e347-45e3-8053-a74f9b099a06",
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "\ud83e\uddea View Results Here",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MCP - WeatherTrax": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "\ud83e\uddea Enter weather request": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "\ud83e\uddea Enter weather request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

This n8n workflow demonstrates how to integrate real-time weather intelligence into any automation using the Model Context Protocol (MCP). Get current conditions and 5-day forecasts with natural language queries like "What's the weather like in Miami?" or "Will it rain next…

Source: https://n8n.io/workflows/5026/ — 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

Bitlab-Chatbot. Uses telegramTrigger, telegram, snowflake, httpRequest. Event-driven trigger; 87 nodes.

Telegram Trigger, Telegram, Snowflake +13
AI & RAG

Personal Assistant. Uses memoryBufferWindow, agent, agentTool, httpRequestTool. Event-driven trigger; 77 nodes.

Memory Buffer Window, Agent, Agent Tool +15
AI & RAG

Whatsapp-Bot-Flow. Uses whatsappTrigger, agent, supabase, whatsapp. Event-driven trigger; 60 nodes.

WhatsApp Trigger, Agent, Supabase +6
AI & RAG

This n8n workflow is designed for Facebook Page administrators, social media managers, and community moderators who want to automate comment management on their Facebook Pages. It's perfect for busine

Facebook Graph Api, Agent, HTTP Request +8
AI & RAG

This n8n workflow creates an intelligent WhatsApp customer support bot that can handle text, image, audio, and document messages. The workflow automatically processes incoming messages through differe

HTTP Request, N8N Nodes Rapiwa, Agent Tool +9