Weather-Prediction MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Weather-Prediction MCP ServerWill it rain in Chicago tomorrow?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Weather-Prediction MCP Server + Agent Bricks Agent
A weather MCP server built with FastMCP that exposes weather-forecast tools to a Databricks Agent Bricks agent, so the agent can answer natural-language weather questions and make simple predictions/recommendations (e.g. "Will it rain in Chicago tomorrow?", "Should I bring a jacket to Austin this weekend?").
Built as a homework for Day 3 (Agent Bricks + Alpaca paper-trading MCP server), using that
repo's mcp_server/ split as the reference pattern: thin @mcp.tool functions on top of a separate
adapter module that owns all the HTTP/parsing.
Live deployment
Deployed as a Databricks App (profile weather-app):
App URL:
https://weather-mcp-7474650707148987.aws.databricksapps.comMCP endpoint (register this):
https://weather-mcp-7474650707148987.aws.databricksapps.com/mcp
Confirmed running from the app logs: Starting MCP server 'weather-prediction' with transport 'http' on http://0.0.0.0:8000/mcp. (Requesting / returns 404 — that's expected; the tools live
under /mcp.)
Related MCP server: weather-mcp
Weather API + auth
Open-Meteo — chosen because it needs no signup, no API key, and no credit card (free for non-commercial use, ~10k calls/day). Two key-less endpoints are used:
Geocoding API (
geocoding-api.open-meteo.com) — turns a city name into latitude/longitude.Forecast API (
api.open-meteo.com) — current conditions + daily forecast.
Because there are no credentials, there is no Databricks secret to manage for this project.
(If you swap in a keyed provider like WeatherAPI.com, fetch the key in weather_adapter.py via
WorkspaceClient().secrets.get_secret() — the same pattern as Day 3's alpaca_broker.py — and
nothing else changes.)
Architecture
Agent Bricks agent --(MCP tool calls, streamable HTTP)--> weather_mcp_server.py
| |
| natural-language weather Q&A | (thin @mcp.tool funcs)
v v
final answer <---------------------------------------- weather_adapter.py
|
| (all HTTP + parsing)
v
Open-Meteo geocoding + forecast APIsweather_mcp_server.py— FastMCP server; each tool is a thin wrapper that delegates to the adapter and returns a clean dict (or{"status": "error", ...}on failure).weather_adapter.py— the adapter/broker module (likealpaca_broker.py): allrequestscalls and response parsing live here, plus the WMO weather-code → text mapping. No rawrequestscalls exist inside any@mcp.toolfunction.
Tools
Minimum three capabilities (current / forecast / prediction), plus two stretch tools:
Tool | Kind | What it does |
| current | Temperature, feels-like, humidity, precipitation, wind, conditions for now. |
| forecast | Daily high/low, precip chance & amount, max wind, conditions for the next N days (1–16). |
| prediction | Derived yes/no: umbrella if precip chance ≥ 40% or ≥ 0.1 in expected. Returns the reasoning + thresholds. |
| prediction | Multi-factor packing advice (umbrella / jacket / sunscreen / wind), each with its threshold. |
| stretch | Side-by-side forecast for several cities + picks the "nicest" via a simple score. |
location accepts a city name ("Chicago", "Austin, TX", "London") or a "lat,lon" pair
("41.8781,-87.6298"). day_offset is 0 = today, 1 = tomorrow, etc.
Why the prediction tools aren't just passthroughs
predict_umbrella_needed and get_travel_recommendation apply explicit thresholds (configurable via
env vars in app.yaml) to the raw forecast and return the decision plus the reason, rather than
echoing the API. Defaults:
Threshold | Default | Meaning |
| 40 | Umbrella if max precip probability ≥ this |
| 0.1 in | …or total precip ≥ this |
| 55 | Jacket if the day's high ≤ this |
| 75 | Sunscreen if sunny and high ≥ this |
| 25 | Wind warning if max wind ≥ this |
Files
weather_mcp_server.py— FastMCP server exposing the 5 toolsweather_adapter.py— adapter: all Open-Meteo HTTP calls + parsing + WMO code mappingrequirements.txt/app.yaml— Databricks App config for the MCP server.env.example— local dev env template (all optional; no key required)agent/system_prompt.md— the Agent Bricks system promptagent/agent_setup.md— how to register the MCP server + build the agent, and the tool list
Setup
1. Run locally
pip install -r requirements.txt
python weather_mcp_server.py # serves MCP over streamable HTTP on :8000Sanity-check the adapter without MCP:
python -c "import json, weather_adapter as w; print(json.dumps(w.get_current('Chicago'), indent=2))"Or point an MCP Inspector at
http://localhost:8000 to list and call the tools.
2. Deploy as a Databricks App
Same flow as Day 3's mcp_server/:
Put this folder in a Databricks Git folder.
Compute > Apps > Create app > Custom, name it e.g.
weather-mcp, and point its source at this folder (so it picks upapp.yaml).Deploy, then copy the app URL — you'll register it as an external MCP server next.
No secrets step is needed (Open-Meteo is key-less).
3. Register the MCP server + build the agent
See agent/agent_setup.md for the full steps (mirrors Day 3's README):
register the app URL as an external MCP, create an Agent Bricks agent, add the 5 tools, and paste the
system prompt from agent/system_prompt.md.
Demonstration (agent Q&A)
Real tool outputs from the live Open-Meteo API (captured 2026-08-09; your numbers will differ):
Q1 — "What's the weather like in Chicago right now?"
Agent calls
get_current_weather("Chicago")→{"location": "Chicago, Illinois, United States", "temperature": 83.9, "feels_like": 90.6, "humidity_pct": 68, "wind_speed": 11.2, "conditions": "Overcast", "as_of": "2026-08-09T12:15"}Answer: "Right now in Chicago it's about 84°F (feels like 91°F because of the humidity — 68%), overcast, with an 11 mph wind."
Q2 — "Should I bring an umbrella to Seattle tomorrow?"
Agent calls
predict_umbrella_needed("Seattle", day_offset=1)→{"location": "Seattle, Washington, United States", "date": "2026-08-10", "umbrella_needed": false, "precip_chance_pct": 2, "conditions": "Overcast", "reason": "No umbrella needed. 2026-08-10 in Seattle... only a 2% chance of precipitation... below the 40% / 0.1 in threshold."}Answer: "No need — tomorrow in Seattle is overcast but only a 2% chance of rain, well below the 40% umbrella threshold."
Q3 — "Should I pack a jacket for Seattle this weekend?"
Agent calls
get_travel_recommendation("Seattle", day_offset=1)→{"location": "Seattle, Washington, United States", "date": "2026-08-10", "recommendations": ["No special gear needed - mild conditions expected."], "forecast": {"temp_high": 74.7, "temp_low": 55.2, "conditions": "Overcast"}}Answer: "You should be fine without a jacket during the day — highs around 75°F. Evenings dip to the mid-50s, so a light layer wouldn't hurt after sunset."
Q4 (stretch) — "Which has nicer weather this weekend: Austin, Seattle, or Denver?"
Agent calls
compare_cities_weather(["Austin","Seattle","Denver"], day_offset=1)→ ranks by score and reports thebestcity with its high/low, conditions, and precip chance.
Notes / guardrails
Clean errors, not stack traces. A bad location (
get_current_weather("Xyzzy")) returns{"status": "error", "message": "Could not find a location matching 'Xyzzy'. Try a 'City, ST' form or a 'lat,lon' pair."}, and the system prompt tells the agent to ask the user to clarify rather than guess.No hallucinated weather. The system prompt requires the agent to base every weather claim on a tool result and to say so if a tool fails.
No secrets committed. Open-Meteo needs none;
.envis git-ignored.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA weather service MCP server that provides current weather data, resource endpoints, and report prompts for any location.1
- Flicense-qualityCmaintenanceAn MCP server that provides current weather conditions and forecasts via OpenWeatherMap API to AI agents.
- Flicense-qualityBmaintenanceAn MCP server that provides real-time weather data and forecasts via Open-Meteo, with tools for current conditions, multi-day forecasts, umbrella predictions, and travel recommendations.
- Alicense-qualityCmaintenanceThis MCP server provides current weather, 1-16 day forecasts, travel recommendations, and city comparisons using Open-Meteo. It requires no API key and includes a transparent agent-friendly interface.MIT
Related MCP Connectors
OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)
WeatherAPI.com MCP — wraps WeatherAPI.com (api.weatherapi.com)
350+ production-ready APIs through one MCP server — weather, geocoding, validation, financial data.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/modern-data-engineering-lab/weather-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server