A multi-agent AI app built on Databricks Apps that fetches real-time weather using the Model Context Protocol (MCP) and Open-Meteo API
User Query
↓
AgentOrchestrator (LLM agent — Llama 3.3 70B via Databricks Foundation Model API)
↓ tool_call: get_weather
MCPWeatherClient (MCP stdio client)
↓
weather_mcp_server.py (MCP server)
↓
Open-Meteo Geocoding + Forecast APIs
↓
LLM reasons over weather data → natural language response
↓
Gradio UI
| File | Purpose | Notes |
|---|---|---|
app.py |
Gradio UI + AgentOrchestrator + MCPWeatherClient |
Main entrypoint |
weather_mcp_server.py |
MCP server wrapping Open-Meteo API | Spawned as subprocess |
app.yaml |
Databricks Apps entrypoint config | Points to app.py |
requirements.txt |
Python dependencies | gradio, mcp, httpx, nest_asyncio, databricks-sdk |
MCP_INTEGRATION_GUIDE.md |
MCP architecture detail | Transport: stdio |
README.md |
This file | — |
Any city worldwide is supported via Open-Meteo Geocoding — not limited to a hardcoded list.
Example queries:
What's the weather in Mumbai?
Temperature in Berlin in celsius
Is it raining in São Paulo?
Step 1:
pip install -r requirements.txtStep 2:
python app.pyStep 3: Open http://localhost:8080 in your browser.
No API key or environment variable needed — Open-Meteo is free and open.
- Upload all files to a Databricks Workspace folder or Repo
- Go to Compute → Apps → Create App
- Point the source to the folder containing
app.yaml - Click Deploy — Databricks reads
requirements.txtand installs dependencies automatically - Once status shows Running, click the assigned URL
Requires Databricks Premium plan or above with Apps enabled.
The MCP server (weather_mcp_server.py) is spawned as a local subprocess by app.py using stdio transport. Both processes run inside the same Databricks Apps container, so no separate server deployment is needed. Do not change the transport to SSE or HTTP.
- Geocoding: https://geocoding-api.open-meteo.com/v1/search — converts city name to lat/lon
- Forecast: https://api.open-meteo.com/v1/forecast — returns current temperature, wind speed, weather code, and humidity
Both endpoints are free, require no API key, and have no rate limit for reasonable usage.