Weather Forecast 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 Forecast MCP ServerDo I need an umbrella in London 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 Forecast MCP Server + Databricks Agent Bricks
A Model Context Protocol (MCP) server that exposes weather forecast tools backed by the Open-Meteo API, integrated with Databricks Agent Bricks to answer natural-language weather questions and make intelligent predictions.
π¦ Repository & Deployment
GitHub Repository: https://github.com/SanthoshKumar777/databricks-weather-predict-mcp-agent
Branch: main
Databricks App:
App Name:
mcp-weather-serverStatus: β RUNNING
App URL: https://mcp-weather-server-7474646610904631.aws.databricksapps.com
MCP Endpoint: https://mcp-weather-server-7474646610904631.aws.databricksapps.com/mcp
Key Files:
weather_mcp_server.py - FastMCP server with 3 tools
weather_broker.py - HTTP adapter module
requirements.txt - Dependencies
app.yaml - Databricks App config
SUBMISSION.md - Complete submission documentation
Related MCP server: weather-mcp
Architecture
βββββββββββββββββββββββββββββββββββββββββββββββ
β Databricks Agent Bricks Agent β
β (Natural language weather Q&A + routing) β
ββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β Tool calls
β
βββββββββββββββββββββββββββββββββββββββββββββββ
β Weather MCP Server (FastMCP) β
β ββββββββββββββββββββββββββββββββββββββββ β
β β @mcp.tool decorators (thin layer) β β
β β - get_current_weather β β
β β - get_forecast β β
β β - predict_umbrella_needed β β
β ββββββββββββ¬ββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββββββββββββββββββ β
β β weather_broker.py (adapter layer) β β
β β - HTTP calls to Open-Meteo API β β
β β - Response parsing β β
β β - Error handling β β
β ββββββββββββ¬ββββββββββββββββββββββββββββ β
βββββββββββββββΌββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββ
β Open-Meteo API β
β (Free, no API key)β
ββββββββββββββββββββββWeather API
Provider: Open-Meteo
Authentication: None required (free tier, ~10,000 calls/day)
Data source: Official government weather models (NOAA, DWD, etc.)
Coverage: Global
Why Open-Meteo?
No signup, no API key, no credit card
Simple REST API with JSON responses
Reliable and well-documented
Perfect for educational/demo projects
MCP Tools (3 Required + Extras)
1. get_current_weather(location: str)
Returns real-time weather conditions for any location.
Args:
location: City name or location string (e.g., "Chicago", "London, UK")
Returns:
{
"location": "Chicago, United States",
"temperature_f": 45.2,
"temperature_c": 7.3,
"conditions": "Partly cloudy",
"humidity": 72,
"wind_speed_mph": 12.5,
"wind_direction": "NW",
"timestamp": "2026-08-10T14:30:00"
}2. get_forecast(location: str, days: int = 7)
Returns multi-day weather forecast (up to 16 days).
Args:
location: City name or location stringdays: Number of forecast days (1-16, default 7)
Returns:
{
"location": "Austin, United States",
"forecast_days": [
{
"date": "2026-08-11",
"temp_high_f": 92.1,
"temp_low_f": 73.4,
"conditions": "Clear sky",
"precipitation_probability": 10,
"precipitation_mm": 0.0
},
...
]
}3. predict_umbrella_needed(location: str, date: str = None)
Smart prediction tool - applies threshold logic to raw forecast data.
Logic:
Precipitation probability > 40% OR precipitation > 5mm β "Yes, bring an umbrella"
Precipitation probability 20-40% β "Maybe, keep one handy"
Precipitation probability < 20% β "No umbrella needed"
Args:
location: City name or location stringdate: Target date in YYYY-MM-DD format (defaults to tomorrow if omitted)
Returns:
{
"location": "Seattle, United States",
"date": "2026-08-11",
"recommendation": "yes",
"reason": "High chance of rain (65% probability, 8.2mm expected). Bring an umbrella.",
"precipitation_probability": 65,
"precipitation_mm": 8.2,
"conditions": "Moderate rain"
}Project Structure
databricks-weather-predict-mcp-agent/
βββ weather_broker.py # Adapter: HTTP calls to Open-Meteo API
βββ weather_mcp_server.py # FastMCP server with @mcp.tool decorators
βββ requirements.txt # Python dependencies
βββ app.yaml # Databricks App configuration
βββ README.md # This fileSetup & Deployment
Step 1: Deploy the MCP Server as a Databricks App
# From your workspace, navigate to the project directory
cd /Workspace/Users/<your-email>/databricks-weather-predict-mcp-agent
# Deploy the app
databricks apps deploy mcp-weather-server \
--source-code-path /Workspace/Users/<your-email>/databricks-weather-predict-mcp-agent
# Check deployment status
databricks apps get mcp-weather-serverOnce deployed, note the app URL (e.g., https://<workspace>.cloud.databricks.com/apps/<app-id>).
Step 2: Register the MCP Server as an External Tool
Navigate to Databricks Workspace β Machine Learning β Agents
Click "+ New External Tool"
Configure:
Name:
weather_forecast_mcpType:
MCP Server (HTTP)URL:
https://<workspace>.cloud.databricks.com/apps/<app-id>/mcpAuthentication: None (internal app-to-app)
Click "Test Connection" to verify
Save the tool
Step 3: Create the Agent Bricks Agent
Navigate to Databricks Workspace β Machine Learning β Agents
Click "+ Create Agent"
Configure:
Name:
Weather AssistantLLM: Choose your preferred model (e.g.,
databricks-dbrx-instruct)System Prompt:
You are a helpful weather assistant powered by real-time weather data.
Your capabilities:
1. Check current weather conditions for any location
2. Provide multi-day weather forecasts
3. Make smart predictions (e.g., umbrella recommendations)
Guidelines:
- Always call the appropriate weather tool to get real-time data
- Never guess or hallucinate weather information
- If a location cannot be resolved, ask the user to clarify
- For umbrella predictions, explain the threshold logic you used
- If the API fails, inform the user clearly and suggest trying again
- Be conversational and helpful, but precise about weather data
When answering weather questions:
1. First, call get_current_weather or get_forecast
2. Then, interpret the results in plain language
3. Provide specific numbers (temps, precipitation chance)
4. For predictions, use predict_umbrella_needed and explain the reasoningAdd External Tool:
Select
weather_forecast_mcpfrom the dropdownEnable all three tools:
get_current_weather,get_forecast,predict_umbrella_needed
Click "Create Agent"
Example Queries & Demonstrations
Query 1: Current Weather
User: "What's the weather like in Chicago right now?"
Agent's Tool Call:
{
"tool": "get_current_weather",
"args": {"location": "Chicago"}
}Agent's Response:
"In Chicago, United States, it's currently 45Β°F (7Β°C) with partly cloudy skies. The humidity is at 72%, and there's a moderate northwest wind at 12.5 mph."
Query 2: Multi-Day Forecast
User: "Will it rain in Austin this weekend?"
Agent's Tool Call:
{
"tool": "get_forecast",
"args": {"location": "Austin", "days": 3}
}Agent's Response:
"Looking at the 3-day forecast for Austin, United States:
Saturday (Aug 11): Clear sky, high of 92Β°F, low of 73Β°F. Only 10% chance of rain.
Sunday (Aug 12): Partly cloudy, high of 89Β°F, low of 72Β°F. 15% chance of rain.
Monday (Aug 13): Clear sky, high of 91Β°F, low of 74Β°F. No rain expected.
Overall, it looks like a dry weekend with no rain. Perfect weather for outdoor plans!"
Query 3: Smart Prediction
User: "Should I bring a jacket to Seattle tomorrow?"
Agent's Tool Call:
{
"tool": "get_forecast",
"args": {"location": "Seattle", "days": 2}
}Agent's Response:
"Tomorrow in Seattle, the high will be 58Β°F with a low of 48Β°F and partly cloudy conditions. Yes, I'd recommend bringing a jacketβit's going to be quite cool, especially in the morning and evening."
Query 4: Umbrella Prediction
User: "Do I need an umbrella in London tomorrow?"
Agent's Tool Call:
{
"tool": "predict_umbrella_needed",
"args": {"location": "London"}
}Agent's Response:
"Yes, bring an umbrella for London tomorrow (Aug 11). There's a 65% chance of moderate rain with about 8.2mm of precipitation expected. My threshold logic says any precipitation probability over 40% or total rainfall over 5mm warrants an umbrellaβand tomorrow exceeds both!"
Error Handling
The MCP server gracefully handles common failure modes:
Bad Location:
{
"error": "Location 'Zzyzyx123' not found. Please check spelling or try a different format (e.g., 'City, Country')."
}Invalid Date:
{
"error": "Invalid date format: 2026-13-99. Use YYYY-MM-DD."
}API Timeout:
{
"error": "Failed to fetch current weather: Connection timeout"
}The Agent Bricks agent then interprets these errors and responds helpfully (e.g., asking the user to clarify the location).
Testing the MCP Server Directly
You can test the MCP server endpoints directly before wiring up the agent:
# Test get_current_weather
curl -X POST https://<workspace>.cloud.databricks.com/apps/<app-id>/mcp/call \
-H "Content-Type: application/json" \
-d '{
"method": "tools/call",
"params": {
"name": "get_current_weather",
"arguments": {"location": "San Francisco"}
}
}'
# Test predict_umbrella_needed
curl -X POST https://<workspace>.cloud.databricks.com/apps/<app-id>/mcp/call \
-H "Content-Type: application/json" \
-d '{
"method": "tools/call",
"params": {
"name": "predict_umbrella_needed",
"arguments": {"location": "Seattle", "date": "2026-08-11"}
}
}'Design Principles
β
Thin tool functions: All HTTP/parsing logic lives in weather_broker.py, not in @mcp.tool functions
β
Clear error messages: API failures return actionable errors, not stack traces
β
No secrets committed: Open-Meteo requires no API key, avoiding secrets management
β
Threshold logic: predict_umbrella_needed applies explicit rules (40% threshold, 5mm threshold) and explains them in the docstring
β
Specific system prompt: The agent is instructed not to hallucinate weather data and always call tools first
Future Enhancements (Stretch Goals)
Severe Weather Alerts: Add a tool that calls NWS API (US only) for active warnings/watches
Historical Lookups: Add a tool for past weather data (e.g., "What was the weather like in Paris on Christmas last year?")
Multi-City Comparison: Add a tool to compare weather across multiple cities (e.g., "Which is warmer this weekend, Miami or LA?")
Dashboard App: Build a small Streamlit dashboard (like
dashboard/in the reference repo) to visualize recent agent queries and predictions
Troubleshooting
Problem: MCP server returns "Location not found"
Solution: Try a different format (e.g., "London, UK" instead of "London"). Some small towns may not be indexed by the geocoding API.
Problem: Agent doesn't call the tool
Solution: Check that the tool is enabled in the Agent Bricks configuration and that the system prompt encourages tool usage.
Problem: App deployment fails
Solution: Verify app.yaml has correct file paths and that requirements.txt includes fastmcp>=3.4.0.
Problem: "Unexpected API response format" error
Solution: Open-Meteo occasionally changes response schemas. Check the API docs and update weather_broker.py accordingly.
License
This project is provided as-is for educational purposes. Open-Meteo data is licensed under CC BY 4.0.
Built with: FastMCP, Open-Meteo API, Databricks Agent Bricks
Author: Your Name
Date: August 10, 2026
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-qualityBmaintenanceProvides real-time weather data via 12 tools (current weather, forecasts, air quality, umbrella advice, etc.) using Open-Meteo and FastMCP, enabling LLMs to answer weather-related queries.1
- Flicense-qualityBmaintenanceMCP server exposing weather tools (current conditions, forecasts, umbrella prediction, travel advice, city comparisons) via Open-Meteo, designed for integration with Databricks Agent Bricks.
- Flicense-qualityCmaintenanceProvides current weather, multi-day forecasts, and umbrella recommendations through natural language queries, backed by the Open-Meteo API.
- Flicense-qualityCmaintenanceProvides real-time weather data, forecasts, and explainable predictions (umbrella, travel, city comparisons) via natural language, powered by Open-Meteo.
Related MCP Connectors
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
US weather, alerts, earthquakes and elevation for AI agents, from NWS/NOAA and USGS. No API keys.
Global weather via Open-Meteo: forecast, ERA5 archive, marine, air quality, geocoding, elevation.
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/SanthoshKumar777/databricks-weather-predict-mcp-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server