跳到正文
DEV Community· Petrichor·· 5 小時前AI 評分53

作者用 Meteosource 天氣 MCP 伺服器配合 Claude 規劃 Menorca 行程

I used a weather MCP server to plan a Menorca trip with Claude

AI 導讀

作者用 Meteosource 天氣 MCP 伺服器連接 Claude,按 Menorca 的天氣資料規劃首個長週末行程,並透過追問調整活動安排。Claude 先比較島上東西兩地的 7 日預報,再查詢住宿地點的逐小時資料,按降雨和風向安排景點。免費 API key 提供 7 日預報,但不包括預警、分鐘級降雨或歷史資料;風速以 m/s 返回。

正文

I was planning a trip to Menorca with friends, kids included, and autumn in the Balearics can be anything from beach weather to a wild north wind. Normally I’d open three weather apps and guess. But I work at Meteosource, and we recently launched our MCP server, so I tried it on my own trip: Claude, connected with nothing but a free API key. Below are the real requests and responses, no demo setup.

The setup (about a minute)

You need a free API key from meteosource.com. Then add the hosted MCP server to your AI tool.

Claude Code:

claude mcp add --transport http meteosource https://mcp.meteosource.com/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Claude (web or desktop): Customize > Connectors > Add custom connector, paste https://mcp.meteosource.com/mcp, set Authentication to No sign-in and add the request header Authorization: Bearer YOUR_API_KEY. On Team and Enterprise plans, an organization owner adds it under Organization settings > Connectors.

Nothing to install. The key goes in a header, never into the chat.

Step 1: Ask like a normal person

My first prompt:

I am planning a trip to Menorca from Saturday for one week. Give me trip and exploring tips according to the weather.

Claude picked the get_forecast tool and asked for two points in one call, one on the east of the island and one on the west, to see if the weather differs across Menorca:

{
  "locations": [
    { "lat": 39.889, "lon": 4.265, "label": "Mahón (east)" },
    { "lat": 40.001, "lon": 3.84, "label": "Ciutadella (west)" }
  ],
  "sections": "daily",
  "days": 7,
  "units": "metric",
  "variables": ["summary", "temperature", "wind", "precipitation", "probability", "cloud_cover"]
}

Note the variables filter: the model asked only for what it needed for trip planning.

Step 2: Narrow it down

Then I told it which village we were staying in, on the south coast.

This time it requested a full week of hourly data for that exact spot. Here is one day of the response:

{
  "columns": ["day", "weather", "summary", "predictability", "temperature",
              "wind_speed", "wind_gusts", "wind_dir", "wind_angle",
              "cloud_cover_total", "cloud_cover_low", "cloud_cover_middle",
              "cloud_cover_high", "precipitation_total", "precipitation_type"],
  "rows": [
    ["YYYY-MM-DD", "psbl_rain",
     "Light rain changing to cloudy in the afternoon. Temperature 17/20 °C.",
     3, 18.2, 4.5, 8.3, "NE", 36, 90, 57, 32, 77, 2.5, "rain"]
  ]
}

Time series come back as tables: column names once, then plain arrays. That's why 168 hours of hourly data fits comfortably in the model's context. The same data as raw API JSON would repeat every key on every hour.

What came back

From the hourly data, Claude built a plan for our first long weekend:

Day Forecast Plan
Day 1 Light rain 8:00 to 13:00 (2.5 mm), then dry, 17 to 20 °C Arrival day. Afternoon walk to a nearby cove with prehistoric cliff caves
Day 2 Dry, overcast, warmest day at 22.5 °C Talayotic stone monuments near Alaior, then the view from Monte Toro
Day 3 Partly sunny 13:00 to 17:00, north wind Beach day. The south coast is sheltered from a north wind, which is exactly our side of the island

The part I liked most: it didn't just read me temperatures. It connected the wind direction with geography. A north wind means rough water on the north coast and calm coves in the south, so it sent us south on the windy day.

Step 3: Iterate like you would with a travel agent

The real value showed up in the follow-ups, because the weather data stayed in context:

  • "Add a lighthouse visit." It suggested four, and split them by weather: the north coast ones (Favàritx, Cavalleria) only on calm days, the south ones (Artrutx, Illa de l'Aire) any time.
  • "No gin distillery, we'll be with kids." It swapped in a glass-bottom boat trip in Maó's harbour and an old fort with tunnels, both marked as good options for a cloudy day.
  • "Are there any local festivities during our stay?" This one isn't weather, so it used web search and found a local tradition with roasted chestnuts and bunyols (sweet fritters) in Maó.

What the free plan can and can't do

The free key was enough for all of the above, but it has limits worth knowing:

  • 7-day forecast horizon. Our trip was longer than that, so the plan only covered the first long weekend. Claude said so itself and offered to check again later in the week.
  • No warnings, minute-by-minute rain or history on the free plan. For "is this time of year usually windy?" you'd need a paid plan with the historical archive.
  • Each location counts as a request against your daily quota. Repeating a question shortly after is cached and usually costs little.

Gotcha: check your units

With "units": "metric", wind speed comes back in m/s, not km/h. Day 3's 8.8 m/s north wind is about 32 km/h, which is very different from "a light 9 km/h breeze". If you build anything on top of this, convert explicitly or ask the model to show km/h.

Try it yourself

Once connected, try prompts like:

  • "What's the weather in London this weekend?"
  • "I'm going to [your destination] next weekend with kids. Plan each day around the weather."
  • "Which day this week is best for a hike near [your city], and which for a museum?"
  • "Air quality in Kraków for the next two days, hour by hour."

Setup guides for Claude, Codex, Cursor, Antigravity and other tools are at mcp.meteosource.com.

If you try it for your own trip, tell me in the comments where you're going.

來源:DEV Community · dev.to