Custom MCP Weather Tool Integrated with n8n Agent Node – Working Demo



Hey everyone :waving_hand:

I’ve been exploring the new AI Agent node in n8n and wanted to share something cool I built:

:sun_behind_small_cloud: What it does
I’ve connected a custom MCP-compatible weather tool to n8n via the Agent node. It supports:
• Current weather
• Multi-day forecasts
• Sunrise/sunset
• Rain timing windows

The agent understands natural language like:

“What’s the weather in Boca Raton today?”
“5-day forecast for Miami?”

…and automatically calls the external weatherTool via MCP to respond.

:white_check_mark: How it works
• Hosted MCP server: https://mcp-weathertrax.jaredco.com
• MCP manifest + tool schema support
• n8n setup using:
• OpenAI Chat Model
• AI Agent node
• HTTP Request Tool (connected via tool socket)
• Schema auto-loaded via /.well-known/tool-manifest.json

:camera_with_flash: Screenshots
(Screenshots attached)

Example response from the tool:

{
“summary”: “It is currently 82°F and Partly cloudy in Boca Raton.”,
“temp_high”: 82,
“temp_low”: 82,
“condition”: “Partly cloudy”,
“wind”: “11 mph SE”,
“feels_like”: 89,
“humidity”: 74,
“uv_index”: 0,
“visibility”: 16,
“pressure”: 1020,
“cloud_cover”: 50,
“units”: {
“temperature”: “°F”,
“distance”: “miles”,
“speed”: “mph”,
“pressure”: “mb”
}
}

You can download a working n8n sample workflow : https://tinyurl.com/4jhy83hy

:test_tube: How to Use the MCP Weather Tool in n8n (for Developers)

:white_check_mark: What This Is

A working example of a custom external MCP tool integrated into the n8n Agent node, powered by a real-time weather API. It supports:

  • current weather
  • multi_day forecasts
  • Sunrise/sunset timing
  • Rain prediction windows

:toolbox: Prerequisites

  • n8n v1.97+ (Self-hosted or Cloud)
  • An Agent node set up
  • Basic understanding of custom tools in n8n

:package: Step 1: Download the Sample Workflow

Download the sample workflow JSON here:

:backhand_index_pointing_right: [Download JSON] https://tinyurl.com/4jhy83hy


:gear: Step 2: Import into n8n

  1. Open the n8n Editor
  2. Use the ☰ menu → Import Workflow
  3. Upload or paste the JSON
  4. Click Import

:robot: Step 3: Configure the Agent Node

In the Agent node:

  1. Choose your model (e.g., GPT-4 or Claude)
  2. Set this System Message :

You are a helpful assistant that answers weather-related questions using a custom weather tool when appropriate. If the user asks about the current weather, forecasts, rain, sunrise/sunset times, or other weather conditions, use the weatherTool.

The tool requires:

  • a location (city name, ZIP code, or place name)
  • a query_type (such as “current”, “multi_day”, “forecast”, “sunrise_sunset”, or “rain_check”)

Optionally:

  • a date (YYYY-MM-DD) for specific days
  • num_days (for multi-day forecasts)

Return structured weather results using the tool’s output fields like summary, temp_high, condition, or forecast. If the user asks a non-weather-related question, just respond directly without calling the tool.

  1. Scroll down and add a Tool:

:test_tube: Try Asking

  • “What’s the weather in Miami right now?”
  • “Will it rain in San Francisco on Saturday?”
  • “Give me the 5-day forecast for Boston.”
  • “When does the sun rise in Denver on Friday?”

:brain: How It Works

The Agent interprets natural language → fills in tool input (like location and query_type) → sends to your MCP server → gets structured weather info back. All handled via the n8n Agent interface.


:speech_balloon: Request for Feedback

Are you experimenting with external tools + Agent nodes in n8n ?

Would love to hear:

  • What you’re building
  • What tripped you up
  • Ideas for improvement

Reply below or message me — happy to help you get your own tool up and running.

1 Like

Hey mate, im trying to build something similar but having trouble with the output. my weather output is supposed to give a sassy sarcastic response. it output the sassyness but asked for the city, its not getting the information from the ai-agent/http from openweather.org. not sure what im doing here, just wanted to get it going? any help!

Hey, are you having trouble with your MCP server or getting it to work with the AI Agent?